All reports
Medium

lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through

Affected versions

Version ranges need review.

PyPIlxml
Affected versions
Unknown
Fixed version
4.6.5
PyPIlxml
Affected versions
< 4.6.5
Fixed version
4.6.5
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported
Affected versions
Unknown
Fixed version
Not reported

Exploitation

CVE-2021-43818

Probability of exploitation in the next 30 days: 2.66%

FIRST EPSS · 2026-11-23

Description

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.

Links

Credits

  • pwntester