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.
Advisories
Source ID Title
Debian DLA Debian DLA DLA-2606-1 lxml security update
Debian DSA Debian DSA DSA-4880-1 lxml security update
EUVD EUVD EUVD-2021-0116 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.
Github GHSA Github GHSA GHSA-jq4v-f5q6-mjqq lxml vulnerable to Cross-Site Scripting
Ubuntu USN Ubuntu USN USN-4896-1 lxml vulnerability
Ubuntu USN Ubuntu USN USN-4896-2 lxml vulnerability
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

Wed, 17 Dec 2025 22:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Projects

Sign in to view the affected projects.

cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2025-12-17T21:31:43.446Z

Reserved: 2021-03-21T00:00:00.000Z

Link: CVE-2021-28957

cve-icon Vulnrichment

Updated: 2024-08-03T21:55:12.376Z

cve-icon NVD

Status : Modified

Published: 2021-03-21T05:15:13.367

Modified: 2025-12-17T22:15:56.740

Link: CVE-2021-28957

cve-icon Redhat

Severity : Moderate

Publid Date: 2021-03-21T00:00:00Z

Links: CVE-2021-28957 - Bugzilla

cve-icon OpenCVE Enrichment

No data.

Weaknesses