
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-141555 is a Cross-Site Scripting (XSS) vulnerability in the lxml-html-clean Python HTML cleaning library (package: lxml-html-clean on PyPI). When the Cleaner class is configured with comments=False, it fails to remove certain HTML comments nested inside <noscript> elements that contain a closing </noscript> tag, allowing attacker-controlled markup to execute in a victim's browser. All versions prior to 0.4.7 are affected (tested on 0.1.0, 0.2.0, 0.4.0, 0.4.4, 0.4.5, and 0.4.6). The advisory was published on November 26, 2026, and the fix was released the same day. The CVSS v3.1 base score is 4.7 (Medium) (GitHub Advisory).
The root cause is a parser differential between libxml2 and browsers, classified as CWE-79 (Improper Neutralization of Input During Web Page Generation). libxml2 parses the content of <noscript> as markup, treating <!--</noscript><img src=x onerror=...>--> as a single, inert comment node. However, a scripting-enabled browser treats <noscript> content as raw text, so it closes the element at the first literal </noscript> string — even inside a comment — and then parses the following attacker-controlled markup as live HTML. The Cleaner with comments=False only removes IE conditional comments via kill_conditional_comments() and retains all other comments; an existing check for </noscript> in clean.py only covered <style> text, not retained comment nodes. This is the same class of parser differential as GHSA-5jfw-gq64-q45f. The vulnerability requires no authentication and no user click — only that the victim's browser renders the cleaned HTML with scripting enabled (GitHub Advisory, Fix Commit).
Successful exploitation allows an unauthenticated remote attacker to execute arbitrary JavaScript in the browser of any user who views a page rendering the cleaned HTML output. The impact is limited to low confidentiality and low integrity (e.g., session token theft, page content manipulation, phishing), with no direct availability impact. The scope is changed, meaning the XSS executes in the context of the page hosting the cleaned content rather than the application processing it. Applications that accept untrusted HTML, sanitize it with Cleaner(comments=False), and then render the output to other users are at risk of stored or reflected XSS attacks (GitHub Advisory).
A proof-of-concept (PoC) reproducer is publicly available in the GitHub Security Advisory, consisting of a short Python snippet that demonstrates the bypass locally. The PoC was confirmed to fire an onerror handler in Chromium headless (version 159.0.8154.13), with the browser test showing fired=1 and title=FIRED. The EPSS score is 0.0, and there is no evidence of in-the-wild exploitation at this time. The vulnerability is not listed in the CISA KEV catalog. Exploitation requires high attack complexity (the attacker must control HTML input to the cleaner and the output must be rendered in a scripting-enabled browser), but no authentication or user click is needed (GitHub Advisory).
lxml_html_clean.Cleaner(comments=False) on a version prior to 0.4.7, and renders the cleaned output to other users.</noscript> tag inside a comment within a <noscript> element, followed by an executable element:<noscript><!--</noscript><img src=x onerror="alert(document.cookie)">--></noscript>Cleaner(comments=False) retains the comment node because libxml2 treats it as a single inert comment inside <noscript>. The kill_conditional_comments function does not remove it.<noscript> content as raw text, terminates the element at the </noscript> inside the comment, and parses the <img onerror=...> as live markup.onerror handler fires automatically without any user interaction, achieving XSS in the victim's browser context (GitHub Advisory).<!--</noscript> or <!--</{raw-text-element}> in POST body or URL parameters submitted to HTML-accepting endpoints.<noscript> combined with HTML comment syntax (<!--) and closing tags like </noscript>, </iframe>, </textarea>, etc.<noscript><!-- combined with onerror, onload, or other JavaScript event handlers.onerror or similar event handlers on elements like <img src=x>.Upgrade lxml-html-clean to version 0.4.7 or later, which drops comments that contain an end tag that would close a raw-text ancestor element (noscript, noembed, noframes, iframe, xmp, title, textarea, style, script, plaintext) (Fix Commit, Release 0.4.7). As an immediate workaround, avoid using Cleaner(comments=False) when processing untrusted HTML — the default Cleaner() (which removes all comments) is not affected. Additionally, apply a strict Content Security Policy (CSP) to pages that render user-supplied HTML to limit the impact of any XSS execution. Audit all code paths that call lxml_html_clean with comments=False and review any cleaned HTML containing <noscript> elements.
The vulnerability was reported privately by researcher gistrec via GitHub's private vulnerability reporting feature, and remediated by maintainer frenzymadness with assistance from Claude Opus 4.8. The advisory notes this is the same class of parser differential as the previously disclosed GHSA-5jfw-gq64-q45f, which had only been addressed for <style> text content. No significant broader media coverage or social media discussion has been identified at this time (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."