CVE-2021-28957
Python vulnerability analysis and mitigation

Overview

CVE-2021-28957 is a cross-site scripting (XSS) vulnerability discovered in python-lxml's clean module versions before 4.6.3. The vulnerability was discovered by Kevin Chung and disclosed on March 21, 2021. The issue affects the HTML sanitization functionality in lxml, specifically when the safeattrsonly and forms arguments are disabled (Launchpad Bug, NVD).

Technical details

The vulnerability occurs because the Cleaner class does not properly remove the HTML5 formaction attribute when the safeattrsonly and forms arguments are disabled. While the HTML action attribute is properly sanitized, the formaction attribute bypasses the sanitizer's protections. The vulnerability has a CVSS v3.1 base score of 6.1 (Medium) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N (NVD).

Impact

A remote attacker could exploit this vulnerability to execute arbitrary JavaScript code in the context of users who interact with incorrectly sanitized HTML. This could lead to disclosure of sensitive information or modification of data when users interact with maliciously crafted content (NVD, NetApp Advisory).

Mitigation and workarounds

The vulnerability was patched in lxml version 4.6.3. Users should upgrade to this version or later to address the issue. The fix adds the formaction attribute to the list of attributes that are removed by the sanitizer when JavaScript is disabled (GitHub Commit, Debian Advisory).

Community reactions

Multiple vendors and distributions released security advisories and patches for this vulnerability, including Debian, Fedora, Red Hat, NetApp, and Oracle. The issue was treated as a moderate severity security concern by most vendors (Debian Advisory, NetApp Advisory, Oracle CPU).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66423HIGH7.1
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-66454MEDIUM6.5
  • PythonPython
  • arcade-mcp-server
NoYesDec 02, 2025
CVE-2025-66424MEDIUM6.5
  • PythonPython
  • trytond
NoYesNov 30, 2025
CVE-2025-66422MEDIUM4.3
  • PythonPython
  • tryton-server
NoYesNov 30, 2025
CVE-2025-65858LOW3.5
  • PythonPython
  • calibreweb
NoNoDec 02, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management