Skip to main content
CVE-2026-141556VulnerabilityPublished

iframe srcdoc · lxml_html_clean: Cleaner(safe_attrs_only=False) keeps javascript:

Affects kimi-cliSource GCVE Database

0
Compare
Authoritative record:CVE-2026-141556· Medium 4.7

Not known to be exploited · CVSS 4.7 Medium : upgrade to 0.4.7 when convenient.

Data as of 4 Dec 2026, 18:45 UTC

CVSS 3.1 base score
4.7Medium
How severe the flaw is on the 0–10 CVSS scale.

Thin evidence

One scorer or none
CVSS scores by source
CNA (GitHub_M)CVSS 3.14.7
EPSS
0.3% chance of exploitation in 30 days – higher than 35% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 0.4.7
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:L/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 2 Dec 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 4 Dec 2026.

What to do

Upgrade lxml-html-clean to 0.4.7.

Affected software

ProductAffectedFixed in
Homebrewkimi-clipkg:brew/kimi-cliOther threatsAffected
  • >=0.40
Fixed in–
PyPIlxml-html-cleanpkg:pypi/lxml-html-cleanOther threatsAffected
  • <0.4.7
Fixed in
  • 0.4.7

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

Users should avoid using Cleaner with safe_attrs_only=False unless necessary. The default configuration (safe_attrs_only=True) is not affected and should be preferred. If safe_attrs_only=False is required, apply the suggested fix by removing srcdoc attributes from all elements and removing to, from, by, and values attributes on <set> and <animate> SVG elements when attributeName is href or xlink:href. Monitor the lxml_html_clean project for official patches or updates addressing this issue. If you cannot patch yet, manually sanitizing or filtering these attributes is recommended to prevent JavaScript execution.

Description

The lxml_html_clean library's Cleaner component, when configured with safe_attrs_only=False, fails to remove JavaScript in certain attributes such as iframe's srcdoc and SVG animation elements' to, from, by, and values attributes. This allows JavaScript code to persist in cleaned HTML, potentially leading to stored or reflected cross-site scripting (XSS) vulnerabilities. The default Cleaner configuration (safe_attrs_only=True) is not affected. The vulnerability affects versions from 0.40 onward and can be triggered when host_whitelist or remove_unknown_tags options are used in specific ways.

References

Community reviews

Loading reviews…