VDB
Sign up
MEDIUM6.1

PYSEC-2026-2202

Quick fix

PYSEC-2026-2202 — lxml-html-clean: upgrade to the fixed version with the command below.

pip install --upgrade 'lxml-html-clean>=0.4.4'

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.

Are you affected?

Enter the version of the package you're using.

Affected packages

PyPI/lxml-html-clean
Introduced in: 0Fixed in: 0.4.4
Fixpip install --upgrade 'lxml-html-clean>=0.4.4'

References