Office-PowerPoint-MCP-Server
GongRzhe/Office-PowerPoint-MCP-Server
- Type
- MCP server
- Scanned
- Nov 12, 2026
- Version
- 3631ba2ec0c2
- Files read
- 32
This MCP server lets AI agents create, read, format, and save PowerPoint presentations, as well as enhance images and subset font files. Its biggest risk is that its file-writing tools accept any path without folder or file-type checks, allowing a prompt-injected agent to overwrite arbitrary files on your computer, while its optional HTTP and SSE modes run without authentication.
What it can reach
- Files
- Reads PowerPoint (.pptx, .potx), image, and font files from any path on disk, and writes or overwrites files at any path passed to save_presentation, manage_image, or manage_fonts, plus temporary files in the system temp directory.
- Network
- Makes no outbound network requests, but can open a local or network HTTP/SSE listener (default port 8000) when started with --transport http or --transport sse.
Findings
-
HighFile-saving tools can overwrite arbitrary non-PowerPoint files anywhere on disk
utils/presentation_utils.py:72
save_presentation writes directly to any file_path supplied by the caller without checking that the path ends in .pptx or stays inside an allowed folder. The same unrestricted write behavior exists in manage_fonts (operation='optimize', which writes binary font data to any output_path regardless of extension) and manage_image (operation='enhance', which writes to any image or PDF output_path). If the AI agent processes untrusted text—such as slides read via extract_presentation_text or untrusted web pages—prompt injection can trick it into overwriting and corrupting important user files like shell startup configs, SSH files, or source code.
Fix: Resolve output paths with os.path.realpath, restrict writes in save_presentation, manage_fonts, and manage_image to a configured workspace directory, and enforce expected extensions (.pptx, .ttf/.otf, and standard image extensions).
-
MediumHTTP and SSE server modes run without authentication
When launched with --transport http or --transport sse (including the Docker command in README.md that publishes port 8000), FastMCP starts an unauthenticated web endpoint exposing all presentation, image, and font tools. Anyone able to reach that port—or a malicious website via DNS rebinding if an older mcp SDK version (<1.23.0) is installed—can read presentation text and overwrite writable files without any password or AI confirmation.
Fix: Use the default stdio transport for local agents; if HTTP or SSE mode is required, bind strictly to 127.0.0.1, require a recent mcp SDK with Origin/Host validation (>=1.23.0), and configure token authentication.
-
LowImage and font tools create temporary files with deprecated tempfile.mktemp
When manage_image (operation='enhance') or manage_fonts (operation='optimize') is called without an output_path, the server generates a predictable filename in the system temp folder using tempfile.mktemp() before opening it for writing. On a shared multi-user machine, another local user could plant a symbolic link at that path before the write occurs to overwrite files owned by the user running the server, and the temporary files are never cleaned up.
Fix: Use tempfile.NamedTemporaryFile(delete=False, suffix=...) so temporary files are created atomically with restrictive permissions.
-
LowPermissive dependency bounds allow known vulnerable versions of Pillow, fonttools, and mcp
pyproject.toml sets very old minimum versions (Pillow>=8.0.0, fonttools>=4.0.0, mcp[cli]>=1.8.0) and requirements.txt leaves all packages unpinned. While fresh virtual environments fetch current releases, installing into an existing Python environment can retain older packages with known flaws in code paths used directly by this server, including fonttools <4.43.0 XML external entity injection during font subsetting (CVE-2023-45139), Pillow <10.3.0 image-parsing buffer overflows (CVE-2023-4863, CVE-2024-28219), and mcp <1.23.0 missing DNS rebinding checks (CVE-2025-66416).
Fix: Raise the minimum version constraints in pyproject.toml and requirements.txt to at least Pillow>=10.3.0, fonttools>=4.43.0, and mcp[cli]>=1.23.0.
