CVE-2021-28957

Exp

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.

Published: 2021-03-21 Last update: 2025-12-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-28957 is rated High Exploit Risk (74.1/100): CVSS Medium severity, with medium exploitation likelihood (EPSS 4.02%). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). EPSS rose +3.50% over the last day, indicating growing attacker interest. Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2021-28957

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2021-28957

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.52% 4.02% +3.50%
2 2026-03-21 0.70% 0.52% -0.18%
3 2026-03-17 0.70%

Full EPSS history (30 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-28957

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
6.1 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 2.7 [email protected]
6.1 3.1 MEDIUM
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:C)
Breaking this can reach past the original component and bite other resources—bigger blast radius.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.8 2.7 134c704f-9b21-4f2e-91b3-4a467353bcc0
4.3 2.0 MEDIUM
AV:N/AC:M/Au:N/C:N/I:P/A:N Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:N)
No confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:N)
No availability impact.
8.6 2.9 [email protected]

Weakness enumeration for CVE-2021-28957

GitHub Security Advisory for CVE-2021-28957

GHSA-jq4v-f5q6-mjqq · Severity: medium · Ecosystem: pip — lxml vulnerable to Cross-Site Scripting

OS Trackers for CVE-2021-28957

vendor priority summary link
alpine CVE-2021-28957: 1 source package rows (py3-lxml); 8 state rows across 8 repos (3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, edge-community, edge-main); fixed 8, open 0. https://security.alpinelinux.org/vuln/CVE-2021-28957
debian not yet assigned CVE-2021-28957 not yet assigned priority: Debian including 1 source packages (lxml), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2021-28957
gentoo normal CVE-2021-28957: 1 GLSA(s) (202208-06), 1 atom(s) (dev-python/lxml); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-28957
redhat medium https://access.redhat.com/security/cve/CVE-2021-28957
suse medium CVE-2021-28957 severity moderate: SUSE including 396 source package names (1.7.7.0.1.2016:python3-lxml-4.7.1-3.7.1, 1.8.6.0.3.2.5:python3-lxml-4.7.1-3.7.1, …), 630 product×package rows across 173 product lines (Container ses/7.1/cephcsi/cephcsi, Container ses/7.1/rook/ceph, … (173 product lines)): Fixed 399, Known Affected 231. https://www.suse.com/security/cve/CVE-2021-28957/
ubuntu medium CVE-2021-28957 medium priority: Ubuntu including 1 source packages (lxml), 6 status rows across 6 suites (bionic, focal, groovy, trusty, upstream, xenial): released 6. https://ubuntu.com/security/CVE-2021-28957

Affected software / configurations for CVE-2021-28957

Vendor Product Version Raw CPE
lxml lxml < 4.6.3 cpe:2.3:a:lxml:lxml:*:*:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
fedoraproject fedora 33 cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*
fedoraproject fedora 34 cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
netapp snapcenter cpe:2.3:a:netapp:snapcenter:-:*:*:*:*:*:*:*
oracle zfs_storage_appliance_kit 8.8 cpe:2.3:a:oracle:zfs_storage_appliance_kit:8.8:*:*:*:*:*:*:*

References for CVE-2021-28957

URL Tags
https://bugs.launchpad.net/lxml/+bug/1888153 Exploit Issue Tracking Third Party Advisory
https://github.com/lxml/lxml/commit/a5f9cb52079dc57477c460dbe6ba0f775e14a999 Patch Third Party Advisory
https://github.com/lxml/lxml/pull/316/commits/10ec1b4e9f93713513a3264ed6158af22492f270 Patch Third Party Advisory
https://lists.debian.org/debian-lts-announce/2021/03/msg00031.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3C2R44VDUY7FJVMAVRZ2WY7XYL4SVN45/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/XXN3QPWCTQVOGW4BMWV3AUUZZ4NRZNSQ/
https://security.gentoo.org/glsa/202208-06 Third Party Advisory
https://security.netapp.com/advisory/ntap-20210521-0004/ Third Party Advisory
https://www.debian.org/security/2021/dsa-4880 Third Party Advisory
https://www.oracle.com/security-alerts/cpuoct2021.html Patch Third Party Advisory
cvelogic Threat Intelligence