Skip to content

build(deps): bump lxml-html-clean from 0.4.5 to 0.4.7 - #1381

Open
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/uv/lxml-html-clean-0.4.7
Open

dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/uv/lxml-html-clean-0.4.7

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Dec 4, 2026

Copy link
Copy Markdown
Contributor

Bumps lxml-html-clean from 0.4.5 to 0.4.7.

Changelog

Sourced from lxml-html-clean's changelog.

0.4.7 (2026-11-26)

Bugs fixed

  • Fixed an XSS vulnerability when safe_attrs_only=False was used. With javascript=True (the default) the cleaner only scrubs script from the attributes listed in lxml.html.defs.link_attrs, so two kinds of script-bearing attributes slipped through. srcdoc on <iframe> holds a whole HTML document that the browser renders (and that takes priority over a whitelisted src), giving no-interaction XSS when an iframe is kept via host_whitelist. to/from/by/values on the SVG animation elements <set>/<animate>/<animateTransform> with attributeName="href" set a javascript: URL on the enclosing SVG <a> at runtime (also requires remove_unknown_tags=False and a click). Both are now removed when javascript=True. This is the same class of incomplete-blocklist issue as GHSA-4jhm-jv67-739f. The default Cleaner() uses safe_attrs_only=True and was never affected.

  • Fixed an XSS vulnerability when comments=False was used to keep comments. libxml2 parses the content of raw-text elements such as <noscript> as markup, so a payload like <noscript><!--</noscript><img src=x onerror=alert(1)>--></noscript> was preserved as a single, seemingly inert comment node. A browser with scripting enabled instead treats the <noscript> body as raw text, closes it at the </noscript> inside the comment and runs the following markup, executing the onerror handler without any user interaction. Comments are now dropped when they contain an end tag that would close a raw-text ancestor element (noscript, noembed, noframes, iframe, xmp, title, textarea, style, script, plaintext). This is the same class of parser differential as GHSA-5jfw-gq64-q45f, which had only been addressed for <style> text. The default Cleaner() removes all comments and was never affected. Benign comments, including commented-out markup inside ordinary elements, are kept.

0.4.6 (2026-10-26)

Bugs fixed

  • Fixed a ReDoS (regular expression denial of service) vulnerability in the CSS expression() sanitizer. The pattern expression\s*\(.*?\) with re.S was quadratic when input contained many expression( tokens without a closing parenthesis. The body is now bounded to 1024 characters; longer bodies are handled fail-closed by _has_sneaky_javascript(), which drops the entire style. Reported by Brian Willows.

... (truncated)

Commits
  • 0d4e91e docs: clarify _remove_attrs_that_bypass_link_cleaning docstring
  • e72a040 docs: add 0.4.7 changelog entry for srcdoc/SVG animation XSS fix
  • 883db20 fix: drop srcdoc and SVG animation link values when cleaning javascript
  • c83f0be fix: drop breakout comments inside raw-text elements (XSS)
  • ac9bc3a Release 0.4.6
  • cddbfc6 Add Python 3.15 to testing matrix, declare compatibility in classifiers
  • cf8263a test: guard against '[^]]'-style regression in conditional comment check
  • 27d1fc2 fix: bound image data-url regex body to prevent ReDoS
  • bb7f02f test: reproduce ReDoS in image data-url scan
  • 9ed00af fix: replace CSS comment regex with linear str.find() scan to prevent ReDoS
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Bumps [lxml-html-clean](https://github.com/fedora-python/lxml_html_clean) from 0.4.5 to 0.4.7.
- [Changelog](https://github.com/fedora-python/lxml_html_clean/blob/main/CHANGES.rst)
- [Commits](fedora-python/lxml_html_clean@0.4.5...0.4.7)

---
updated-dependencies:
- dependency-name: lxml-html-clean
  dependency-version: 0.4.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants