CVE Feed
4.7 Medium

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
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

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
Before you submit *

Query this programmatically

Agents can read this through the MCP endpoint, or over HTTP:

curl https://cve.zerocrew.in/api/cve/CVE-2026-141556