MEDIUMCVSS v3.1 4.7Vulnerability

CVE-2026-141555

## Summary With `comments=False`, the Cleaner removes only IE conditional comments (`lxml_html_clean/clean.py:363-366`, `kill_conditional_comments` at `599-607`) and keeps every other comment (`421-422`, `511-513`). libxml2 parses the content of `<noscript>` as markup, so `<!--</noscript><img src=x onerror=...>-->` is a single comment node and is returned unchanged. A browser with scripting enabled treats `<noscript>` as raw text, closes it at the first `</noscript>`, and parses the rest as live markup. The `<img onerror>` handler runs when the cleaned output is rendered in a page, with no click. The default `Cleaner()` is not affected, because it removes all comments. The same comment outside `<noscript>` stays an inert comment in the browser. This is the parser difference from GHSA-5jfw-gq64-q45f. The `</noscript` check added for it (`clean.py:668-670`) is applied to `<style>` text only. Tested on lxml_html_clean 0.4.6 from PyPI (same commit as `main`), lxml 6.1.3, libxml2 2.14.6, Python 3.12.16, Chromium 159.0.8154.13 headless, with no network. The output is byte-identical on 0.1.0, 0.2.0, 0.4.0, 0.4.4 (lxml 5.1.0, libxml2 2.12.3) and 0.4.5. ## Reproduction ```python from lxml_html_clean import Cleaner P = '''<noscript><!--</noscript><img src=x onerror="window.__fired=(window.__fired||0)+1;document.title='FIRED'">--></noscript>''' print(Cleaner(comments=False).clean_html(P)) print(Cleaner().clean_html(P)) ``` ```text [A1] claim: comment in noscript, comments=False out: <noscript><!--</noscript><img src=x onerror="window.__fired=(window.__fired||0)+1;document.title='FIRED'">--></noscript> [A2] same input, default Cleaner() out: <noscript></noscript> [A3] same comment outside noscript, comments=False out: <div><!--</noscript><img src=x onerror="window.__fired=(window.__fired||0)+1;document.title='FIRED'">--></div> ``` Each output was placed inside a `<div>` of a static page and loaded in Chromium: ```text A1.html title=FIRED fired

Properties

Severity
medium
Summary
lxml_html_clean: Cleaner(comments=False) keeps a comment that closes <noscript> in the browser, which allows XSS
Nvd fetched at
2026-12-04T15:00:48.841578+00:00
Epss score
0.00485
Cvss severity
MEDIUM
Cvss score
4.7
Retrieved at
2026-12-04T15:02:58+00:00
Ghsa published
2026-12-03T02:40:18Z
Source url
https://github.com/advisories/GHSA-vfhw-gfwp-vxfj
Ghsa updated
2026-12-03T02:40:21Z
Ghsa id
GHSA-vfhw-gfwp-vxfj
Last source
FIRST EPSS
Score
4.7
Cvss version
3.1
Cve id
CVE-2026-141555
Cvss vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
First seen by Signal
2026-12-02T22:45:38+00:00
Name
CVE-2026-141555
Is ghsa only
false
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N

Related Entities (3)

AFFECTS (1)

→[Software]pip/lxml-html-clean

VULNERABLE_TO (1)

←[Software]pip/lxml-html-clean

Related research

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-141555 (CVSS v3.1 4.7) — Ninja Signal Threat Intelligence | Ninja Signal