ADVISORIES

openEuler Security Advisory

OESA-2026-3217

python-lxml security update

Details

\

Security Fix(es):

lxml_html_clean.Cleaner does not strip javascript: URLs from namespaced URL attributes (xlink:href). The vulnerability exists because Cleaner filters URL schemes by walking links via rewrite_links(), which delegates to iterlinks(), which only yields attributes named in lxml.html.defs.link_attrs. That allow-list contains no prefixed names such as xlink:href. As a result, when Cleaner is configured with safe_attrs_only=False, an xlink:href attribute carrying a javascript: URL survives sanitization untouched, and any browser that follows the SVG or MathML anchor specification will execute the JavaScript when the rendered link is clicked, leading to Cross-Site Scripting (XSS) attacks.(CVE-2026-49825)

Affected packages

EcosystemPackageAffected versions
openEuler:24.03-LTS-SP1python-lxml
All versions before 5.1.0-5.oe2403sp1 (fixed in 5.1.0-5.oe2403sp1)
openEuler:24.03-LTS-SP3python-lxml
All versions before 5.1.0-5.oe2403sp3 (fixed in 5.1.0-5.oe2403sp3)
openEuler:24.03-LTS-SP4python-lxml
All versions before 5.1.0-5.oe2403sp4 (fixed in 5.1.0-5.oe2403sp4)
openEuler:20.03-LTS-SP4python-lxml
All versions before 4.5.2-11.oe2003sp4 (fixed in 4.5.2-11.oe2003sp4)
openEuler:22.03-LTS-SP4python-lxml
All versions before 4.7.1-10.oe2203sp4 (fixed in 4.7.1-10.oe2203sp4)

References