CVE-2026-49825
Received Received - Intake

XLink:href URL Bypass in lxml HTML Processing

Vulnerability report for CVE-2026-49825, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-08-20

Last updated on: 2026-08-20

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-08-20
Last Modified
2026-08-20
Generated
2026-08-20
AI Q&A
2026-08-20
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 3 associated CPEs
Vendor Product Version / Range
lxml lxml_html_clean From 0.4.5 (inc)
lxml lxml 6.1.1
lxml lxml_html_clean 0.4.5

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-184 The product implements a protection mechanism that relies on a list of inputs (or properties of inputs) that are not allowed by policy or otherwise require other action to neutralize before additional processing takes place, but the list is incomplete.
CWE-79 The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability involves a missing attribute in the lxml library. The link_attrs list in lxml.html.defs did not include xlink:href, which is used in SVG/MathML content. This omission allowed URL bypass attacks where malicious JavaScript URLs could evade sanitization, potentially leading to stored cross-site scripting (XSS) attacks.

Detection Guidance

Check if your system uses lxml version below 6.1.1 or lxml_html_clean version below 0.4.5. Run commands like 'pip show lxml' and 'pip show lxml_html_clean' to verify versions. Inspect HTML processing code for use of Cleaner with safe_attrs_only=False.

Impact Analysis

If you use lxml_html_clean with safe_attrs_only=False, attackers could inject JavaScript via xlink:href attributes in SVG/MathML content. This could lead to stored XSS attacks, where malicious scripts execute when users interact with the content. The impact depends on how the library is configured in your application.

Compliance Impact

This vulnerability could lead to unauthorized script execution, potentially violating data protection requirements under GDPR or HIPAA if user data is compromised. Stored XSS attacks may expose sensitive information, leading to compliance breaches. Proper sanitization is critical for maintaining compliance.

Mitigation Strategies

Upgrade lxml to version 6.1.1 or higher and lxml_html_clean to version 0.4.5 or higher. Review and update HTML sanitization code to ensure safe_attrs_only=True or proper handling of xlink:href attributes.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-49825. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart