Overview
The CVE-2025-58358 vulnerability pertains to Markdownify, a Model Context Protocol server widely utilized for converting a variety of data types to Markdown. This vulnerability is impactful due to its potential to allow an attacker to inject arbitrary system commands leading to remote code execution. Markdownify’s broad usage makes this vulnerability a significant cybersecurity concern.
Vulnerability Summary
CVE ID: CVE-2025-58358
Severity: High (7.5 CVSS Score)
Attack Vector: Network
Privileges Required: None
User Interaction: None
Impact: The possible compromise of the system and data leakage
Affected Products
Share secrets securely
Ameeba is private infrastructure for communication and sensitive work built on encrypted identity instead of exposed corporate identity systems.
Passwords, credentials, confidential files, screenshots, internal discussions, sensitive AI context, and private coordination should not become exposed across ordinary communication platforms.
- • Encrypted identity
- • Private Spaces for organizations and teams
- • End-to-end encrypted chat, calls, files, and notes
- • Sensitive AI work and protected collaboration
- • Built for information that cannot leak
Our mission is to secure human work alongside AI.
Product | Affected Versions
Markdownify | Versions below 0.0.2
How the Exploit Works
The vulnerability is a result of the unsanitized use of input parameters within a call to child_process.exec in Markdownify. An attacker can exploit this vulnerability by injecting arbitrary system commands. The server constructs and executes shell commands using unvalidated user input directly within command-line strings which introduces the possibility of shell metacharacter injection (|, >, &&, etc.). This could lead to remote code execution under the server process’s privileges.
Conceptual Example Code
This is a conceptual example of how an attacker might exploit the vulnerability. The actual malicious payload would depend on the specific system and goals of the attacker.
POST /Markdownify/convert HTTP/1.1
Host: target.example.com
Content-Type: application/json
{ "input": "validMarkdown; rm -rf /;" }
In this example, the attacker sends a valid Markdown input followed by a semicolon (;) to separate the commands, then injects a harmful command (`rm -rf /;`) that would delete all files in the system if executed.
Mitigation
The issue is fixed in version 0.0.2 of Markdownify. It is strongly recommended to update to this version or later. If updating is not immediately possible, utilizing a Web Application Firewall (WAF) or Intrusion Detection System (IDS) can provide temporary mitigation.
