PyPA Advisory Database
PYSEC-2026-2202
Details
lxml_html_clean is a project for HTML cleaning functionalities copied from lxml.html.clean. Prior to version 0.4.4, the <base> tag passes through the default Cleaner configuration. While page_structure=True removes html, head, and title tags, there is no specific handling for <base>, allowing an attacker to inject it and hijack relative links on the page. This issue has been patched in version 0.4.4.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| PyPI | lxml-html-clean | All versions before 0.4.4 (fixed in 0.4.4) |