python3-lxml: Fix CVE-2026-49825
PATCH 1/1 python3-lxml: Fix CVE-2026-49825
From: Ashishkumar Parmar <[email protected]>
This patch applies the upstream fix referenced in [2], using the commit shown in [1].
[1] https://github.com/lxml/lxml/commit/5927a6d5e851845140975d99b65461e255caaab0
[2] https://nvd.nist.gov/vuln/detail/CVE-2026-49825
Signed-off-by Ashishkumar Parmar <[email protected]>
--- .../python/python3-lxml/CVE-2026-49825.patch | 42 +++++++++++++++++++ .../python/python3-lxml_6.0.2.bb | 3 +- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/python/python3-lxml/CVE-2026-49825.patch
meta/recipes-devtools/python/python3-lxml/CVE-2026-49825.patch new file +42 -0
@@ -0,0 +1,42 @@ +From 7344b7424424b838ff177ba1ae87fb124f9dc140 Mon Sep 17 00:00:00 2001 +From: Stefan Behnel <[email protected]> +Date: Sun, 17 May 2026 21:42:51 +0200 +Subject: [PATCH] Add missing "xlink:href" to the known HTML link attributes. + Closes + https://github.com/fedora-python/lxml_html_clean/security/advisories/GHSA-4jhm-jv67-739f + +CVE: CVE-2026-49825 +Upstream-Status: Backport [https://github.com/lxml/lxml/commit/5927a6d5e851845140975d99b65461e255caaab0] + +Signed-off-by: Ashishkumar Parmar <[email protected]> +--- + src/lxml/html/defs.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/lxml/html/defs.py b/src/lxml/html/defs.py +index b70b443..b1cefc7 100644 +--- a/src/lxml/html/defs.py ++++ b/src/lxml/html/defs.py +@@ -24,7 +24,9 @@ link_attrs = frozenset([ + # Not standard: + 'dynsrc', 'lowsrc', + # HTML5 formaction +- 'formaction' ++ 'formaction', ++ # XLink as used by HTML5 (including embedded SVG/MathML) ++ 'xlink:href', + ]) + + # Not in the HTML 4 spec: +@@ -117,7 +119,7 @@ font_style_tags = frozenset([ + frame_tags = frozenset([ + 'frameset', 'frame', 'noframes', + ]) +- ++ + html5_tags = frozenset([ + 'article', 'aside', 'audio', 'canvas', 'command', 'datalist', + 'details', 'embed', 'figcaption', 'figure', 'footer', 'header', +-- +2.35.6 +
meta/recipes-devtools/python/python3-lxml_6.0.2.bb +2 -1
@@ -21,7 +21,8 @@ DEPENDS += "libxml2 libxslt" SRC_URI[sha256sum] = "cd79f3367bd74b317dda655dc8fcfa304d9eb6e4fb06b7168c5cf27f96e0cd62" SRC_URI += "${PYPI_SRC_URI} \ - file://CVE-2026-41066.patch" + file://CVE-2026-41066.patch \ + file://CVE-2026-49825.patch" inherit pkgconfig pypi setuptools3
Signature · 1 line
2.35.6