Skip to content
OpenAdvisories
High SUSE-SU-2022:0895-1 4 CVEs

Security update for python-lxml

Published Mar 17, 2022 · Updated Feb 4, 2026

Summary

This update for python-lxml fixes the following issues:

- CVE-2021-43818: Removed SVG image data URLs since they can embed script
content (bsc#1193752).
- CVE-2021-28957: Fixed a potential XSS due to improper input sanitization (bsc#1184177).
- CVE-2020-27783: Fixed a potential XSS due to improper HTML parsing (bsc#1179534).
- CVE-2018-19787: Fixed a potential XSS due to improper input sanitization (bsc#1118088).

Fixed packages 5

ReleasePackageFixed in
SUSE · HPE Helion OpenStack 8 python-lxml 3.6.1-8.5.1
SUSE · SLES 12 SP5 Linux Enterprise Server 12 SP5 python-lxml 3.6.1-8.5.1
SUSE · SLES for SAP 12 SP5 Linux Enterprise Server for SAP Applications 12 SP5 python-lxml 3.6.1-8.5.1
SUSE · OpenStack Cloud 8 python-lxml 3.6.1-8.5.1
SUSE · OpenStack Cloud Crowbar 8 python-lxml 3.6.1-8.5.1

Vulnerabilities 4

  • High 8.2

    HTML Cleaner allows crafted and SVG embedded scripts to pass through

    lxml is a library for processing XML and HTML in the Python language. Prior to version 4.6.5, the HTML Cleaner in lxml.html lets certain crafted script content pass through, as well as script content in SVG files embedded using data URIs. Users that employ th…

  • Medium 6.1

    Improper Neutralization of Input During Web Page Generation in LXML

    An issue was discovered in lxml before 4.2.5. lxml/html/clean.py in the lxml.html.clean module does not remove javascript: URLs that use escaping, allowing a remote attacker to conduct XSS attacks, as demonstrated by "j a v a s c r i p t:" in Internet Explore…

  • Medium 6.1

    lxml vulnerable to Cross-site Scripting

    A XSS vulnerability was discovered in python-lxml's clean module. The module's parser didn't properly imitate browsers, which caused different behaviors between the sanitizer and the user's page. A remote attacker could exploit this flaw to run arbitrary HTML…

  • Medium 6.1

    lxml vulnerable to Cross-Site Scripting

    An XSS vulnerability was discovered in python-lxml's clean module versions before 4.6.3. When disabling the safe_attrs_only and forms arguments, the Cleaner class does not remove the formaction attribute allowing for JS to bypass the sanitizer. A remote attac…

References

  • report
    https://bugzilla.suse.com/1118088
  • report
    https://bugzilla.suse.com/1179534
  • report
    https://bugzilla.suse.com/1184177
  • report
    https://bugzilla.suse.com/1193752
  • web
    https://www.suse.com/security/cve/CVE-2018-19787
  • web
    https://www.suse.com/security/cve/CVE-2020-27783
  • web
    https://www.suse.com/security/cve/CVE-2021-28957
  • web
    https://www.suse.com/security/cve/CVE-2021-43818