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
A new way to communicate
Ameeba Chat is built on encrypted identity, not personal profiles.
Message, call, share files, and coordinate with identities kept separate.
- • Encrypted identity
- • Ameeba Chat authenticates access
- • Aliases and categories
- • End-to-end encrypted chat, calls, and files
- • Secure notes for sensitive information
Private communication, rethought.
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.
