{"id":"CVE-2026-42078","aliases":["CVE-2026-42078","GHSA-hrcw-xc63-g29m","PYSEC-2026-2893"],"related":[],"kind":"vulnerability","state":"published","title":"PPTAgent: Arbitrary File Write + Directory Creation via markdown_table_to_image","summary":"PPTAgent is an agentic framework for reflective PowerPoint generation. Prior to commit 418491a, PPTAgent is vulnerable to arbitrary file write and directory creation via markdown_table_to_image. This issue has been patched via commit 418491a.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"PPTAgent is an agentic framework for reflective PowerPoint generation. Prior to commit 418491a, PPTAgent is vulnerable to arbitrary file write and directory creation via markdown_table_to_image. This issue has been patched via commit 418491a.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe `markdown_table_to_image` tool accepts a caller-controlled path parameter and passes it directly to `get_html_table_image`:\n\n```python\n# pptagent/mcp_server.py:127-143\ndef markdown_table_to_image(markdown_table: str, path: str, css: str) -> str:\n    \"\"\"\n    Args:\n        path (str): The file path where the image will be saved\n    \"\"\"\n    html = markdown_to_html(markdown_table)\n    get_html_table_image(html, path, css)           # ← no path validation\n    return f\"Markdown table converted to image and saved to {path}\"\n\n# pptagent/utils.py:337-366\ndef get_html_table_image(html: str, output_path: str, css: str = None):\n    parent_dir, base_name = os.path.split(output_path)\n    if parent_dir and not os.path.exists(parent_dir):\n        os.makedirs(parent_dir)                     # ← creates arbitrary directories\n    hti = Html2Image(...)\n    hti.screenshot(\n        html_str=html,\n        css_str=css,\n        save_as=base_name,                          # ← writes image to any directory\n        size=(1000, 600),\n    )\n```\n\n`os.makedirs(parent_dir)` creates arbitrary directory trees, and `Html2Image.screenshot` writes the rendered image to `parent_dir/base_name`. Unlike `download_file` in the same project, there is no `is_relative_to(workspace)` guard. This behaviour can be fixed with the same pattern as the above.\n\n\n### Impact\n\nThe concrete attack scenarios include\n\n- SSH key replacement: `path = \"/home/user/.ssh/authorized_keys\"` — replaces the authorized_keys file with an image binary (breaks - SSH but could be an image crafted with a specific PNG/JPEG payload).\n- Web shell: `path = \"/var/www/html/uploads/shell.php\"` — writes the rendered PNG there; the file has the .php extension but PNG content; combined with Apache Options +MultiViews or file-include vulnerabilities could be dangerous.\n- Directory creation oracle: `path = \"/root/test/probe.png\"` — if the directory is created, confirms the target path exists; if it errors, reveals permissions information.","format":"markdown","source":"ghsa"},{"lang":"es","text":"PPTAgent es un framework agéntico para la generación reflexiva de PowerPoint. Antes del commit 418491a, PPTAgent es vulnerable a la escritura arbitraria de archivos y a la creación de directorios a través de markdown_table_to_image. Este problema ha sido parcheado a través del commit 418491a.","source":"nvd"}],"published":"2026-05-04T16:55:17.870Z","modified":"2026-10-26T00:10:00.150Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","score":4.6,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","score":4.6,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","score":4.6,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L","score":4.6,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 418491a9a1c02d9d93194b5973bb58df35cf9d00","status":"affected"}],"vendor":"icip-cas","product":"PPTAgent","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.1.36"}],"ecosystem":"PyPI","package":"pptagent","purl":"pkg:pypi/pptagent","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.1.36"}],"ecosystem":"PyPI","package":"pptagent","purl":"pkg:pypi/pptagent","source":"pysec"}],"references":[{"url":"https://github.com/icip-cas/PPTAgent/security/advisories/GHSA-hrcw-xc63-g29m","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/icip-cas/PPTAgent/commit/418491a9a1c02d9d93194b5973bb58df35cf9d00","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42078","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/icip-cas/PPTAgent","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/pptagent","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-hrcw-xc63-g29m","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-04T18:38:03.199Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42078","url":"https://www.cve.org/CVERecord?id=CVE-2026-42078","licence":"CVE Terms of Use","modified":"2026-05-04T18:38:50.608Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-hrcw-xc63-g29m","url":"https://github.com/advisories/GHSA-hrcw-xc63-g29m","licence":"CC-BY-4.0","modified":"2026-07-13T16:43:25.681Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42078","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42078","licence":"Public domain","modified":"2026-10-26T00:10:00.150Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2893","url":"https://osv.dev/vulnerability/PYSEC-2026-2893","licence":"CC-BY-4.0","modified":"2026-07-13T16:33:00.029Z"}],"updatedAt":"2026-11-25T22:59:20.526Z","epss":{"score":0.00206,"percentile":0.11259,"date":"2026-12-01T12:00:22.000Z"}}