Every CVE Search/ Get API key

CVE-2026-28350

lxml_html_clean: <base> tag injection through default Cleaner configuration

6.1 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

0.30%Up 0.3 points since Mar 6, 2026
90%50%10%1%

What each source reports

CVE List Score used 6.1

lxml_html_clean: <base> tag injection through default Cleaner configuration

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.

Record
CVE-2026-28350
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-116
Updated
2026-11-02
EUVDEUVD-2026-20098 6.1

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.

Record
EUVD-2026-20098
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
GitHub AdvisoriesGHSA-xvp8-3mhv-424c 6.1

lxml-html-clean has <base> tag injection through default Cleaner configuration

Summary

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.

Details

The <base> tag is not currently in the page_structure kill set. Even though the specification says <base> must be inside <head>, browsers accept <base> tags outside of the head.

If an attacker injects a <base> tag, it changes the base URL for all relative URLs on the page (links, images, scripts) to a domain controlled by the attacker.

PoC

from lxml_html_clean import clean_html

# The base tag is preserved in the output
result = clean_html('<base href="http://evil.com/"><a href="/account">Account</a>')
print(result)
# Output: <div><base href="http://evil.com/">...<a href="/account">Account</a></div>

Impact

The injection of a <base> tag allows an attacker to hijack the resolution of all relative URLs on the page. This results in three critical attack vectors:

  1. Phishing & Redirection: Attackers can redirect user navigation (e.g., <a href="/login">) and form submissions (e.g., <form action="/auth">) to an attacker-controlled domain, effectively stealing credentials or sensitive data without the user realizing they have left the legitimate site.
  2. Cross-Site Scripting (XSS): If the victim application loads JavaScript files using relative paths (e.g., <script src="assets/app.js">), the browser will attempt to fetch the script from the attacker's domain. This upgrades the vulnerability from HTML injection to full Stored XSS.
  3. Defacement: Relative references to images (<img>) and stylesheets (<link>) will be loaded from the attacker's server, allowing for UI redressing or defacement.
Record
GHSA-xvp8-3mhv-424c
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-116
Updated
2026-11-02
NVD 6.1

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.

Record
CVE-2026-28350
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-116
Updated
2026-11-02
OSV 6.1

lxml_html_clean: <base> tag injection through default Cleaner configuration

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.

Record
CVE-2026-28350
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-116
Updated
2026-11-02
OSVDEBIAN-CVE-2026-28350 6.1

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.

Record
DEBIAN-CVE-2026-28350
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
Show 5 moreShow less
OSVGHSA-xvp8-3mhv-424c 6.1

lxml-html-clean has <base> tag injection through default Cleaner configuration

Summary

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.

Details

The <base> tag is not currently in the page_structure kill set. Even though the specification says <base> must be inside <head>, browsers accept <base> tags outside of the head.

If an attacker injects a <base> tag, it changes the base URL for all relative URLs on the page (links, images, scripts) to a domain controlled by the attacker.

PoC

from lxml_html_clean import clean_html

# The base tag is preserved in the output
result = clean_html('<base href="http://evil.com/"><a href="/account">Account</a>')
print(result)
# Output: <div><base href="http://evil.com/">...<a href="/account">Account</a></div>

Impact

The injection of a <base> tag allows an attacker to hijack the resolution of all relative URLs on the page. This results in three critical attack vectors:

  1. Phishing & Redirection: Attackers can redirect user navigation (e.g., <a href="/login">) and form submissions (e.g., <form action="/auth">) to an attacker-controlled domain, effectively stealing credentials or sensitive data without the user realizing they have left the legitimate site.
  2. Cross-Site Scripting (XSS): If the victim application loads JavaScript files using relative paths (e.g., <script src="assets/app.js">), the browser will attempt to fetch the script from the attacker's domain. This upgrades the vulnerability from HTML injection to full Stored XSS.
  3. Defacement: Relative references to images (<img>) and stylesheets (<link>) will be loaded from the attacker's server, allowing for UI redressing or defacement.
Record
GHSA-xvp8-3mhv-424c
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-116
Updated
2026-11-02
OSVPYSEC-2026-2202 6.1

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.

Record
PYSEC-2026-2202
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVUBUNTU-CVE-2026-28350 6.1

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.

Record
UBUNTU-CVE-2026-28350
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-02
OSVopenSUSE-SU-2026:10322-1 No score

python311-lxml_html_clean-0.4.4-1.1 on GA media

These are all security issues fixed in the python311-lxml_html_clean-0.4.4-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2026:10322-1
Updated
2026-11-02
OSVopenSUSE-SU-2026:20345-1 No score

Security update for python-lxml_html_clean

This update for python-lxml_html_clean fixes the following issues:

Changes in python-lxml_html_clean:

  • CVE-2026-28348: improper keywords checking can allow external CSS loading (bsc#1259378)
  • CVE-2026-28350: lack of base tag handling can allow the hijacking of the resolution of relative URLs (bsc#1259379)
Record
openSUSE-SU-2026:20345-1
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
lxml-html-clean
PyPI
through 0.4.3
0.4.4
lxml
Debian:12
before 4.9.2-1+deb12u1, plus listed versions
4.9.2-1
4.9.2-1+deb12u1
lxml
Debian:13
before 5.2.0-1
5.2.0-1
lxml
Debian:14
before 5.2.0-1
5.2.0-1
lxml-html-clean
Debian:13
before 0.4.4-1~deb13u1, plus listed versions
0.4.2-10.4.3-1
0.4.4-1~deb13u1
lxml-html-clean
Debian:14
before 0.4.4-1, plus listed versions
0.4.2-10.4.3-10.4.4-1~deb13u1
0.4.4-1
lxml-html-clean
PyPI
before 0.4.4, plus listed versions
0.1.00.1.10.2.00.2.10.2.2
Show 6 moreShow less
0.3.00.3.10.4.00.4.10.4.20.4.3
0.4.4
lxml-html-clean
Ubuntu:24.04:LTS
All versions, plus listed versions
0.1.0-0ubuntu10.1.1-1
None known
lxml-html-clean
Ubuntu:25.10
All versions, plus listed versions
0.4.1-10.4.2-1
None known
lxml-html-clean
Ubuntu:26.10
All versions, plus listed versions
0.4.4-10.4.5-1
None known
lxml-html-clean
Ubuntu:26.04:LTS
All versions, plus listed versions
0.4.2-10.4.3-10.4.4-1
None known
python-lxml_html_clean
openSUSE:Tumbleweed
From an advisory covering 2 CVEs
before 0.4.4-1.1
0.4.4-1.1
python-lxml_html_clean
openSUSE:Leap 16.0
From an advisory covering 2 CVEs
before 0.4.2-bp160.2.1
0.4.2-bp160.2.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2026-28350 is a medium vulnerability (CVSS 6.1) in Fedora-python Lxml Html Clean, published March 2, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.30%, the 22nd percentile. Fixed in lxml-html-clean 0.4.4.

References

Show 7 moreShow less
MoveEnter Open