Sceawere
Vulnerability Detail
CVE-2026-49825UPDATED Verified Sceawere Triage Sources: NVD / CISA KEV
lxml URL Bypass Vulnerability
Vulnerability Metadata
- Severity
- High
- Score / CVSS
- 8.2
- Creation Date
- 3h ago
- Vendor
- lxml
- Product
- lxml
- Attack Type
- CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
- Vector String
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
- Attack Complexity
- LOW
Narrative and Response
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.
Executive Summary
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Technical Details
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Mitigations
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
References
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Additional Metadata
{
"score": "8.2",
"pubDate": "2026-08-20T15:17:30.707Z",
"pubdate": "2026-08-20T15:17:30.707Z",
"executiveSummary": "An incomplete attribute sanitization vulnerability exists in the lxml library prior to version 6.1.1 and lxml_html_clean prior to version 0.4.5. The vulnerability arises from missing xlink:href link attributes within lxml.html.defs.link_attrs, which are utilized during the processing of embedded SVG, MathML, and other markup languages containing hyperlinks. This flaw enables attackers to execute URL bypass attacks by smuggling malicious uniform resource identifiers past HTML sanitization filters. Successful exploitation can lead to security control bypasses, potentially facilitating cross-site scripting (XSS), malicious redirection, or unauthorized data exfiltration depending on how the sanitized HTML output is consumed by downstream applications. The vulnerability impacts systems processing untrusted HTML and XML inputs utilizing affected versions of lxml and lxml_html_clean. Attackers require the capability to inject crafted markup containing embedded content utilizing the unhandled xlink:href attribute to trigger the vulnerability. Exploitation relies on the parser failing to normalize and sanitize the specific namespace-qualified attribute during the cleaning phase.",
"technicalDetails": "The root cause of the vulnerability resides in the omission of the xlink:href attribute from the predefined list of link attributes defined in lxml.html.defs.link_attrs. The lxml library is a widely used Python library designed for processing XML and HTML content, often employed alongside cleaning modules like lxml_html_clean to sanitize user-supplied markup by stripping dangerous tags and attributes.\nWithin XML-based embedded contexts such as Scalable Vector Graphics (SVG) and Mathematical Markup Language (MathML), hyperlinking and resource referencing can be achieved using namespace-prefixed attributes, most notably xlink:href, rather than standard HTML href attributes. Because lxml.html.defs.link_attrs historically lacked xlink:href, sanitization routines failed to inspect, validate, or neutralize URLs embedded within this specific attribute.\nThe attack flow begins when an unauthenticated user supplies malicious HTML containing embedded SVG or MathML structures that leverage the unmonitored xlink:href attribute to point to external or malicious URLs containing payloads such as JavaScript URIs. When the application passes this input through the vulnerable lxml HTML cleaning pipeline, the sanitization mechanism strips standard href attributes while inadvertently preserving the xlink:href attribute due to the missing definition.\nDownstream rendering engines or web browsers subsequently parse the sanitized output, encountering the surviving xlink:href attribute within the embedded SVG or MathML context. The browser resolves the URI defined in the attribute, resulting in a successful URL bypass of security controls. This can lead to the execution of malicious scripts, arbitrary resource loading, or redirection to attacker-controlled infrastructure without requiring elevated privileges, specific authentication states, or complex network-level interactions beyond the ability to inject crafted markup into an application processing untrusted content."
}