CVE-2021-28957
- State
- Published
- Severity
- 6.1 Medium
- Published
- Mar 21, 2021
- Updated
- Dec 17, 2025
- Reserved
- Mar 21, 2021
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.
Scores
| CVSS | Score | Vector | Source |
|---|---|---|---|
| 3.1 | 6.1 Medium | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N | CISA-ADP |
Weaknesses
- CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Products
| Product | Versions |
|---|---|
n/an/a |
|
References
- https://bugs.launchpad.net/lxml/+bug/1888153
- https://github.com/lxml/lxml/pull/316/commits/10ec1b4e9f93713513a3264ed6158af22492f270
- [debian-lts-announce] 20210324 [SECURITY] [DLA 2606-1] lxml security updatemailing-list
- DSA-4880vendor-advisory
- FEDORA-2021-28723f9670vendor-advisory
- FEDORA-2021-4cdb0f68c7vendor-advisory
- https://www.oracle.com/security-alerts/cpuoct2021.html
- https://github.com/lxml/lxml/commit/a5f9cb52079dc57477c460dbe6ba0f775e14a999
- https://security.netapp.com/advisory/ntap-20210521-0004/
- GLSA-202208-06vendor-advisory
Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.