REDHAT-BUG-2520368: High severity pypi/lxml vulnerability

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
Data Sourced
via Red Hat·03:05 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which deployments are realistically exposed to this issue?

Deployments using lxml to process HTML or XML content that can contain embedded SVG, MathML, or similar markup with link attributes are exposed to the URL-bypass risk. The issue concerns handling of the xlink:href attribute.

2

What does an attacker need to exploit it?

An attacker would need content containing an xlink:href attribute to be processed in a context where link-attribute handling is relied upon to control or sanitize URLs. The provided information does not identify any additional prerequisites.

3

Which versions contain the fix?

The issue was fixed in lxml 6.1.1 and lxml_html_clean 0.4.5. Deployments using earlier versions should be treated as affected when they process relevant embedded content.

4

How can I determine whether my application is affected?

Check whether the application depends on pypi/lxml or pypi/lxml-html-clean and whether its installed version predates lxml 6.1.1 or lxml_html_clean 0.4.5. Also determine whether untrusted or externally supplied HTML/XML with embedded SVG or MathML can reach the application's processing or sanitization path.

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