lxml_html_clean: Cleaner(safe_attrs_only=False) keeps javascript: in iframe srcdoc and SVG animation values
CVE-2026-141556
Summary When safeattrsonly=False, the Cleaner still tries to remove JavaScript (javascript=True is the default): it deletes on attributes (lxmlhtmlclean/clean.py:381-389 in 0.4.6) and blanks javascript: URLs through doc.rewritelinks(self.removejavascriptlink) (clean.py:390). rewritelinks only visits the attributes listed in lxml.html.defs.linkattrs, and two kinds of attributes that can carry script are not on that list: 1. srcdoc on . Its value is a complete HTML document that the browser renders inside the frame. With hostwhitelist set, the itself is kept, and srcdoc takes priority over src, so the whitelisted src no longer matters. 2. to, values (and from, by) on the SVG animation elements and . With attributeName="href" they set the href of the enclosing SVG at runtime, so javascript: ends up on the link even though the Cleaner removed it from href itself. This one also needs removeunknowntags=False, otherwise / are dropped. This is the same root cause as GHSA-4jhm-jv67-739f (xlink:href with safeattrsonly=False): an attribute missing from linkattrs (CWE-184). In both configurations below the same Cleaner turns href="javascript:..." into href="" and deletes onclick, so script…
Assessment
- CVSS
- 4.7 (v3.1)
- Severity
- Medium
- EPSS
- 0% chance of exploitation in the next 30 days
- Known exploited
- Not listed in CISA KEV
- Exploit availability
- Nothing found in Exploit-DB, Metasploit, Nuclei or public PoC repositories
- Published
- 3 December 2026
- Last updated
- 3 December 2026
- Affected
- fedora-python · lxml_html_clean · lxml-html-clean
- Weakness
- CWE-184, CWE-79
- Assigner
- GitHub_M
CVSS vectorCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
At the source
References
- https://github.com/fedora-python/lxml_html_clean/security/advisories/GHSA-5gvf-7wqf-r4cv
- https://nvd.nist.gov/vuln/detail/CVE-2026-141556
- https://github.com/fedora-python/lxml_html_clean/commit/883db209e04222a1959f7773f5bde1da0224fbe1
- https://github.com/fedora-python/lxml_html_clean/releases/tag/0.4.7
- https://github.com/advisories/GHSA-5gvf-7wqf-r4cv
Community proofs of concept
No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.
Submit a proof of concept
Only for publicly disclosed vulnerabilities, and only material from testing you were authorised to perform. This platform does not buy, sell, or broker exploits — see earning from vulnerability research for legitimate bounty programs. Submissions are reviewed before they appear. Text only; do not include live credentials, personal data, or anything targeting systems you are not permitted to test.
Query this programmatically
Agents can read this through the MCP endpoint, or over HTTP:
curl https://cve.zerocrew.in/api/cve/CVE-2026-141556