PYSEC-2026-2614: lxml: javascript: URL bypass in Cleaner via xlink:href

Published Aug 20, 2026
·
Updated

lxml is a library for processing XML and HTML in the Python language. Prior to 6.1.1, link attributes in lxml.html.defs.linkattrs 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 lxmlhtmlclean 0.4.5.

Affected Software

2 affected components
pypi/lxml<6.1.1
pypi/lxml_html_clean<0.4.5

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade lxml to a version that resolves this vulnerability.

    Fixed in 6.1.1
  2. Upgrade

    Upgrade lxml_html_clean to a version that resolves this vulnerability.

    Fixed in 0.4.5

Event History

Aug 20, 2026
CVE Published
via OSV·02:42 PM
Data Sourced
via OSV·02:42 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this issue?

Deployments using lxml or lxml_html_clean to clean HTML containing embedded SVG, MathML, or similar content may be exposed if untrusted content can retain an xlink:href attribute. The affected cleaner link-attribute list omitted xlink:href.

2

What does exploitation require?

An attacker needs to induce processing of crafted content containing an xlink:href URL, and successful exploitation requires user interaction. The issue can enable a javascript: URL bypass and is categorized as XSS.

3

Which versions contain fixes?

The issue is fixed in lxml 6.1.1 and lxml_html_clean 0.4.5. Versions prior to those releases are affected according to the advisory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203