ADVISORIES

Vulnerability

CVE-2021-28957

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 attacker could exploit this flaw to run arbitrary JS code on users who interact with incorrectly sanitized HTML. This issue is patched in lxml 4.6.3.

41 advisories report this vulnerability, across 13 ecosystems.

Advisories

  • ALAS2-2024-2620

    Amazon Linux 2 2017.12 - ALAS2-2024-2620: medium priority package update for python-lxml

    Medium CVE-2021-28957 Amazon Linux Updated 13 August 2024
  • ALPINE-CVE-2021-28957

    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…

    CVE-2021-28957 Alpine Updated 3 November 2026
  • ALPINE-EDGE-CVE-2021-28957
    CVE-2021-28957 Alpine Updated 18 November 2026
  • ALSA-2021:4151

    Moderate: python27:2.7 security update

    CVE-2020-27619CVE-2020-28493CVE-2021-20095CVE-2021-20270 AlmaLinux Updated 29 October 2026
  • ALSA-2021:4158

    Moderate: python-lxml security update

    CVE-2021-28957 AlmaLinux Updated 29 October 2026
  • ALSA-2021:4160

    Moderate: python39:3.9 and python39-devel:3.9 security update

    CVE-2021-28957CVE-2021-29921CVE-2021-33503CVE-2021-3426 AlmaLinux Updated 29 October 2026
  • ALSA-2021:4162

    Moderate: python38:3.8 and python38-devel:3.8 security update

    CVE-2019-18874CVE-2020-27619CVE-2020-28493CVE-2021-20095 AlmaLinux Updated 29 October 2026
  • AZL-6808

    CVE-2021-28957 affecting package python-lxml for versions less than 4.8.0-1

    CVE-2021-28957 Azure Linux Updated 21 April 2026
  • DEBIAN-CVE-2021-28957

    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…

    CVE-2021-28957 Debian Updated 23 October 2026
  • DLA-2606-1

    lxml - security update

    CVE-2021-28957 Debian Updated 20 November 2026
  • DSA-4880-1

    lxml - security update

    CVE-2021-28957 Debian Updated 20 November 2026
  • ELSA-2021-4151

    ELSA-2021-4151: python27:2.7 security update (MODERATE)

    Moderate CVE-2020-27619CVE-2020-28493CVE-2021-20095CVE-2021-20270 Oracle Linux Updated 16 November 2021
  • ELSA-2021-4160

    ELSA-2021-4160: python39:3.9 and python39-devel:3.9 security update (MODERATE)

    Moderate CVE-2021-28957CVE-2021-29921CVE-2021-33503CVE-2021-3426 Oracle Linux Updated 16 November 2021
  • ELSA-2021-4162

    ELSA-2021-4162: python38:3.8 and python38-devel:3.8 security update (MODERATE)

    Moderate CVE-2019-18874CVE-2020-28493CVE-2021-20095CVE-2021-23336 Oracle Linux Updated 16 November 2021
  • ELSA-2022-9341

    ELSA-2022-9341: ol-automation-manager security update (IMPORTANT)

    Important CVE-2017-18342CVE-2020-10108CVE-2020-10109CVE-2020-27783 Oracle Linux Updated 27 April 2022
  • GHSA-jq4v-f5q6-mjqq

    lxml vulnerable to Cross-Site Scripting

    Moderate CVE-2021-28957 PyPI Updated 30 September 2024
  • OESA-2021-1178

    python-lxml security update

    Medium CVE-2021-28957 openEuler Updated 18 August 2026
  • PYSEC-2021-19

    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…

    CVE-2021-28957 PyPI Updated 8 November 2023
  • RHSA-2021:3254

    Red Hat Security Advisory: rh-python38 security, bug fix, and enhancement update

    CVE-2020-25659CVE-2020-27619CVE-2020-27783CVE-2020-28493 Red Hat Updated 23 November 2026
  • RHSA-2021:4151

    Red Hat Security Advisory: python27:2.7 security update

    CVE-2020-27619CVE-2020-28493CVE-2021-20095CVE-2021-20270 Red Hat Updated 23 November 2026
  • RHSA-2021:4158

    Red Hat Security Advisory: python-lxml security update

    CVE-2021-28957 Red Hat Updated 13 November 2026
  • RHSA-2021:4160

    Red Hat Security Advisory: python39:3.9 and python39-devel:3.9 security update

    CVE-2021-28957CVE-2021-29921CVE-2021-33503CVE-2021-3426 Red Hat Updated 23 November 2026
  • RHSA-2021:4162

    Red Hat Security Advisory: python38:3.8 and python38-devel:3.8 security update

    CVE-2019-18874CVE-2020-27619CVE-2020-28493CVE-2021-20095 Red Hat Updated 23 November 2026
  • RHVEX-CVE-2021-28957

    python-lxml: Missing input sanitization for formaction HTML5 attributes may lead to XSS

    Moderate CVE-2021-28957 Red Hat Updated 6 November 2026
  • RLSA-2021:4151

    Moderate: python27:2.7 security update

    CVE-2020-27619CVE-2020-28493CVE-2021-20095CVE-2021-20270 Rocky Linux Updated 4 February 2026
  • RLSA-2021:4158

    Moderate: python-lxml security update

    CVE-2021-28957 Rocky Linux Updated 4 February 2026
  • RLSA-2021:4160

    Moderate: python39:3.9 and python39-devel:3.9 security update

    CVE-2021-28957CVE-2021-29921CVE-2021-33503CVE-2021-3426 Rocky Linux Updated 5 February 2026
  • RLSA-2021:4162

    Moderate: python38:3.8 and python38-devel:3.8 security update

    CVE-2019-18874CVE-2020-27619CVE-2020-28493CVE-2021-20095 Rocky Linux Updated 5 February 2026
  • SUSE-SU-2022:0803-1

    Security update for python-lxml

    CVE-2018-19787CVE-2020-27783CVE-2021-28957CVE-2021-43818 SUSE Updated 4 February 2026
  • SUSE-SU-2022:0895-1

    Security update for python-lxml

    CVE-2018-19787CVE-2020-27783CVE-2021-28957CVE-2021-43818 SUSE Updated 4 February 2026
  • SUSE-SU-2022:1729-1

    Security update for ardana-barbican, grafana, openstack-barbican, openstack-cinder, openstack-heat-gbp, openstack-horizon-plugin-gbp-ui, openstack-ironic, openstack-keystone, openstack-neutron-gbp, python-lxml,…

    CVE-2018-19787CVE-2020-27783CVE-2021-28957CVE-2021-38155 SUSE Updated 4 February 2026
  • SUSE-SU-2022:3836-1

    Security update for python-lxml

    CVE-2020-27783CVE-2021-28957 openSUSE Updated 4 February 2026
  • SUSE-SU-2022:3934-1

    Security update for python3-lxml

    CVE-2021-28957 SUSE Updated 4 February 2026
  • SUSE-SU-2022:3937-1

    Security update for python3-lxml

    CVE-2021-28957 SUSE Updated 4 February 2026
  • SUSEVEX-CVE-2021-28957

    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…

    Moderate CVE-2021-28957 SUSE Updated 6 November 2026
  • UBUNTU-CVE-2021-28957

    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…

    CVE-2021-28957 Ubuntu Updated 4 February 2026
  • USN-4896-1

    lxml vulnerability

    CVE-2021-28957 Ubuntu Updated 10 February 2026
  • USN-4896-2

    lxml vulnerability

    CVE-2021-28957 Ubuntu Updated 10 February 2026
  • openSUSE-SU-2022:0803-1

    Security update for python-lxml

    CVE-2018-19787CVE-2020-27783CVE-2021-28957CVE-2021-43818 openSUSE Updated 4 February 2026
  • openSUSE-SU-2024:11473-1

    python36-translate-toolkit-3.3.6-1.3 on GA media

    CVE-2021-28957 openSUSE Updated 4 February 2026
  • openSUSE-SU-2025:14647-1

    python311-translate-toolkit-3.14.5-1.1 on GA media

    CVE-2021-28957 openSUSE Updated 4 February 2026

References