Advisory

GHSA-jq4v-f5q6-mjqq

Also known as: CVE-2021-28957, PYSEC-2021-19

Summary

lxml vulnerable to Cross-Site Scripting

Details

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2021-03-22 16:53 UTC
Modified
2024-09-30 17:01 UTC

Affected packages and fixes

lxml

PyPI · All systems

Affected

  • introduced 0, fixed 4.6.3 (ecosystem)

Fixed versions

4.6.3

Fix

  • Fixed version 4.6.3
    pip install --upgrade lxml==4.6.3

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences