CVE-2026-42080: PPTAgent: Arbitrary File Write via `save_generated_slides`
PPTAgent's MCP server, in versions before 1.1.36, lets the save_generated_slides tool write a PPTX file to any path the server process can reach. A prompt-injected or malicious client can overwrite files such as shell startup scripts or create directories outside the workspace. Upgrade to pptagent 1.1.36.
Published May 5, 2026 · Analysis Oct 28, 2026
What an attacker can do
The save_generated_slides tool in pptagent/mcp_server.py takes a pptx_path argument. It builds a Path, calls pptx.parent.mkdir(parents=True, exist_ok=True), and saves the presentation with self.empty_prs.save(pptx_path). It does no workspace check. The server does change into WORKSPACE at startup, so relative paths stay inside, but absolute paths and ../ sequences go wherever the process may write. The download_file tool in deeppresenter/tools/search.py does enforce confinement; this one did not.
The attacker needs a way to make the agent call the tool with a chosen path, such as prompt injection in content the agent reads, or direct access as an MCP client. The CVSS vector requires low privileges and user interaction. The advisory lists these outcomes: overwriting a dot file such as ~/.bashrc, escaping the workspace with ../../.ssh/known_hosts.pptx, planting a file under /etc/cron.d when the server runs as root, and writing to a raw device for denial of service.
The file content is a PPTX, which is a ZIP archive, so exploitation as code execution is uncertain. The advisory itself says it depends on how the target parses the file. Destroying or corrupting existing files is the sure result.
Who is affected
The pip package pptagent in versions before 1.1.36, when its MCP server is in use. The process's file permissions set how far a write can reach, and a server running as root is worst. Check the version:
pip show pptagentpptagent
- Ecosystem
- PyPI
- Affected
- < 1.1.36
- Fixed in
- 1.1.36
- Check
pip show pptagent
How to fix it
Upgrade to pptagent 1.1.36:
pip install --upgrade "pptagent>=1.1.36"The fix commit makes save_generated_slides resolve pptx_path through a new resolve_path_in_workspace helper in pptagent/utils.py, which raises a ValueError for paths outside the workspace. The same commit also removes builtins from the eval call in execute_actions in pptagent/apis.py. The advisory names no workaround. Until you upgrade, run the server as an unprivileged user in a container with a restricted filesystem.
How to tell if you were hit
Check MCP tool-call logs for save_generated_slides calls where pptx_path is absolute or contains ... On the host, look for ZIP-format .pptx files in unexpected places, and for shell startup files, cron entries or SSH files with recent modification times and binary content. Files that fail to parse after a session, such as a broken .bashrc, are a sign of overwrite. Beam records agent MCP tool calls and file access, so an agent's save_generated_slides call with an odd path would be visible in its history.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Summary
This vulnerability has been fixed in https://github.com/icip-cas/PPTAgent/commit/418491a9a1c02d9d93194b5973bb58df35cf9d00.
The save_generated_slides MCP tool accepts a pptx_path argument and writes the generated PPTX file to that path without any workspace restriction or path validation:
# pptagent/mcp_server.py:288-300
async def save_generated_slides(pptx_path: str):
"""Save the generated slides to a PowerPoint file.
Args:
pptx_path: The path to save the PowerPoint file
"""
pptx = Path(pptx_path)
assert len(self.slides), (
"No slides generated, please call `generate_slide` first"
)
pptx.parent.mkdir(parents=True, exist_ok=True) # ← creates arbitrary directories
self.empty_prs.save(pptx_path) # ← writes to arbitrary pathThe call to pptx.parent.mkdir(parents=True, exist_ok=True) creates any intermediate directories, and self.empty_prs.save(pptx_path) writes a valid PPTX binary (ZIP archive) to the specified path. No is_relative_to(workspace) check is performed — contrast with download_file in deeppresenter/tools/search.py:290, which correctly enforces workspace confinement.
The server changes directory to WORKSPACE (if set) on startup, so relative paths land in the workspace. Absolute paths, however, reach any filesystem location accessible to the server process.
Impact
The concrete attack scenarios include
- Cron persistence (root-running server):
pptx_path = "/etc/cron.d/backdoor"→ writes a PPTX ZIP to a path the cron daemon reads; if the ZIP header is misinterpreted, this may corrupt cron or be exploitable depending on parser behaviour. - Dot-file overwrite:
pptx_path = "/home/user/.bashrc"→ overwrites shell init file with a binary blob containing arbitrary content in the PPTX's embedded comments/custom properties. - Directory traversal from workspace:
pptx_path = "../../.ssh/known_hosts.pptx"→ escapes workspace entirely. - Denial of service:
pptx_path = "/dev/sda"writes to a raw device.
Remediation
The potential fix is something like:
async def save_generated_slides(pptx_path: str):
workspace = Path(os.getcwd()).resolve()
target = Path(pptx_path).resolve()
if not target.is_relative_to(workspace):
raise ValueError(f"Access denied: path outside workspace: {target}")
target.parent.mkdir(parents=True, exist_ok=True)
self.empty_prs.save(str(target))Credited to Koukyosyumei.
Questions
- Is pptagent 1.1.35 affected by CVE-2026-42080?
Yes. All versions before 1.1.36 are affected, and 1.1.36 is the patched version.
- Can this write arbitrary content to a file?
The server writes a valid PPTX, which is a ZIP archive. The attacker controls the path and some embedded properties, not the whole file, so turning it into code execution depends on how the target parses it.
- Does the server change to a workspace directory?
Yes, when WORKSPACE is set, so relative paths land there. Absolute paths and traversal sequences still reach anywhere the process can write.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More Other MCP servers and tools vulnerabilities
All Other MCP servers and tools entriesCVE-2026-102943
Dagu MCP DAG specification read bypasses path containment and workspace isolation
medium6.5Nov 10, 2026CVE-2026-102610
fast-agent: `fast-agent serve` binds HTTP to 0.0.0.0 with no authentication by default; with --shell this is unauthenticated remote command execution
medium6.4Nov 9, 2026CVE-2026-63655
tsParticles: Unbounded HTTP Request Body Buffering in @tsparticles/mcp-server Leads to Remote DoS
high7.5Nov 9, 2026CVE-2026-76892
tsParticles: Malformed JSON requests can terminate the @tsparticles/mcp-server HTTP process
high8.7Nov 9, 2026CVE-2026-76893
tsParticles: A single anonymous MCP session can monopolize HTTP mode and deny new clients
medium6.9Nov 9, 2026CVE-2026-77604
Code Graph RAG: MCP paginated read_file path traversal / arbitrary file read
high7.5Nov 9, 2026
