CVE-2021-47837
7.2Markdownify · Markdownify
Markdownify 1.2.0 is vulnerable to persistent cross-site scripting, allowing attackers to execute arbitrary code via maliciously crafted markdown files.
Executive summary
A persistent cross-site scripting vulnerability in Markdownify 1.2.0 allows attackers to achieve remote code execution through the injection of malicious payloads into markdown files.
Vulnerability
The application fails to properly neutralize user-supplied input within markdown files, leading to a persistent cross-site scripting (CWE-79) condition. An attacker can leverage this flaw to execute arbitrary JavaScript within the application context, which, due to the nature of the software, enables remote code execution on the host machine.
Business impact
Successful exploitation of this vulnerability poses a severe risk to the confidentiality, integrity, and availability of the host system. By executing arbitrary code, an attacker could gain full control over the local environment, potentially leading to unauthorized access to sensitive files, data exfiltration, or the installation of persistent malware. Although the CVSS score is 7.2, the potential for remote code execution elevates the operational urgency significantly.
Remediation
Immediate Action: Users should immediately upgrade to a version of Markdownify that addresses this vulnerability, or discontinue use of the software until a secure update is verified.
Proactive Monitoring: Security teams should monitor file system activity for unexpected child process creation or unauthorized network connections originating from the Markdownify application.
Compensating Controls: Implement endpoint protection solutions capable of detecting and blocking malicious script execution and unauthorized shell command invocations.
Exploitation status
Public Exploit Available: Yes, a public exploit is available via the Exploit-DB entry (EDB-ID 49835).
Analyst recommendation
This vulnerability represents a significant security risk due to the potential for remote code execution. Administrators must prioritize updating the application to the latest secure version. Until an update is applied, users should avoid opening untrusted or externally sourced markdown files within the application to prevent accidental payload execution.
Sources
Originally found and disclosed by TaurusOmar, per the CVE Program record.
- ExploitDB-49835 Exploit / PoC
- Markdownify GitHub Repository
- Proof of Concept Video Exploit / PoC
- VulnCheck Advisory: Markdownify 1.2.0 - Persistent Cross-Site Scripting Third-party advisory