CVE-2021-28957
CVSS v3
6.1
MEDIUM
EPSS Score
4.0 %
exploit probability, as of 2026-10-19
CISA KEV
No
known exploited
Exploitation
—
SSVC status
Get an alert for each new CVE published for lxml.
Affected and fixed versions
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
- lxmlPyPIall versions · fixed in 4.6.3
- babelAlmaLinux:8all versions · fixed in 2.5.1-10.module_el8.6.0+2781+fed64c13and 1 other package
- python-nose-docsAlmaLinux:8all versions · fixed in 1.3.7-31.module_el8.5.0+2569+5c5719bc
- python-sqlalchemy-docAlmaLinux:8all versions · fixed in 1.3.2-2.module_el8.5.0+2569+5c5719bc
- python2-attrsAlmaLinux:8all versions · fixed in 17.4.0-10.module_el8.6.0+2781+fed64c13
- python2-backportsAlmaLinux:8all versions · fixed in 1.0-16.module_el8.6.0+2781+fed64c13
- python2-backports-ssl_match_hostnameAlmaLinux:8all versions · fixed in 3.5.0.1-12.module_el8.6.0+2781+fed64c13
- python2-chardetAlmaLinux:8all versions · fixed in 3.0.4-10.module_el8.6.0+2781+fed64c13
99 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
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
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.
Technical details
- Published
- 2021-03-21
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
CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.
Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 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? CVE Watch alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.