GitHub Advisoryadvisory · PyPI

GHSA-jq4v-f5q6-mjqq lxml vulnerable to Cross-Site Scripting

MEDIUM Published 2021-03-22 Modified 2024-09-30 Official page ↗
Aliases
CVE-2021-28957
Ecosystem
PyPI
Packages
lxml
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weaknesses
CWE-79
Reviewed
2021-03-22

Affected packages

• PyPI lxml: < 4.6.3 → fixed in 4.6.3

Description

An XSS vulnerability was discovered in the python `lxml` 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.

Related

Alias · CVE (1)

  • CVE-2021-28957 An XSS vulnerability was discovered in python-lxml's clean module versions before 4.6.3. vulnerability

Weakness · CWE (1)

  • CWE-79 Improper Neutralization of Input During Web Page Generation weakness

References