XSS in Lxml

CVE-2021-28957

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.

Vulnerability class: XSS (Cross-Site Scripting)

Published · last modified .

CVSS v3 metric

CVSS v3 base score 6.1 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.

EPSS exploit prediction

EPSS: 0.040 (90.5th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 90th percentile — 90.5% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2021-28957: held from 0.040 to 0.040.

EPSS over last 30 days · oldest: 0.040 · newest: 0.040 · change: 0.000

Affected products

Weakness classification (CWE)

Public proof-of-concept exploits

References

Frequently asked questions

What is CVE-2021-28957?
CVE-2021-28957 is a medium-severity vulnerability in Lxml, classified under Cross-site Scripting. CVSS score: 6.1/10. Published 2021-03-21.
How severe is CVE-2021-28957?
Medium severity. CVSS v3 base score is 6.1 out of 10.
Is CVE-2021-28957 known to be exploited?
1 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.