lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through
Date: 2021-12
Affected: pip/lxml
Attack vector: xss
Category: vulnerability-disclosure
Severity: Medium
CVE: CVE-2021-43818
CWE: CWE-74
CWE-79
CVSS: 8.2 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:H/A:N)

### Impact The HTML Cleaner in lxml.html lets certain crafted script content pass through, as well as script content in SVG files embedded using data URIs. Users that employ the HTML cleaner in a security relevant context should upgrade to lxml 4.6.5. ### Patches The issue has been resolved in lxml 4.6.5. ### Workarounds None. ### References The issues are tracked under the report IDs GHSL-2021-1037 and GHSL-2021-1038.


Mitigations:

Architectural layers (MAESTRO):