CVE-2026-141556
Received Received - Intake

Stored XSS in lxml-html-clean via iframe srcdoc and SVG attributes

Vulnerability report for CVE-2026-141556, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-12-02

Last updated on: 2026-12-02

Assigner: GitHub, Inc.

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-12-02
Last Modified
2026-12-02
Generated
2026-12-03
AI Q&A
2026-12-03
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 2 associated CPEs
Vendor Product Version / Range
lxml-html-clean lxml-html-clean to 0.4.7 (exc)
lxml-html-clean lxml-html-clean 0.4.7

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CWE-184 The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

lxml-html-clean is a Python library for cleaning HTML. Versions before 0.4.7 had a flaw where the Cleaner class, when set to safe_attrs_only=False, failed to remove JavaScript links in certain attributes like iframe srcdoc and SVG animation attributes. This allowed attacker-controlled HTML to execute without user interaction if an iframe was whitelisted or SVG elements were used to change link destinations to JavaScript URLs.

Detection Guidance

Check if your system uses lxml-html-clean versions through 0.4.6. Run: pip show lxml-html-clean. If installed, verify version is below 0.4.7.

Impact Analysis

If you use a vulnerable version of lxml-html-clean, attackers could inject malicious JavaScript via iframe srcdoc or SVG attributes. This could lead to unauthorized actions, data theft, or session hijacking when users interact with the affected content. The impact depends on how the library is used in your application.

Compliance Impact

This vulnerability could lead to unauthorized code execution, potentially violating GDPR (data protection) or HIPAA (health data privacy) by allowing attackers to access or manipulate sensitive user data. Compliance may be impacted if the vulnerability results in data breaches or unauthorized access to protected information.

Mitigation Strategies

Upgrade lxml-html-clean to version 0.4.7 or later. Use pip install --upgrade lxml-html-clean. Avoid using safe_attrs_only=False and remove_unknown_tags=False in Cleaner configurations.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-141556. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...