Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSubmit crafted noscript breakout comment to sanitizing app
-
ExploitSurvive Cleaner(comments=False) as inert comment node
-
ExecutionVictim browser reparses noscript body as live markup
-
ImpactExecute attacker JavaScript in victim's 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 the consuming application to use Cleaner(comments=False) - the non-default mode that retains comments; the default Cleaner() removes all comments and is not affected. The attacker must supply HTML containing a comment nested inside a raw-text or escapable-raw-text element (noscript, and per the fix also noembed, noframes, iframe, xmp, title, textarea, style, script, plaintext) whose text smuggles a matching end tag (e.g. '<!--</noscript><img src=x onerror=...>-->'), exploiting the libxml2-versus-browser parser differential. Limiting factors: the vulnerable comments=False configuration is not the default; the cleaned output must later be rendered in a browser with scripting enabled (user interaction / UI:R); and impact is confined to client-side script execution in the victim's rendering context (low confidentiality/integrity, no availability impact). No special attacker authentication is needed to submit the payload (PR:N). |
| Impact | Signals point to a genuine but bounded issue rather than an urgent emergency. The CVSS 3.1 base vector (AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N, 4.7 medium) already encodes the limiters: no authentication to supply the payload (PR:N), but high attack complexity (AC:H) and required user interaction (UI:R), with only low confidentiality and integrity impact and a scope change into the rendering browser. No EPSS score was provided and the input shows no CISA KEV listing, so this is not confirmed as actively exploited. A public PoC reference exists - the GHSA advisory includes a byte-level reproduction tested on Chromium 159 headless - so exploitability is well demonstrated even though it is not packaged as a weaponized exploit. The vuln.today decision label is 'this_month', consistent with a moderate, non-emergency priority. The single largest real-world limiter is not in the CVSS vector at all: the flaw only affects the non-default Cleaner(comments=False) configuration; the default Cleaner() strips all comments and was never affected, which materially narrows the exposed population. Net: a real XSS worth patching this cycle, not a high-CVSS-but-illusory issue, but far from an internet-wide emergency given AC:H, UI:R, low impacts, and the non-default-config requirement. |
| Exploit ScenarioDerived | An application that sanitizes user-submitted HTML with lxml-html-clean's Cleaner(comments=False) accepts attacker content such as '<noscript><!--</noscript><img src=x onerror=...>--></noscript>'. libxml2 preserves this as one inert comment node, so it survives cleaning, but when another user later renders the stored output in a scripting-enabled browser the noscript is closed inside the comment and the img onerror handler fires with no click. A tested public PoC for this behavior is published in the GHSA advisory. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 02, 2026
Comment-preserving HTML sanitization in lxml-html-clean 0.4.6 and earlier lets attacker-supplied markup break out of a raw-text element and execute script when the cleaned output is rendered. The flaw only manifests when an application instantiates Cleaner(comments=False); the default Cleaner() strips all comments and is unaffected. A comment whose text smuggles a matching end tag (for example '<!--</noscript><img src=x onerror=...>-->' nested inside <noscript>) survives libxml2 parsing as an inert node but is reinterpreted by a scripting-enabled browser as the close of the element plus live markup, so the handler fires without a click. Severity is bounded (CVSS 4.7, AC:H/UI:R/S:C/C:L/I:L/A:N, PR:N) and the maintainers' advisory contains a reproduction payload; no confirmed, weaponized exploit code was identified at time of analysis. Patch status: Vendor-released patch: 0.4.7.
RemediationAI
Upgrade lxml-html-clean to 0.4.7 or later (release at https://github.com/fedora-python/lxml_html_clean/releases/tag/0.4.7), which drops any retained comment containing an end tag matching a raw-text ancestor; the upstream commit is https://github.com/fedora-python/lxml_html_clean/commit/c83f0befb32505782858f56a17ac572fbf979f62 and the vendor advisory is https://github.com/fedora-python/lxml_html_clean/security/advisories/GHSA-vfhw-gfwp-vxfj. Where upgrading is not immediately possible, the practical stop-gap is to stop constructing Cleaner(comments=False): use the default Cleaner(), which strips all comments and is unaffected, at the cost of no longer preserving comments or IE conditional comments in the sanitized output. There is no documented way to keep comment retention safe on 0.4.6 short of post-filtering the cleaned tree for comments that contain an end tag matching an ancestor raw-text element (noscript, noembed, noframes, iframe, xmp, title, textarea, style, script, plaintext), which reimplements the upstream fix. Because exploitation also requires the cleaned HTML to be rendered in a scripting-enabled browser, auditing which call sites pass comments=False and how their output reaches the client will identify the exposed paths.
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
lxml-html-clean is a Python HTML sanitizer built on lxml, which delegates parsing to libxml2. The root cause is a parser differential (CWE-79, cross-site scripting) between the HTML parsing model of libxml2 and that of browsers. libxml2 parses the content of raw-text elements such as <noscript> as ordinary markup, so a comment containing an end tag like '<!--</noscript><img src=x onerror=...>-->' is captured as a single, seemingly harmless comment node. A browser with scripting enabled instead treats the <noscript> body as raw text, so the literal '</noscript>' inside the comment terminates the element and everything after it is parsed as live markup. In the affected configuration, kill_conditional_comments() in lxml_html_clean/clean.py drops only IE conditional comments and retains other comments; the earlier hardening for GHSA-5jfw-gq64-q45f added a '</noscript' check that was applied to <style> text only, not to retained comment nodes. The 0.4.7 fix generalises the check across raw-text and escapable-raw-text ancestors (noscript, noembed, noframes, iframe, xmp, title, textarea, style, script, plaintext) and drops any retained comment containing an end tag matching such an ancestor, while preserving benign comments. The trigger requires the sanitizer consumer to opt into comment retention and to render the cleaned output in a browser; nothing in the available sources describes a server-side impact.
Know when Python 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
AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Attacker needs no auth to submit HTML (PR:N) but relies on a parser differential and a non-default comments=False config (AC:H), a victim must render output (UI:R), and stored XSS escapes into the browser (S:C) with low C/I impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
lxml-html-clean is an HTML cleaning library for Python. Prior to 0.4.7, Cleaner in lxml_html_clean/clean.py configured with comments=False uses kill_conditional_comments to remove conditional comments but retains other comments inside noscript. libxml2 parses the noscript content as markup and retains the comment as a node, while a browser with scripting enabled treats the content as raw text. A closing noscript tag inside a retained comment can terminate the element in the browser, causing following attacker-controlled markup to execute when cleaned HTML is rendered, without a click. The default Cleaner removes all comments, and the same comment outside noscript remains inert. An earlier check for a noscript closing tag applies to style text rather than retained comments. This issue is fixed in 0.4.7.
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.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-141830
GHSA-vfhw-gfwp-vxfj
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB