Description
lxml is a library for processing XML and HTML in the Python language. Prior to 6.1.1, link attributes in ``lxml.html.defs.link_attrs`` were missing ``xlink:href``, which can be used for URL bypass attacks in embedded SVG/MathML/etc. content. This vulnerability was fixed in lxml 6.1.1 and lxml_html_clean 0.4.5.
Published: 2026-08-20
Score: 8.2 High
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

lxml, a Python library for XML and HTML processing, omitted the xlink:href attribute from its link attribute list (lxml.html.defs.link_attrs) until version 6.1.1. Attackers can embed javascript: URLs in SVG or MathML elements that the library mistakenly treats as safe, allowing an attacker to inject executable code into a page that is processed with lxml. This vulnerability effectively bypasses the library’s sanitisation and enables arbitrary script execution within the context of the application.

Affected Systems

The flaw affects any systems running lxml versions earlier than 6.1.1 or the related lxml_html_clean packages before release 0.4.5, which are provided by the fedora-python project and the lxml package. Applications that import the older lxml library or use the lxml_html_clean cleaner without the patch are potentially exploitable.

Risk and Exploitability

The CVSS score of 8.2 indicates a high severity and the absence of an EPSS score shows limited current exploitation data, while the vulnerability is not listed in the CISA KEV catalog. The likely attack vector relies on an attacker supplying crafted SVG, MathML or other structured content to the application that uses lxml’s HTML cleaning. Because the affected code runs with the privileges of the application, successful exploitation would allow execution of arbitrary client‑side script in the context of the user interacting with the application.

Generated by OpenCVE AI on August 20, 2026 at 20:41 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the lxml library to version 6.1.1 or later
  • Upgrade lxml_html_clean to version 0.4.5 or later
  • Configure the application to strip or reject any javascript: URLs in xlink:href attributes before processing

Generated by OpenCVE AI on August 20, 2026 at 20:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-4jhm-jv67-739f `lxml_html_clean.Cleaner` does not strip `javascript:` URLs from namespaced URL attributes
History

Thu, 20 Aug 2026 17:00:00 +0000

Type Values Removed Values Added
First Time appeared Fedora-python
Fedora-python lxml Html Clean
Lxml
Lxml lxml
Vendors & Products Fedora-python
Fedora-python lxml Html Clean
Lxml
Lxml lxml

Thu, 20 Aug 2026 15:00:00 +0000

Type Values Removed Values Added
Description lxml is a library for processing XML and HTML in the Python language. Prior to 6.1.1, link attributes in ``lxml.html.defs.link_attrs`` were missing ``xlink:href``, which can be used for URL bypass attacks in embedded SVG/MathML/etc. content. This vulnerability was fixed in lxml 6.1.1 and lxml_html_clean 0.4.5.
Title lxml: javascript: URL bypass in Cleaner via xlink:href
Weaknesses CWE-184
CWE-79
References
Metrics cvssV3_1

{'score': 8.2, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N'}


Subscriptions

Fedora-python Lxml Html Clean
Lxml Lxml
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-20T14:42:30.748Z

Reserved: 2026-06-01T18:50:36.055Z

Link: CVE-2026-49825

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-20T15:17:30.707

Modified: 2026-08-20T15:17:30.707

Link: CVE-2026-49825

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-20T20:45:04Z

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')