Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
ReconCraft SVG/MathML element with event handler
-
DeliverySubmit payload to justhtml-sanitized input field
-
ExploitSanitizer clones element via selectedcontent projection
-
InstallEvent handler survives sanitization bypass
-
C2Victim user loads attacker-influenced page
-
ExecuteBrowser fires event handler
-
ImpactAttacker JavaScript executes in victim session
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 that the target application passes user-controlled HTML through justhtml's default sanitizer and renders that output to other users or to the same user in a context where script execution matters. The specific trigger is the selectedcontent projection code path - meaning the application must exercise the projection feature, either explicitly or as part of default sanitizer behavior. Limiting factors include: active user interaction is required (UI:A per CVSS 4.0), meaning a victim must load or interact with the attacker-influenced page; the attacker-supplied content must include SVG or MathML elements (plain HTML event handlers on standard elements are presumably sanitized correctly); and the application must not apply a secondary sanitization layer after justhtml. Applications that use justhtml solely for server-side rendering without user-supplied input, or that do not render output back to browsers, are not exposed. |
| Impact | The provided 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) reflects a network-exploitable, low-complexity flaw requiring active user interaction (UI:A), with impact confined to the subsequent system - the victim's browser context - at low confidentiality and integrity levels. The UI:A requirement is the primary risk limiter: exploitation depends on a victim visiting or interacting with attacker-influenced content. No KEV listing and no identified POC mean this is not confirmed as actively exploited. The real-world risk is meaningful for any web application that uses justhtml as a sanitization boundary and renders user-controlled HTML - stored XSS scenarios (where attacker content persists and is served to many users) carry higher practical risk than reflected scenarios. The low CVSS 4.0 score is appropriate: scope is bounded to browser-side JavaScript execution, and full system compromise is not achievable through this vector alone. EPSS data was not supplied; absent that signal, priority should be driven by whether the application accepts untrusted HTML and exposes it to other users. |
| Exploit ScenarioDerived | An attacker submits a crafted comment or rich-text field containing an SVG element with an onerror or onload event handler to a web application that uses justhtml for sanitization. The justhtml sanitizer processes the input but fails to strip the event handler when the SVG element passes through a selectedcontent projection clone step. The payload is stored in the database or reflected in a response, and when a victim user loads the page, the SVG event handler fires and executes attacker-controlled JavaScript in the victim's browser session, enabling session token theft or UI redress. No public POC has been identified, but the technique (SVG/MathML namespace event handler bypass) is a well-understood XSS class with many prior proof-of-concept patterns available publicly. |
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 before 3.11.0 allows remote unauthenticated attackers to execute arbitrary JavaScript in victims' browsers via SVG or MathML elements injected through selectedcontent projections. The default sanitizer fails to remove event handlers that are cloned and reinserted during the selectedcontent projection process, bypassing the library's intended sanitization guarantees. No public exploit code has been identified at the time of analysis, and a vendor patch (3.11.0) is available; EPSS data was not provided but the CVSS 4.0 score of 5.1 reflects the user-interaction requirement limiting opportunistic exploitation.
RemediationAI
Upgrade justhtml to version 3.11.0 or later, which addresses the event handler bypass in selectedcontent projections per the vendor advisory at https://github.com/EmilStenstrom/justhtml/security/advisories/GHSA-gjf2-f4jc-69xf. The patch is confirmed available from the vendor; the exact remediated version is 3.11.0 per EUVD-2026-64656. If an immediate upgrade is not possible, a compensating control is to strip or reject SVG and MathML elements entirely at the application layer before passing content to justhtml - this eliminates the foreign-content namespace bypass but may break legitimate use of inline SVG. Alternatively, post-processing output with an additional sanitization pass (e.g., a well-tested secondary library such as bleach or html-sanitizer) that explicitly targets event handler attributes in all XML namespaces can reduce exposure, though defense-in-depth layering adds maintenance overhead. Do not rely on the pre-3.11.0 justhtml sanitizer as a trust boundary for user-controlled HTML if SVG or MathML content is permitted.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
justhtml (CPE: cpe:2.3:a:emilstenstrom:justhtml:*:*:*:*:*:*:*:*) is a Python HTML sanitization library authored by Emil Stenstrom. The vulnerability is rooted in CWE-79 (Improper Neutralization of Input During Web Page Generation). The flaw specifically manifests in the library's handling of selectedcontent projections - a mechanism for cloning or reinserting DOM content into output. During this projection step, SVG and MathML elements containing event handler attributes (e.g., onload, onerror, onclick) are cloned into the output buffer without the sanitizer re-applying its event handler stripping logic. Because SVG and MathML are parsed in foreign-content mode by browsers, they can carry event handler attributes that differ from standard HTML attributes, making namespace-unaware sanitizers particularly susceptible to this class of bypass.
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-exploitable XSS requiring victim interaction (UI:R), scope change to browser (S:C), low C and I impact on victim session, no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
Lifecycle Timeline
1DescriptionCVE.org
justhtml before 3.11.0 contains a cross-site scripting vulnerability where the default sanitizer bypasses event handler removal in selectedcontent projections. Attackers can inject SVG or MathML elements with event handlers that are cloned and reinserted into output without sanitization, enabling stored or reflected XSS attacks.
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
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-64656
GHSA-h7rw-29pr-mcj6
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB