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.

Project Subscriptions

Vendors Products
Fedora-python Subscribe
Lxml Html Clean Subscribe
Advisories
Source ID Title
Github GHSA Github GHSA GHSA-vfhw-gfwp-vxfj lxml_html_clean: Cleaner(comments=False) keeps a comment that closes <noscript> in the browser, which allows XSS
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Thu, 03 Dec 2026 15:15:00 +0000

Type Values Removed Values Added
First Time appeared Fedora-python
Fedora-python lxml Html Clean
Vendors & Products Fedora-python
Fedora-python lxml Html Clean

Thu, 03 Dec 2026 12:30:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

threat_severity

Moderate


Thu, 03 Dec 2026 11:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 02 Dec 2026 20:30:00 +0000

Type Values Removed Values Added
Description 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.
Title lxml-html-clean: Cleaner(comments=False) keeps a comment that closes <noscript> in the browser, which allows XSS
Weaknesses CWE-79
References
Metrics cvssV3_1

{'score': 4.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-12-02T23:07:46.450Z

Reserved: 2026-12-01T21:46:37.103Z

Link: CVE-2026-141555

cve-icon Vulnrichment

Updated: 2026-12-02T23:07:41.705Z

cve-icon NVD

Status : Received

Published: 2026-12-02T21:18:11.160

Modified: 2026-12-03T00:18:06.240

Link: CVE-2026-141555

cve-icon Redhat

Severity : Moderate

Publid Date: 2026-12-02T20:09:26Z

Links: CVE-2026-141555 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-12-03T15:00:10Z

Weaknesses