Skip to main content

Lxml Html Clean

5 CVEs product

Monthly

CVE-2026-141556 Dec 02, 20:15 MEDIUM PATCH GHSA This Month

HTML sanitization bypass in lxml-html-clean through 0.4.6 allows attacker-supplied script to survive Cleaner when it is configured with the non-default safe_attrs_only=False option, via iframe srcdoc and SVG set/animate attributes that rewrite_links does not visit. The clickless srcdoc path additionally requires host_whitelist so the attacker's iframe is retained; the SVG path requires remove_unknown_tags=False and one click on the resulting link. The default Cleaner() (safe_attrs_only=True) is not affected because it strips srcdoc, to and values; a public proof-of-concept reference is documented in the advisory, but exploit code availability was not independently confirmed and there is no CISA KEV entry.

XSS Python Lxml Html Clean
NVD GitHub
CVSS 3.1
4.7
EPSS
0.4%
CVE-2026-141555 Dec 02, 20:09 MEDIUM POC PATCH GHSA This Month

Comment-preserving HTML sanitization in lxml-html-clean 0.4.6 and earlier lets attacker-supplied markup break out of a raw-text element and execute script when the cleaned output is rendered. The flaw only manifests when an application instantiates Cleaner(comments=False); the default Cleaner() strips all comments and is unaffected. A comment whose text smuggles a matching end tag (for example '<!--</noscript><img src=x onerror=...>-->' nested inside <noscript>) survives libxml2 parsing as an inert node but is reinterpreted by a scripting-enabled browser as the close of the element plus live markup, so the handler fires without a click. Severity is bounded (CVSS 4.7, AC:H/UI:R/S:C/C:L/I:L/A:N, PR:N) and the maintainers' advisory contains a reproduction payload; no confirmed, weaponized exploit code was identified at time of analysis. Patch status: Vendor-released patch: 0.4.7.

XSS Python Lxml Html Clean
NVD GitHub VulDB
CVSS 3.1
4.7
EPSS
0.5%
CVE-2026-28350 Mar 05, 20:16 PyPI MEDIUM POC PATCH This Month

lxml_html_clean versions prior to 0.4.4 fail to sanitize <base> HTML tags, allowing attackers to inject malicious base tags and redirect relative links to attacker-controlled domains. Public exploit code exists for this vulnerability. The issue affects applications using the default Cleaner configuration and has been remediated in version 0.4.4.

XSS Lxml Html Clean Suse Fedoralovespython
NVD GitHub
CVSS 3.1
6.1
EPSS
0.0%
CVE-2026-28348 Mar 05, 20:16 PyPI MEDIUM POC PATCH This Month

lxml_html_clean versions before 0.4.4 fail to properly sanitize CSS Unicode escape sequences in the _has_sneaky_javascript() method, allowing attackers to bypass filters and inject malicious @import statements or XSS payloads. Public exploit code exists for this vulnerability, which affects applications using the library for HTML sanitization. A patch is available in version 0.4.4 and should be applied immediately to prevent CSS-based injection attacks.

XSS Lxml Html Clean Suse Fedoralovespython
NVD GitHub
CVSS 3.1
6.1
EPSS
0.0%
CVE-2024-52595 Nov 19, 22:15 PyPI MEDIUM PATCH This Month

lxml_html_clean is a project for HTML cleaning functionalities copied from `lxml.html.clean`. Rated medium severity (CVSS 6.1), this vulnerability is remotely exploitable, no authentication required, low attack complexity. This Cross-Site Scripting (XSS) vulnerability could allow attackers to inject malicious scripts into web pages viewed by other users.

XSS Lxml Html Clean Fedoralovespython
NVD GitHub
CVSS 3.1
6.1
EPSS
0.5%
EPSS 0% CVSS 4.7
MEDIUM PATCH This Month

HTML sanitization bypass in lxml-html-clean through 0.4.6 allows attacker-supplied script to survive Cleaner when it is configured with the non-default safe_attrs_only=False option, via iframe srcdoc and SVG set/animate attributes that rewrite_links does not visit. The clickless srcdoc path additionally requires host_whitelist so the attacker's iframe is retained; the SVG path requires remove_unknown_tags=False and one click on the resulting link. The default Cleaner() (safe_attrs_only=True) is not affected because it strips srcdoc, to and values; a public proof-of-concept reference is documented in the advisory, but exploit code availability was not independently confirmed and there is no CISA KEV entry.

XSS Python Lxml Html Clean
NVD GitHub
EPSS 0% CVSS 4.7
MEDIUM POC PATCH This Month

Comment-preserving HTML sanitization in lxml-html-clean 0.4.6 and earlier lets attacker-supplied markup break out of a raw-text element and execute script when the cleaned output is rendered. The flaw only manifests when an application instantiates Cleaner(comments=False); the default Cleaner() strips all comments and is unaffected. A comment whose text smuggles a matching end tag (for example '<!--</noscript><img src=x onerror=...>-->' nested inside <noscript>) survives libxml2 parsing as an inert node but is reinterpreted by a scripting-enabled browser as the close of the element plus live markup, so the handler fires without a click. Severity is bounded (CVSS 4.7, AC:H/UI:R/S:C/C:L/I:L/A:N, PR:N) and the maintainers' advisory contains a reproduction payload; no confirmed, weaponized exploit code was identified at time of analysis. Patch status: Vendor-released patch: 0.4.7.

XSS Python Lxml Html Clean
NVD GitHub VulDB
EPSS 0% CVSS 6.1
MEDIUM POC PATCH This Month

lxml_html_clean versions prior to 0.4.4 fail to sanitize <base> HTML tags, allowing attackers to inject malicious base tags and redirect relative links to attacker-controlled domains. Public exploit code exists for this vulnerability. The issue affects applications using the default Cleaner configuration and has been remediated in version 0.4.4.

XSS Lxml Html Clean Suse +1
NVD GitHub
EPSS 0% CVSS 6.1
MEDIUM POC PATCH This Month

lxml_html_clean versions before 0.4.4 fail to properly sanitize CSS Unicode escape sequences in the _has_sneaky_javascript() method, allowing attackers to bypass filters and inject malicious @import statements or XSS payloads. Public exploit code exists for this vulnerability, which affects applications using the library for HTML sanitization. A patch is available in version 0.4.4 and should be applied immediately to prevent CSS-based injection attacks.

XSS Lxml Html Clean Suse +1
NVD GitHub
EPSS 0% CVSS 6.1
MEDIUM PATCH This Month

lxml_html_clean is a project for HTML cleaning functionalities copied from `lxml.html.clean`. Rated medium severity (CVSS 6.1), this vulnerability is remotely exploitable, no authentication required, low attack complexity. This Cross-Site Scripting (XSS) vulnerability could allow attackers to inject malicious scripts into web pages viewed by other users.

XSS Lxml Html Clean Fedoralovespython
NVD GitHub

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy