CVE-2026-42078
JSON

4.6medium

PPTAgent: Arbitrary File Write + Directory Creation via markdown_table_to_image

Severity
4.6medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.21% (higher than 11% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-hrcw-xc63-g29mPYSEC-2026-2893

Description

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.

Affected

Product or packageVersionsReported by
icip-cas PPTAgent< 418491a9a1c02d9d93194b5973bb58df35cf9d00CVE List
pptagent (PyPI)before 1.1.36GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M4.6medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L
GitHub4.6medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L
PyPA Advisory Database4.6medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:L/A:L

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
Summary

The markdown_table_to_image tool accepts a caller-controlled path parameter and passes it directly to get_html_table_image:

# pptagent/mcp_server.py:127-143
def markdown_table_to_image(markdown_table: str, path: str, css: str) -> str:
    """
    Args:
        path (str): The file path where the image will be saved
    """
    html = markdown_to_html(markdown_table)
    get_html_table_image(html, path, css)           # ← no path validation
    return f"Markdown table converted to image and saved to {path}"

# pptagent/utils.py:337-366
def get_html_table_image(html: str, output_path: str, css: str = None):
    parent_dir, base_name = os.path.split(output_path)
    if parent_dir and not os.path.exists(parent_dir):
        os.makedirs(parent_dir)                     # ← creates arbitrary directories
    hti = Html2Image(...)
    hti.screenshot(
        html_str=html,
        css_str=css,
        save_as=base_name,                          # ← writes image to any directory
        size=(1000, 600),
    )

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.

Impact

The concrete attack scenarios include

  • 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).
  • 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.
  • Directory creation oracle: path = "/root/test/probe.png" — if the directory is created, confirms the target path exists; if it errors, reveals permissions information.
NVD (es)

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.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-42078 changed 2026-05-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-hrcw-xc63-g29m changed 2026-07-13CC-BY-4.0
NVDCVE-2026-42078 changed 2026-10-26Public domain
PyPA Advisory DatabasePYSEC-2026-2893 changed 2026-07-13CC-BY-4.0