CVE-2021-28957
No exploitation reported by the sources we read.
- Published2021-03-21
- Fixed in4.6.3
- WeaknessCWE-79
Am I affected?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « affected ».With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.
Description
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.
Timeline
dates in UTC- 2021-03-2105:15CVE publishedNVD
Versions per branch
NVD · OSV| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 4.6 | < 4.6.3 | 4.6.3 | NVD · OSV |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 9.0 | = 9.0 | no fix published | NVD |
| 10.0 | = 10.0 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 33.x | = 33 | no fix published | NVD |
| 34.x | = 34 | no fix published | NVD |
2 more products in the sources.
as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.
Distribution builds and vendor advisories
Packages from OSV.dev and products from the vendors' CSAF advisories.
version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.
Packages
- ardana-barbicanSUSE:OpenStack Cloud 9all versions · fixed in 9.0+git.1644879908.8a641c1-3.13.1
- babelRocky Linux:8all versions · fixed in 0:2.5.1-10.module+el8.5.0+706+735ec4b3
- babelRocky Linux:8all versions · fixed in 0:2.7.0-11.module+el8.5.0+672+ab6eb015
- babelRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:2.5.1-10.module+el8.5.0+11014+88fc0d0band 1 other package
- babelRed Hat:enterprise_linux:8::appstreamall versions · fixed in 0:2.7.0-11.module+el8.5.0+11015+9c1c7c42and 1 other package
- babelAlmaLinux:8all versions · fixed in 2.5.1-10.module_el8.6.0+2781+fed64c13and 1 other package
- CythonRocky Linux:8all versions · fixed in 0:0.28.1-7.module+el8.4.0+403+9ae17a31
- CythonRocky Linux:8all versions · fixed in 0:0.28.1-7.module+el8.5.0+706+735ec4b3
460 more package ranges on OSV.dev
Vendor advisories
python-lxml: Missing input sanitization for formaction HTML5 attributes may lead to XSS
lxml.src as a component of Red Hat Ansible Automation Platform 1.2 · lxml.src as a component of Red Hat Ansible Tower 3 · python-lxml.src as a component of Red Hat Enterprise Linux 6 · +5 more
Red Hat Security Advisory: python39:3.9 and python39-devel:3.9 security update
Red Hat Security Advisory: python-lxml security update
Red Hat Security Advisory: python38:3.8 and python38-devel:3.8 security update
Red Hat Security Advisory: python27:2.7 security update
Red Hat Security Advisory: rh-python38 security, bug fix, and enhancement update
Fix
- Update Lxml to 4.6.3
- Vendor fix Red Hat Product Security RHSA-2021:4160 · 229 productsFor details on how to apply this update, which includes the changes described in this advisory, refer to: https://access.redhat.com/articles/11258
- No fix available, says the vendor Red Hat Product Security CVE-2021-28957 · 1 productAffected
- No fix planned, says the vendor Red Hat Product Security CVE-2021-28957 · 6 productsOut of support scope
- No fix planned, says the vendor Red Hat Product Security CVE-2021-28957 · 1 productWill not fix
Advisories and patches
- github.comPatch
- github.comPatch
- www.oracle.comPatch
Detection
- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof of concept
- PoC-in-GitHubno public repository identifiedread 2026-12-04
- Metasploit modules
- none listed Metasploit Framework
Sources
- CISA-ADPSSVC decisionnone2025-12-17
- CISA-ADPCVSS 3.16.12025-12-17
- NVDCVSS 3.16.1read 2026-10-23
- NVDCVSS 2.04.3read 2026-10-23
- CISA-ADPweakness (CWE)CWE-792025-12-17
- NVDweakness (CWE)CWE-79read 2026-10-23
- FIRST EPSSEPSS score4.0 %2026-12-04
- OSVaffected packages—
- GitHub AdvisoriesadvisoryModerate2021-03-22
Identifiers
- AZL-6808same flawAzure Linux · MIT
- EUVD-2021-0116same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- GHSA-jq4v-f5q6-mjqqsame flawGitHub Advisory Database · CC-BY-4.0
- PYSEC-2021-19same flawPyPA Advisory Database · CC-BY-4.0
- ALSA-2021:4151advisory covering several CVEsAlmaLinux · MIT
- ALSA-2021:4158advisory covering several CVEsAlmaLinux · MIT
- ALSA-2021:4160advisory covering several CVEsAlmaLinux · MIT
- ALSA-2021:4162advisory covering several CVEsAlmaLinux · MIT
- DLA-2606-1advisory covering several CVEsDebian · LicenseRef-unstated
- DSA-4880-1advisory covering several CVEsDebian · LicenseRef-unstated
- MGASA-2021-0246advisory covering several CVEsMageia · LicenseRef-unstated
- OESA-2021-1178advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2022:0803-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:11473-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2025:14647-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2021:3254advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:4151advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:4158advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:4160advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:4162advisory covering several CVEsRed Hat · CC-BY-4.0
- RLSA-2021:4151advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2021:4158advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2021:4160advisory covering several CVEsRocky Linux · BSD-3-Clause
- RLSA-2021:4162advisory covering several CVEsRocky Linux · BSD-3-Clause
- SUSE-SU-2022:0803-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:0895-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:1729-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:3836-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:3934-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2022:3937-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-4896-1advisory covering several CVEsUbuntu
- USN-4896-2advisory covering several CVEsUbuntu
Technical details
- CVSS v3 vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Published
- 2021-03-21
- Last modified
- 2026-06-17
- NVD status
- Modified
- GitHub advisory
- GHSA-jq4v-f5q6-mjqq
Frequently asked questions
What is CVE-2021-28957?
Is CVE-2021-28957 actively exploited?
What is the CVSS score for CVE-2021-28957?
Running lxml? Hear about its next vulnerability
Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».
No credit card required · No monthly cap on website checks · 250 API requests/month
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- GitHub Advisory Database · CC-BY-4.0 · GHSA-jq4v-f5q6-mjqq
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0
- CISA Vulnrichment · CC0-1.0