CVE-2026-49825 lxml: javascript: URL bypass in Cleaner via xlink:href

High 8.2 Published Updated

Attackers can bypass HTML cleaner protections using xlink:href attributes in SVG content to inject malicious JavaScript, leading to XSS.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-49825?

CVE-2026-49825 is a high-severity cross-site scripting vulnerability in fedora-python lxml, published on 20 Aug 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official 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.

Weakness: CWE-79, CWE-184

Which versions are affected by CVE-2026-49825?

3 open source packages ship an affected version, including lxml-html-clean and lxml_html_clean.

PackageAffectedFixed in
lxml-html-clean PyPIAll versions0.4.5
lxml-html-clean PyPIAll versions0.4.5
lxml_html_clean PyPIAll versions0.4.5
Linux distribution packages (37)
python3-lxml AlmaLinux:8All versions4.2.3-5.el8_10
python3-lxml AlmaLinux:9All versions4.6.5-3.el9_8.1
python3.12-lxml AlmaLinux:9All versions4.9.3-2.el9_8.1
python-lxml Red Hat:enterprise_linux:8::appstreamAll versions0:4.2.3-5.el8_10
python-lxml-debugsource Red Hat:enterprise_linux:8::appstreamAll versions0:4.2.3-5.el8_10
python3-lxml Red Hat:enterprise_linux:8::appstreamAll versions0:4.2.3-5.el8_10
python3-lxml-debuginfo Red Hat:enterprise_linux:8::appstreamAll versions0:4.2.3-5.el8_10
python-lxml Red Hat:enterprise_linux:9::appstreamAll versions0:4.6.5-3.el9_8.1
python-lxml-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:4.6.5-3.el9_8.1
python3-lxml Red Hat:enterprise_linux:9::appstreamAll versions0:4.6.5-3.el9_8.1
python3-lxml-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:4.6.5-3.el9_8.1
python3.12-lxml Red Hat:enterprise_linux:9::appstreamAll versions0:4.9.3-2.el9_8.1
python3.12-lxml-debuginfo Red Hat:enterprise_linux:9::appstreamAll versions0:4.9.3-2.el9_8.1
python3.12-lxml-debugsource Red Hat:enterprise_linux:9::appstreamAll versions0:4.9.3-2.el9_8.1
python-lxml Red Hat:rhel_aus:8.6::appstreamAll versions0:4.2.3-4.el8_6.1
python-lxml-debugsource Red Hat:rhel_aus:8.6::appstreamAll versions0:4.2.3-4.el8_6.1
python3-lxml Red Hat:rhel_aus:8.6::appstreamAll versions0:4.2.3-4.el8_6.1
python3-lxml-debuginfo Red Hat:rhel_aus:8.6::appstreamAll versions0:4.2.3-4.el8_6.1
python-lxml Red Hat:rhel_e4s:8.8::appstreamAll versions0:4.2.3-4.el8_8.1
python-lxml-debugsource Red Hat:rhel_e4s:8.8::appstreamAll versions0:4.2.3-4.el8_8.1
python3-lxml Red Hat:rhel_e4s:8.8::appstreamAll versions0:4.2.3-4.el8_8.1
python3-lxml-debuginfo Red Hat:rhel_e4s:8.8::appstreamAll versions0:4.2.3-4.el8_8.1
python-lxml Red Hat:rhel_e4s:9.2::appstreamAll versions0:4.6.5-3.el9_2.1
python-lxml-debugsource Red Hat:rhel_e4s:9.2::appstreamAll versions0:4.6.5-3.el9_2.1
python3-lxml Red Hat:rhel_e4s:9.2::appstreamAll versions0:4.6.5-3.el9_2.1
python3-lxml-debuginfo Red Hat:rhel_e4s:9.2::appstreamAll versions0:4.6.5-3.el9_2.1
python-lxml Red Hat:rhel_e4s:9.4::appstreamAll versions0:4.6.5-3.el9_4.1
python-lxml-debugsource Red Hat:rhel_e4s:9.4::appstreamAll versions0:4.6.5-3.el9_4.1
python3-lxml Red Hat:rhel_e4s:9.4::appstreamAll versions0:4.6.5-3.el9_4.1
python3-lxml-debuginfo Red Hat:rhel_e4s:9.4::appstreamAll versions0:4.6.5-3.el9_4.1
python3.12-lxml Red Hat:rhel_e4s:9.4::appstreamAll versions0:4.9.3-2.el9_4.1
python3.12-lxml-debuginfo Red Hat:rhel_e4s:9.4::appstreamAll versions0:4.9.3-2.el9_4.1
python3.12-lxml-debugsource Red Hat:rhel_e4s:9.4::appstreamAll versions0:4.9.3-2.el9_4.1
python-lxml Red Hat:rhel_eus:9.6::appstreamAll versions0:4.6.5-3.el9_6.1
python-lxml-debugsource Red Hat:rhel_eus:9.6::appstreamAll versions0:4.6.5-3.el9_6.1
python3-lxml Red Hat:rhel_eus:9.6::appstreamAll versions0:4.6.5-3.el9_6.1
python3-lxml-debuginfo Red Hat:rhel_eus:9.6::appstreamAll versions0:4.6.5-3.el9_6.1

How do I fix CVE-2026-49825?

Upgrade lxml-html-clean to 0.4.5 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-49825 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-49825 exists.

Sources

Also known as ALSA-2026:66203, ALSA-2026:66204, ALSA-2026:67943, AZL-96857, BELL-CVE-2026-49825, CLSA-2026-1792809744 and 23 more.

Is CVE-2026-49825 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free