CVE-2026-49825 lxml: javascript: URL bypass in Cleaner via xlink:href
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.
Which versions are affected by CVE-2026-49825?
3 open source packages ship an affected version, including lxml-html-clean and lxml_html_clean.
| Package | Affected | Fixed in |
|---|---|---|
lxml-html-clean PyPI | All versions | 0.4.5 |
lxml-html-clean PyPI | All versions | 0.4.5 |
lxml_html_clean PyPI | All versions | 0.4.5 |
Linux distribution packages (37)
python3-lxml AlmaLinux:8 | All versions | 4.2.3-5.el8_10 |
python3-lxml AlmaLinux:9 | All versions | 4.6.5-3.el9_8.1 |
python3.12-lxml AlmaLinux:9 | All versions | 4.9.3-2.el9_8.1 |
python-lxml Red Hat:enterprise_linux:8::appstream | All versions | 0:4.2.3-5.el8_10 |
python-lxml-debugsource Red Hat:enterprise_linux:8::appstream | All versions | 0:4.2.3-5.el8_10 |
python3-lxml Red Hat:enterprise_linux:8::appstream | All versions | 0:4.2.3-5.el8_10 |
python3-lxml-debuginfo Red Hat:enterprise_linux:8::appstream | All versions | 0:4.2.3-5.el8_10 |
python-lxml Red Hat:enterprise_linux:9::appstream | All versions | 0:4.6.5-3.el9_8.1 |
python-lxml-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 0:4.6.5-3.el9_8.1 |
python3-lxml Red Hat:enterprise_linux:9::appstream | All versions | 0:4.6.5-3.el9_8.1 |
python3-lxml-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:4.6.5-3.el9_8.1 |
python3.12-lxml Red Hat:enterprise_linux:9::appstream | All versions | 0:4.9.3-2.el9_8.1 |
python3.12-lxml-debuginfo Red Hat:enterprise_linux:9::appstream | All versions | 0:4.9.3-2.el9_8.1 |
python3.12-lxml-debugsource Red Hat:enterprise_linux:9::appstream | All versions | 0:4.9.3-2.el9_8.1 |
python-lxml Red Hat:rhel_aus:8.6::appstream | All versions | 0:4.2.3-4.el8_6.1 |
python-lxml-debugsource Red Hat:rhel_aus:8.6::appstream | All versions | 0:4.2.3-4.el8_6.1 |
python3-lxml Red Hat:rhel_aus:8.6::appstream | All versions | 0:4.2.3-4.el8_6.1 |
python3-lxml-debuginfo Red Hat:rhel_aus:8.6::appstream | All versions | 0:4.2.3-4.el8_6.1 |
python-lxml Red Hat:rhel_e4s:8.8::appstream | All versions | 0:4.2.3-4.el8_8.1 |
python-lxml-debugsource Red Hat:rhel_e4s:8.8::appstream | All versions | 0:4.2.3-4.el8_8.1 |
python3-lxml Red Hat:rhel_e4s:8.8::appstream | All versions | 0:4.2.3-4.el8_8.1 |
python3-lxml-debuginfo Red Hat:rhel_e4s:8.8::appstream | All versions | 0:4.2.3-4.el8_8.1 |
python-lxml Red Hat:rhel_e4s:9.2::appstream | All versions | 0:4.6.5-3.el9_2.1 |
python-lxml-debugsource Red Hat:rhel_e4s:9.2::appstream | All versions | 0:4.6.5-3.el9_2.1 |
python3-lxml Red Hat:rhel_e4s:9.2::appstream | All versions | 0:4.6.5-3.el9_2.1 |
python3-lxml-debuginfo Red Hat:rhel_e4s:9.2::appstream | All versions | 0:4.6.5-3.el9_2.1 |
python-lxml Red Hat:rhel_e4s:9.4::appstream | All versions | 0:4.6.5-3.el9_4.1 |
python-lxml-debugsource Red Hat:rhel_e4s:9.4::appstream | All versions | 0:4.6.5-3.el9_4.1 |
python3-lxml Red Hat:rhel_e4s:9.4::appstream | All versions | 0:4.6.5-3.el9_4.1 |
python3-lxml-debuginfo Red Hat:rhel_e4s:9.4::appstream | All versions | 0:4.6.5-3.el9_4.1 |
python3.12-lxml Red Hat:rhel_e4s:9.4::appstream | All versions | 0:4.9.3-2.el9_4.1 |
python3.12-lxml-debuginfo Red Hat:rhel_e4s:9.4::appstream | All versions | 0:4.9.3-2.el9_4.1 |
python3.12-lxml-debugsource Red Hat:rhel_e4s:9.4::appstream | All versions | 0:4.9.3-2.el9_4.1 |
python-lxml Red Hat:rhel_eus:9.6::appstream | All versions | 0:4.6.5-3.el9_6.1 |
python-lxml-debugsource Red Hat:rhel_eus:9.6::appstream | All versions | 0:4.6.5-3.el9_6.1 |
python3-lxml Red Hat:rhel_eus:9.6::appstream | All versions | 0:4.6.5-3.el9_6.1 |
python3-lxml-debuginfo Red Hat:rhel_eus:9.6::appstream | All versions | 0: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.