Bug 2589437

Summary: CVE-2026-141555 python-lxml-html-clean: lxml-html-clean: Arbitrary script execution via improper HTML comment handling [fedora-all]
Product: [Fedora] Fedora Reporter: Ganesh <gnaik>
Component: python-lxml-html-cleanAssignee: Lumír Balhar <lbalhar>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: lbalhar, python-packagers-sig
Target Milestone: ---Keywords: Security, SecurityTracking
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: {"flaws": ["9df8de47-4351-4626-94c5-5964dce89c88"]}
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2589067    

Description Ganesh 2026-12-03 06:26:39 UTC
Disclaimer: Community trackers are created by Red Hat Product Security team on a best effort basis. Package maintainers are required to ascertain if the flaw indeed affects their package, before starting the update process.

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.