Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. lxml-html-clean
  4. ›
  5. CVE-2026-49825

CVE-2026-49825: `lxml_html_clean.Cleaner` does not strip `javascript:` URLs from namespaced URL attributes

July 8, 2026

Cleaner filters URL schemes (javascript:, vbscript:, …) by walking links via rewrite_links(), which delegates to iterlinks(), which only yields attributes named in lxml.html.defs.link_attrs. That allow-list contains no prefixed names (xlink:href) and no srcset. As a result, when Cleaner is configured with safe_attrs_only=False — a documented option for callers that want lenient attribute handling but still expect URL-scheme scrubbing — <a xlink:href="javascript:…"> survives sanitization untouched, and any browser that follows the SVG-anchor specification will execute the JavaScript when the rendered link is clicked.

CWE: CWE-79 (XSS), with CWE-184 (Incomplete List of Disallowed Inputs) as the underlying defect class.

References

  • github.com/advisories/GHSA-4jhm-jv67-739f
  • github.com/fedora-python/lxml_html_clean/security/advisories/GHSA-4jhm-jv67-739f
  • nvd.nist.gov/vuln/detail/CVE-2026-49825

Code Behaviors & Features

Detect and mitigate CVE-2026-49825 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.4.5

Fixed versions

  • 0.4.5

Solution

Upgrade to version 0.4.5 or above.

Impact 8.2 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-184: Incomplete List of Disallowed Inputs
  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/lxml-html-clean/CVE-2026-49825.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:15:48 +0000.