Impact
justhtml versions 1.11.0 and earlier do not escape angle brackets in text nodes when converting to Markdown. The conversion preserves < and > characters, allowing untrusted input that is safe in HTML rendering to be emitted as raw HTML in the Markdown output. This can be used to inject and execute malicious scripts when the Markdown is later rendered, enabling cross‑site scripting attacks. The likely attack vector is an attacker placing malicious payloads in text nodes, RCDATA/RAWTEXT elements, or entity‑decoded text that bypasses the sanitization step.
Affected Systems
The vulnerable code is in EmilStenstrom’s justhtml library. All releases up to and including 1.11.0 are affected. Version 1.12.0 and later contain the fix that correctly escapes HTML‑significant characters during Markdown conversion.
Risk and Exploitability
The CVSS score of 9.3 classifies this flaw as Critical, indicating a high risk of exploitation. While an EPSS score is not available, the flaw is not listed in the CISA KEV catalog, so no known public exploits are documented. However, the vulnerability can be exploited by supplying crafted input to the to_markdown() function, and the resulting Markdown can lead to XSS when rendered in a browser.
OpenCVE Enrichment