markdownify-mcp can be tricked into reading files outside its allowed list
What this means
An attacker who can send prompts to a system using markdownify-mcp can read files they should not be able to access. This includes sensitive data stored near allowed directories: private keys, database credentials, source code, or customer information. If the tool is part of an AI agent, an attacker can inject a prompt to make the agent read and reveal these files.
SecurityElites Manager Brief: the decision in one minute
A flaw in markdownify-mcp lets attackers read files outside the allowed directories by exploiting how the tool checks paths. If your AI system uses this tool and faces untrusted prompts, sensitive files nearby could be exposed. You need to upgrade to version 1.2.0 immediately.
| SecurityElites Fix-First Score | 48 of 100 Our own ranking of what to fix first. Real attacks count most, then the chance of attack, then severity. |
|---|---|
| SecurityElites fix window | Within 30 days High severity. This is our suggestion from common practice; your own policy comes first. |
| Who should own the fix | Platform or infrastructure team managing AI tools and dependencies. |
| Likely effort | About 15 minutes per service: update the package to version 1.2.0 and restart any process using it. Longer if you need to audit logs for signs of past misuse. |
Questions to ask your team or supplier
- Does your AI agent or chatbot use markdownify-mcp, and can it receive input from untrusted users or external systems?
- What sensitive files or credentials are stored in directories near the MD_ALLOWED_PATHS or MD_SHARE_DIR settings, and could they be accessed by this vulnerability?
- Do you have logs or monitoring in place to detect unusual file access patterns through markdownify-mcp?
Message you can forward to the owning team
Security notice: markdownify-mcp can be tricked into reading files outside its allowed list (CVE-2026-140424)
Severity: High (8.7 of 10)
SecurityElites Fix-First Score: 48 of 100
SecurityElites fix window: Within 30 days
Action: upgrade to markdownify-mcp 1.2.0 or later.
What we need from you: confirm whether we run this software, who owns it, and the date it will be fixed.
Full guide: https://securityelites.com/ai-vulnerabilities/cve-2026-140424-markdownify-mcp-can-be-tricked-into-reading-files-outside-its/
Source: SecurityElites AI Vulnerabilities Database, record SE-AIV-01898What is at stake in your AI setup
- Files and data the AI agent can reach: an attacker can use prompt injection to make the agent read and return sensitive files stored near allowed directories.
- Credentials and keys: database passwords, API keys, or cloud credentials stored in nearby directories could be exposed.
- Training or retrieval data: if sensitive training data or retrieval documents are stored near allowed paths, they could be read without authorization.
Who is exposed
- Teams running markdownify-mcp in AI agents or chatbots that accept user prompts.
- Services that use markdownify-mcp to convert markdown and allow untrusted input.
- Any deployment where markdownify-mcp is set up with MD_ALLOWED_PATHS or MD_SHARE_DIR environment variables but can be accessed via prompt injection.
Upgrades you need
| Software | Affected versions | Move to |
|---|---|---|
| zcaceres markdownify-mcp | Every version before 1.2.0 | 1.2.0 or later |
The fixed version here was taken from the vendor's own CVE record, because the national database has not listed it yet.
Am I affected?
Enter the version you run. Nothing you type is stored.
SecurityElites Developer Brief: the technical picture
| Is it being attacked | No known attacks and no public attack code when CISA last reviewed it |
|---|---|
| Where the attacker must be | Anywhere that can reach it over a network, including the internet if it is exposed |
| Account needed | None. No login is needed |
| Does a person have to do something | No. It works without anyone clicking or opening anything |
| How hard it is to do | Easy. It works reliably once the attacker can reach it |
| Risk of: data being read | High |
| Risk of: data or settings being changed | None |
| Risk of: the service being taken down | None |
| Can attackers automate it at scale | Yes, according to CISA |
| How much control an attacker gains | Partial control, according to CISA |
Read from the official severity rating: 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
Kind of coding mistake
- CWE-22: file paths can escape the allowed folder
Where it sits in the standards
OWASP Top 10 for LLM Applications 2025: LLM01 Prompt Injection
If you cannot upgrade today
- Until you can upgrade, restrict access to the system using markdownify-mcp to trusted users only.
- Remove or disable markdownify-mcp if it is not actively needed.
- Review and tighten MD_ALLOWED_PATHS and MD_SHARE_DIR settings to include only the minimum necessary directories, ensuring no sensitive data is stored nearby.
Log searches to start from
markdownify-mcp file access outside allowed paths (adapt field names to match your logs)Splunk
process=markdownify-mcp OR tool=markdownify-mcp NOT file_path IN (MD_ALLOWED_PATHS, MD_SHARE_DIR) | stats count by file_path, timestampAI agent prompts followed by unusual markdownify-mcp access (adapt field names)Elastic
agent_action:markdownify* AND (file_path.keyword:"../" OR file_path.keyword:"..\\" OR field_mismatch:true) | sort timestamp descWritten with AI as a starting point. Review them and change the index and field names to match your own logs before you rely on the result.
SecurityElites Fix Guide: step by step
- Find where markdownify-mcp is installedCheck your package manager and dependency lists (npm, pip, docker images, lock files) for markdownify-mcp. Note the installed version and the system or service that uses it. Look for environment variables MD_ALLOWED_PATHS and MD_SHARE_DIR in your configuration.
- Check the current versionRun the command to list the installed version of markdownify-mcp. If the version is older than 1.2.0, the system is at risk.
- Review which systems use markdownify-mcpList all services, containers, and AI agents that call or depend on markdownify-mcp. Note which ones can receive input from users or other untrusted sources.
- Upgrade markdownify-mcp to version 1.2.0Update the package using your package manager to version 1.2.0 or later. Apply the update to all systems and services that use it.
- Restart affected servicesRestart any service, container, or process that depends on markdownify-mcp to load the fixed version.
- Verify the fix is in placeConfirm that the installed version of markdownify-mcp is now 1.2.0 or later in all affected systems.
- Check logs for past misuseSearch your application and system logs for requests to markdownify-mcp that accessed files outside the allowed directories or that show unusual file paths. Look for timestamps before the upgrade.
- Assess what files were accessibleIf logs show suspicious access, review what sensitive files are stored near the allowed directories (sibling directories with the same prefix) and consider whether they may have been read.
How to confirm it is fixed: Confirm that markdownify-mcp is version 1.2.0 or later in all systems that use it by checking the package version in your package manager or container images.
SecurityElites Quick Fixes: copy and paste
npm: check installed version of markdownify-mcpfor this issue
npm list markdownify-mcppip: check installed version of markdownify-mcpfor this issue
pip show markdownify-mcpTest in a non-production environment first. General hardening examples use placeholder names and ports; change them to match your setup.
Let your AI coding assistant do the upgrade
Paste this into the coding assistant you already use, inside the project. It checks first and asks before it changes anything.
Instruction for your coding assistant
You are helping me fix a security vulnerability (CVE-2026-140424) in this project.\n\n1. Search the whole repository, including lock files, container files and CI configuration, for these packages and list every place they are pinned or installed:\n - markdownify-mcp: must be 1.2.0 or later
2. Tell me which version we use now and whether it is affected. Stop and ask me before changing anything.
3. After I agree, raise each one to the safe version, update the lock files, and keep every other dependency as it is.
4. Run the tests and tell me what failed.
5. Give me a short summary of the files you changed that I can put in the pull request.SecurityElites Incident Drill: could your team handle this?
Four questions to ask in your next team meeting. If any has no clear answer, that is the gap to close.
Ticket for your backlog
Paste into Jira, GitHub Issues or any tracker that reads Markdown.
Ready-made ticket
## markdownify-mcp can be tricked into reading files outside its allowed list (CVE-2026-140424)
**Severity:** High 8.7 | **SE Fix-First Score:** 48/100 | **Fix window:** Within 30 days
**Record:** SE-AIV-01898 https://securityelites.com/ai-vulnerabilities/cve-2026-140424-markdownify-mcp-can-be-tricked-into-reading-files-outside-its/
### Why this matters
An attacker who can send prompts to a system using markdownify-mcp can read files they should not be able to access. This includes sensitive data stored near allowed directories: private keys, database credentials, source code, or customer information. If the tool is part of an AI agent, an attacker can inject a prompt to make the agent read and reveal these files.
### What to do
1. Find where markdownify-mcp is installed
2. Check the current version
3. Review which systems use markdownify-mcp
4. Upgrade markdownify-mcp to version 1.2.0
5. Restart affected services
6. Verify the fix is in place
7. Check logs for past misuse
8. Assess what files were accessible
Full steps: https://securityelites.com/ai-vulnerabilities/cve-2026-140424-markdownify-mcp-can-be-tricked-into-reading-files-outside-its/
### Done when
- [ ] markdownify-mcp is at 1.2.0 or later everywhere it is installed
- [ ] Lock files, container images and CI configuration are updated
- [ ] Confirm that markdownify-mcp is version 1.2.0 or later in all systems that use it by checking the package version in your package manager or container images.
- [ ] Logs were checked for signs of earlier use
SecurityElites Fix Tracker
Record who owns this fix, the date it is due and when it is done, and see everything still open in one list. Free with a SecurityElites account.
Related vulnerabilities
The same kind of mistake in other AI tools
- ag2 and autogen shell tool can run any command via newline in command string High · CVE-2026-113663
- Flowise CSV and Airtable agents allow data theft via prompt injection Critical · CVE-2026-73487
- Flowise CSV Agent can run Python code sent by attackers Critical · CVE-2026-70477
- Flowise chatflow can be hijacked through unguarded configuration override High · CVE-2026-69258
- Flowise CSV Agent runs code from language model without checks Critical · CVE-2026-41264
Change history
- 1 Dec 2026: Made public
- 1 Dec 2026: Fixed version added, from the vendor's own CVE record
- 1 Dec 2026: Published
- 2 Dec 2026: Guide updated
Official record
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.
Weakness type: CWE-22
Use this record in your own tools
Get this record as JSON
curl https://securityelites.com/wp-json/se-aivd/v1/vulns/CVE-2026-140424For scanners and pipelines: OSV format · CycloneDX format · API guide · Email alerts · Fix tracker
The plain-language sections were written with AI from the official record, and the upgrade versions come directly from the official data. Last updated 3 Dec 2026. Read the vendor advisory before changing a production system.