CVE-2021-28957

python-lxml: Missing input sanitization for formaction HTML5 attributes may lead to XSS

Published Mar 21, 2021 CVSS 3.1 · 6.1 Medium EPSS 4.0% KEV · Not listed
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.

Analysis

No analysis available yet

Remediation

No remediation available yet

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-2606-1 lxml security update
Debian DSA Debian DSA DSA-4880-1 lxml security update
EUVD EUVD EUVD-2021-0116 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.
Github GHSA Github GHSA GHSA-jq4v-f5q6-mjqq lxml vulnerable to Cross-Site Scripting
Ubuntu USN Ubuntu USN USN-4896-1 lxml vulnerability
Ubuntu USN Ubuntu USN USN-4896-2 lxml vulnerability
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Weaknesses
  • CWE-79

    Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Sources

Status
PUBLISHED
Assigner
mitre
Published
Updated
Dec 17, 2025, 9:31 PM
Reserved
Mar 21, 2021, 12:00 AM
Status
Modified
Published
Mar 21, 2021, 5:15 AM
Modified
Jun 17, 2026, 3:47 AM
Severity
Moderate
Public date
Mar 21, 2021, 12:00 AM