Skip to main content

markdownify-mcp CVE-2026-140424

| EUVDEUVD-2026-140347 HIGH
Path Traversal (CWE-22)
2026-12-01 VulnCheck GHSA-6wvg-2gwh-7j53
8.7
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach MCP local-file conversion tool
  2. Delivery
    Craft sibling-prefix path (e.g. /srv/share-evil)
  3. Exploit
    Bypass isWithinDirectory() startsWith check
  4. Execution
    Read file outside allowlist
  5. Impact
    Exfiltrate sensitive file contents

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that the operator has configured the MD_ALLOWED_PATHS or MD_SHARE_DIR environment restrictions to confine local file reads - the flaw is a bypass of those specific controls, so a deployment that does not use them has no allowlist to defeat. The attacker must also be able to invoke the server's local-file conversion tools, either directly or indirectly via prompt injection through an LLM agent that calls the tool. The concrete trigger (per the advisory) is a target path in a sibling directory that shares the allowlisted prefix (e.g. /srv/share-evil vs. allowed /srv/share), which the pre-1.2.0 isWithinDirectory() accepted because normPath.startsWith(normDir) did not enforce a path-separator boundary. Impact is limited to reading files the server process can access; it is read-only disclosure with no write or execution. Related advisory-documented vectors (symlink escape, tilde-expansion desync) are fixed in the same release but are distinct from the prefix-match path traversal described for this CVE.

Impact

This is a genuine but bounded exposure that merits timely patching rather than emergency response, consistent with the input's 'this_week' priority label. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N) describes network-reachable, low-complexity access with no privileges or user interaction, and impact is confined to confidentiality (VC:H, with VI:N/VA:N) - an information-disclosure (file read) flaw, not code execution. The SSVC decision framework aligns with a measured urgency: Exploitation is 'none' (no observed exploitation), Automatable is 'yes' (allowlist-bypass path reads can be scripted once a target is reachable), and Technical Impact is 'partial'. KEV status is not present in the input, so this is NOT confirmed actively exploited; no EPSS score was provided, so probabilistic exploitation likelihood cannot be compared here. There is no PoC or exploit reference in the supplied data - only advisory, patch, release, source, and VulnCheck advisory links - so no public exploit identified at time of analysis. The key caveat is that the headline CVSS:4.0 PR:N/UI:N rating understates the real-world precondition: exploitation only matters when an operator has deliberately configured MD_ALLOWED_PATHS or MD_SHARE_DIR to confine reads, and the attacker must be able to invoke the local-file conversion tools (directly or via prompt injection). In an unconfigured deployment there is no allowlist to bypass. Net: a real priority to patch for anyone relying on these allowlist controls, but not a drop-everything emergency given no KEV, no observed exploitation, and read-only impact.

Exploit ScenarioDerived

An attacker who can reach the markdownify-mcp server's local-file conversion tools - either directly or by injecting instructions into content an LLM agent processes (prompt injection) - requests conversion of a path in a sibling directory that shares the allowed prefix, e.g. reading /srv/share-evil/secret.md when MD_ALLOWED_PATHS=/srv/share. Because isWithinDirectory() used startsWith() without a separator boundary, the request passes the allowlist check and the file outside the intended directory is read back as Markdown. No public exploit code is identified in the provided sources; given AV:N/AC:L the request itself is trivial to craft once tool access exists.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.9% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Dec 02, 2026

Path traversal in markdownify-mcp (npm package mcp-markdownify-server) before 1.2.0 allows remote, unauthenticated attackers to read files outside the operator-configured MD_ALLOWED_PATHS / MD_SHARE_DIR allowlist by targeting a sibling directory that merely shares the allowed path's string prefix. The flaw lives in isWithinDirectory(), which compared paths with startsWith() instead of a proper boundary check; attackers reach it by invoking the server's local-file conversion tools directly or indirectly through prompt injection against an LLM agent wired to the tool. Scored 8.7 (CVSS 4.0) with confidentiality-only impact (CWE-22), it is not in CISA KEV, SSVC exploitation is 'none', and no public exploit code has been identified at time of analysis; priority is 'this_week' rather than emergency patching, and the vendor has released 1.2.0 with the fix.

RemediationAI

Vendor-released patch: upgrade mcp-markdownify-server to 1.2.0 (release tag v1.2.0, fix commit f7bc9752a30cd154a59c4015d74de786cd02a0e9), which replaces the startsWith() prefix comparison in isWithinDirectory() with path.relative() boundary checks and also closes the related symlink-canonicalization and tilde-expansion desynchronization issues in the same release; see the advisory at https://github.com/zcaceres/markdownify-mcp/security/advisories/GHSA-wp59-q6fv-34rx. Operators who cannot upgrade immediately should note the exposure only exists where MD_ALLOWED_PATHS or MD_SHARE_DIR is used to confine reads - a deployment that never sets these restrictions has no allowlist for the prefix trick to defeat, but it also has no read confinement at all, so this is a scoping observation rather than a safe substitute for patching. Because reachability depends on the local-file conversion tools being invoked, directly or through prompt injection against an agent, reducing which agents and callers can drive those tools narrows the attack surface; the trade-off is that local-file conversion functionality is lost for those callers, and any allowlisted roots that still have sibling directories sharing their prefix remain exploitable on unpatched versions.

Affected VersionsENISA

markdownify-mcp 0 <1.2.0

Affected Packages

euvd markdownify_mcp fix: 1.2.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

markdownify-mcp is a Node.js/TypeScript Model Context Protocol server that converts documents and URLs to Markdown using markitdown, and it exposes local-file conversion tools that operators can sandbox with the MD_ALLOWED_PATHS and MD_SHARE_DIR environment variables. In versions up to and including 1.1.0, the guard function isWithinDirectory() in src/utils.ts normalized the target and the allowed root and then accepted the target when normPath.startsWith(normDir) returned true, without requiring a directory-separator boundary - so an allowed root of /srv/share also authorized /srv/share-evil/secret.md, a classic CWE-22 path traversal via prefix confusion. The same advisory documents two further defects fixed in the same release but distinct from the prefix-match traversal tracked by this CVE: assertPathAllowed() validated lexical paths without canonicalizing symlinks (CWE-59), permitting a symlink inside an allowed directory to resolve outside it, and Markdownify.get() validated the tilde-expanded resolvedPath yet performed fs.existsSync() and fs.promises.readFile() on the raw path, creating a desynchronization. The 1.2.0 commit replaces startsWith() with path.relative() boundary checks, adds realpathOrAncestor() symlink canonicalization for both requested paths and allowed roots, routes all filesystem operations through the resolved path, and hardens temporary-file handling with random per-conversion directories and exclusive ('wx') writes.

Know when Markdownify Mcp gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 8.7 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N
vuln.today AI 7.5 HIGH

Network-reachable tool invocation with no auth or interaction and a trivial sibling-prefix payload (AV:N/AC:L/PR:N/UI:N); impact is arbitrary file read only, so C:H, I:N, A:N, scope unchanged.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

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. Attackers invoking local-file conversion tools directly or via prompt injection can target sibling directories sharing an allowed prefix to read files outside the allowlist.

Technical POC Analysis

CWE-22 (with a companion CWE-59 defect), in mcp-markdownify-server <= 1.1.0.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

A high-severity path traversal vulnerability in markdownify-mcp (npm package mcp-markdownify-server) before version 1.2.0 could allow remote, unauthenticated attackers to read files outside the operator-configured allowlist, potentially exposing sensitive data. Leadership should care because this impacts any team using the tool with LLM agents, risking unauthorized access to internal files and data leaks.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.9%
Top 40% exploitable
Prevalence
Low
niche open-source MCP server, small npm footprint, no enterprise deployment base
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.9%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Partial

Priority Score

45
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +44
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy