Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit untrusted HTML with encoded/raw-text payload
-
DeliveryApp parses and calls to_markdown()
-
ExploitAngle brackets emitted unescaped as raw HTML
-
ExecutionMarkdown rendered to HTML for victim
-
ImpactInjected script executes in victim browser
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires an application that (1) uses justhtml's to_markdown() converter on attacker-influenced HTML and (2) renders the resulting Markdown back into HTML that is served to victims - the vulnerability is inert if the Markdown is never rendered as HTML. The specific triggering inputs are text nodes containing HTML-significant characters, most reliably entity-decoded text (e.g. <script>) or text inside RCDATA/RAWTEXT-parsed elements: <title>, <textarea>, <noscript>, and <plaintext>. Limiting factors: it does not affect the to_html() output path, it does not apply to real <script>/<style> DOM elements (dropped unless html_passthrough=True), and actual code execution depends on a victim viewing the rendered output in a browser rather than on the parse step alone. |
| Impact | The supplied CVSS 4.0 vector (9.3, AV:N/AC:L/AT:N/PR:N/UI:N with VC:H/VI:H/VA:H) rates this Critical, but that scoring appears aggressive for a stored/reflected XSS sanitizer bypass: real impact is confined to the browser context of a victim who renders the Markdown, exploitation realistically requires that downstream rendering (a form of user/system interaction), and availability impact (VA:H) is not well supported by the described behavior. EPSS is not provided in the input, and the CVE is not listed in CISA KEV, so there is no evidence of active exploitation - the elevated signal here is the existence of a published PoC, not in-the-wild use. This is a legitimate priority for any application that feeds untrusted HTML through justhtml's to_markdown() and then renders the result, but the blanket VC:H/VI:H/VA:H should be treated with caution; a more defensible assessment is a medium-severity XSS with scope change (see assessed vectors). No conflict exists on the attack vector (network is plausible), but the impact metrics are the point of divergence. |
| Exploit ScenarioDerived | An attacker submits content such as <title><img src=x onerror=alert(1)></title> or entity-encoded markup to an application that stores it, parses it with justhtml, and publishes it via to_markdown(); the angle brackets survive unescaped, so when the Markdown is rendered to HTML the injected <img onerror> executes JavaScript in a victim's browser. A proof-of-concept demonstrating the general case (<p><img src=x onerror=alert(1)></p>) is published in the vendor advisory, lowering the bar to reproduce. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 23, 2026
Sanitizer bypass in the justhtml Python library (versions <= 1.11.0) allows attacker-controlled input to survive as raw HTML in the output of to_markdown(), enabling cross-site scripting when that Markdown is later rendered. Although to_html() safely neutralizes the same input, the Markdown serializer escapes only a handful of Markdown metacharacters and leaves angle brackets (< and >) intact, so entity-decoded text (e.g. <script>) or text from RCDATA/RAWTEXT elements like <title>, <textarea>, <noscript>, and <plaintext> is emitted verbatim. Publicly available exploit code exists (a proof-of-concept is published in the vendor advisory), and the flaw is fixed in 1.12.0.
RemediationAI
Vendor-released patch: 1.12.0 - upgrade justhtml to 1.12.0 or later (pip install --upgrade justhtml) as the primary fix; see GHSA-3rcm-vjrc-p45j. If immediate upgrade is not possible, the actionable compensating controls are to treat to_markdown() output as untrusted and run it through a downstream HTML sanitizer after it is rendered to HTML (e.g. sanitize the rendered output with an allowlist-based sanitizer), or avoid the to_markdown() path entirely and use to_html() (which already neutralizes this input) where a Markdown intermediary is not strictly required; the trade-off is added processing and loss of the Markdown conversion feature. Do not rely on html_passthrough remaining False as a mitigation, since the bypass stems from text-node serialization rather than passthrough of real script elements. Confirm the fix version against the vendor advisory before deploying.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
justhtml is a Python HTML parsing and sanitization library (pip package 'justhtml', maintainer emilstenstrom) whose to_markdown() converter turns a parsed DOM into Markdown. The root cause is a CWE-79 (Improper Neutralization of Input During Web Page Generation) failure in the Markdown text-node serializer: it applies Markdown metacharacter escaping but does not encode HTML-significant characters, so '<' and '>' pass through unescaped. Because HTML parsing entity-decodes text and treats the contents of RCDATA/RAWTEXT-parsed elements (<title>, <textarea>, <noscript>, <plaintext>) as text rather than markup, strings that were harmless in the DOM are reconstituted as live HTML tags in the Markdown. Note that genuine <script>/<style> elements are already dropped by to_markdown() unless html_passthrough=True, so this is specifically about text content that becomes markup, not passthrough of real script nodes.
Know when Justhtml gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Sanitizer-bypass XSS: network-reachable, no privileges, but a victim must render the output (UI:R); scope changes to the browser (S:C) with limited C/I and no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
2DescriptionCVE.org
justhtml versions <= 1.11.0 (fixed in 1.12.0) do not sufficiently escape HTML-significant characters (angle brackets) in text nodes when converting a parsed document to Markdown via to_markdown(). While a small set of Markdown metacharacters are escaped, characters such as < and > are preserved, so untrusted input that is safe in to_html() - including entity-decoded text (e.g. <script>) or text from RCDATA/RAWTEXT-parsed elements like <title>, <textarea>, <noscript>, and <plaintext> - can be emitted as raw HTML in the Markdown output, enabling a sanitizer bypass and potential cross-site scripting when that output is rendered.
Executive ViewAI
The justhtml Python library (versions ≤1.11.0) contains a critical cross-site scripting vulnerability that bypasses the library's sanitization controls, allowing attackers to inject malicious code through the markdown conversion function. Any organization using this library to process user-generated content faces immediate risk of account compromise, data theft, and reputational damage. This vulnerability requires emergency patching within 24 hours.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
Uncontrolled recursion in the justhtml Python HTML parsing library (all versions through 1.9.1) allows any remote unauth
Cross-site scripting via HTML sanitization bypass affects justhtml (a Python HTML parsing/sanitization library by EmilSt
Sanitization bypass in justhtml (a Python HTML/Markdown sanitization library) before 1.15.0 lets attacker-controlled inp
Uncontrolled resource consumption in justhtml before 1.18.0 enables denial-of-service conditions through CPU and memory
Cross-site scripting in justhtml 0.9.0-1.21.0 allows an attacker who can control the text content of HTML code or pre el
Cross-site scripting in justhtml before 3.11.0 allows remote unauthenticated attackers to execute arbitrary JavaScript i
Mutation XSS in justhtml (versions ≤1.11.0) allows injection of arbitrary HTML into serialized output when applications
Mutation XSS (mXSS) in justhtml 1.13.0 and earlier enables markup injection bypass against applications using non-defaul
Cross-site scripting in justhtml versions before 1.13.0 allows attackers who control `<pre>` element content to break ou
Sanitization bypass in justhtml (Python HTML sanitization library) before version 1.17.0 enables cross-site scripting in
EUVD-2026-64659
GHSA-wf6m-786j-gxrr
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB