CVE-2026-141556 - lxml-html-clean: Cleaner(safe_attrs_only=False) keeps javascript: in iframe srcdoc and SVG animation values
Vulnerability · Reported by NVD · · CWE-184, CWE-79
- Severity
- Medium Risk score 47/100
- CVSS
- 4.7 v3.1 · from NVD
- Exploit chance (EPSS)
- – Not available yet
- Known exploited
- No Not in CISA KEV
Summary
lxml-html-clean is an HTML cleaning library for Python. In versions through 0.4.6, Cleaner in lxml_html_clean/clean.py configured with safe_attrs_only=False removes JavaScript links using rewrite_links, which visits only attributes in lxml.html.defs.link_attrs and misses iframe srcdoc and SVG animation attributes. When an iframe is retained through host_whitelist, srcdoc takes priority over its source and can cause attacker-controlled HTML to run without a click. With remove_unknown_tags=False, SVG set or animate elements can use attributeName and attributes such as to, from, by, or values to change a link destination to a JavaScript URL that runs when clicked. This vulnerability is fixed in 0.4.7.
How this vulnerability can be exploited
An attacker can exploit this vulnerability remotely over the network, without any login, and only if a user is tricked into an action (such as clicking a link or opening a file). Attack complexity is high, meaning specific conditions must exist first. The impact can spread beyond the vulnerable component to other parts of the system.
Is it being exploited?
There is no public evidence of active exploitation yet. Monitor for exploit releases, especially if the product is internet-facing.
Patch priority and what to do
Patch as soon as possible, ideally within days. It is remotely reachable or critical severity, so exposure to the internet greatly increases risk. 1) Check whether you run the affected product and version. 2) Apply the vendor update or patch listed in the advisory. 3) Until patched, restrict network access to the service (firewall, VPN, WAF rules). 4) Warn users about suspicious links and files that could trigger the flaw. 5) Review logs for signs of exploitation since the publication date.
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N
Tags
CVE-2026-141556
Sources & references
- Original article / advisory (NVD) ↗
- NIST NVD: CVE-2026-141556 ↗
- CVE.org record ↗
- FIRST.org EPSS model ↗
How this data is collected: methodology & sources.