Lxml Html Clean
Monthly
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.