News · zcaceres/markdownify-mcp (open-source MCP server) · 2 min read
Event date: · Published:
markdownify-mcp patches high-severity path traversal flaw
markdownify-mcp fixed a high-severity path traversal flaw (CVE-2026-140424) that let attackers bypass its directory allowlist and read files outside permitted paths, including via prompt injection.
GitHub Security Advisories disclosed on December 1, 2026, that the open-source markdownify-mcp server, used by AI agents to convert local files to markdown, patched a high-severity path traversal vulnerability. The flaw, tracked as GHSA-6wvg-2gwh-7j53 and CVE-2026-140424, let attackers read files outside the directories the server was supposed to restrict.
What the advisory covers
- CVE-2026-140424 and GHSA-6wvg-2gwh-7j53 were published December 1, 2026, with a CVSS score of 8.7 (High severity)
- The bug sits in the server's
isWithinDirectory()function, which is meant to enforce the MD_ALLOWED_PATHS and MD_SHARE_DIR path restrictions - Attackers bypass those restrictions by targeting sibling directories that share an allowed path prefix
- The attack vector is network-based, needs no privileges and no user interaction, and can be triggered directly or through prompt injection against the server's file-conversion tools
- Impact is high confidentiality loss through arbitrary file read, with no integrity or availability impact; it is classified as CWE-22, Improper Limitation of a Pathname to a Restricted Directory
What it means for people who build with AI
This is another in a steady run of file-access vulnerabilities found in widely-installed MCP servers, and it shows that directory allowlists in agent tooling keep failing against prompt-injection-driven path manipulation. Anyone wiring file-conversion tools into an agent should treat allowlist checks as a weak boundary rather than a guarantee, especially when the same tool call can be reached through untrusted input.
Fix and affected versions
- markdownify-mcp versions before 1.2.0 are affected, and the fix is available in version 1.2.0
- The vulnerability is a separate issue from the same maintainer's separately disclosed fetch-mcp SSRF advisory
Sources
- markdownify-mcp path traversal advisory GHSA-6wvg-2gwh-7j53 (GitHub Security Advisories, December 1, 2026, official)
Written with AI assistance, strictly from the sources listed above. Before it went live, automated checks verified its dates, sources and every language edition.