Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft HTML with backtick-laden pre element
-
DeliveryApplication calls to_markdown() on user input
-
ExploitFixed three-backtick fence broken by backtick run
-
ExecutionDecoded HTML entities escape code fence as raw HTML
-
PersistVictim views page rendered by CommonMark/GFM renderer
-
ImpactXSS payload executes in victim browser
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization HTML tag escaping
MITRE ATT&CK
1 technique across 1 tactic: Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires three chained conditions: (1) the application passes attacker-controlled HTML that includes |
| Impact | The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N, score 5.1) accurately reflects the multi-hop nature of this vulnerability: impact is limited to the subsequent system (browser/renderer) and requires active user interaction to render the crafted Markdown. No EPSS data is available, and the vulnerability is not listed in CISA KEV, indicating no confirmed widespread active exploitation. However, a detailed PoC with working Python code is embedded in the public GHSA advisory, lowering the bar for exploitation. The realistic risk is constrained to applications that (1) accept attacker-controlled HTML containing |
| Exploit ScenarioDerived | An attacker submits a comment or document containing |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 23, 2026
Cross-site scripting in justhtml versions before 1.13.0 allows attackers who control <pre> element content to break out of fixed-length Markdown code fences and inject raw HTML into the serialized output. When an application passes attacker-supplied HTML through JustHTML(..., sanitize=True).to_markdown() and a downstream CommonMark or GFM renderer processes the result with raw-HTML enabled, the injected script executes in the victim's browser. A proof-of-concept with full reproduction steps is publicly available in the GHSA advisory; no public exploit identified at time of analysis beyond that PoC.
RemediationAI
Upgrade justhtml to version 1.13.0 or later via pip install --upgrade justhtml; the fix is confirmed in patch commit f35f8f723c713bd8f912d86e9ec6881275ff5af9 (https://github.com/EmilStenstrom/justhtml/commit/f35f8f723c713bd8f912d86e9ec6881275ff5af9). The vendor advisory is at https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-5vp3-3cg6-2rq3. If an immediate upgrade is not possible, the most effective compensating control is to sanitize or strip <pre> element content before passing it to to_markdown(), or to disable raw HTML in the downstream Markdown renderer (e.g., set unsafe: false in marked.js or use html_blocks extension disabled in Python-Markdown). Disabling raw HTML in the renderer breaks the exploit chain regardless of fence escaping, but may break legitimate formatting in the application. Alternatively, avoid calling to_markdown() on attacker-controlled input until the patch is applied.
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 (pip/justhtml, CPE: cpe:2.3:a:emilstenstrom:justhtml:*:*:*:*:*:*:*:*) is a Python library that parses HTML and serializes it to safe Markdown. The root cause is CWE-80 (Improper Neutralization of Script-Related HTML Tags) in the to_markdown() <pre> serialization path. That path extracts decoded text from a <pre> subtree, wraps it with a hardcoded three-backtick fence delimiter, and writes it directly to output. Because the fence length is fixed rather than dynamically chosen to exceed the longest backtick run in the content, an attacker-supplied run of three or more backticks terminates the fence prematurely. Any decoded HTML-like entities (e.g., <img src=x onerror=alert(1)>) that follow appear outside the code block as raw HTML. The v1.12.0 hardening applied HTML escaping to regular text nodes but left the <pre> path unprotected, making this a targeted bypass of that prior fix.
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:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N
Network-delivered payload requires victim to render Markdown (UI:R); scope changes to browser context (S:C); XSS yields limited confidentiality and integrity impact only.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
justhtml versions before 1.13.0 contain a cross-site scripting vulnerability in the to_markdown() function when serializing attacker-controlled pre content. Attackers can place backticks inside sanitized pre elements to break out of fixed-length code fences, allowing raw HTML to execute when the generated Markdown is rendered by CommonMark or GFM-style renderers.
Blast Radius
ecosystem impact- 1 pypi packages depend on justhtml (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 1.13.0.
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
Sanitizer bypass in the justhtml Python library (versions <= 1.11.0) allows attacker-controlled input to survive as raw
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
Sanitization bypass in justhtml (Python HTML sanitization library) before version 1.17.0 enables cross-site scripting in
EUVD-2026-64653
GHSA-q3jf-9wv7-p29w
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB