Vulnerability  ·  2026-12-02

markdownify-mcp isWithinDirectory path traversal bypasses MD_ALLOWED_PATHS and MD_SHARE_DIR

VulnerabilityMedium impactGlobalCVE-2026-140424
markdownify-mcp before 1.2.0 contains a path traversal vulnerability in isWithinDirectory() that allows attackers to bypass MD_ALLOWED_PATHS and MD_SHARE_DIR restrictions, so local-file conversion tools can target sibling directories sharing an allowed parent. CVSS 7.5.
MCP file-conversion servers are exactly the surface an LLM agent touches; a directory-containment escape means a prompt-injected agent can read files outside the sandbox the operator configured, expanding the blast radius to the developer's broader filesystem.
A path traversal flaw in isWithinDirectory() lets an attacker craft a path that evades the MD_ALLOWED_PATHS and MD_SHARE_DIR containment checks, targeting sibling directories sharing an allowed parent and invoking local-file conversion tools directly or through prompt injection.
markdownify-mcp before 1.2.0
Upgrade markdownify-mcp to 1.2.0 or later, which fixes the directory-containment validation.
GitHub — markdownify-mcp src/utils.tsNVD — CVE-2026-140424
See this in the live feed Explore related AI security and governance findings — updated every morning.
Open the feed →