CVE-2026-28350: fedora-python lxml_html_clean · Improper Encoding or Escaping of Output
Affects fedora-python lxml_html_cleanSource CVE Database V5
Not known to be exploited · CVSS 6.1 Medium : upgrade to 0.4.4 when convenient.
Data as of 30 Oct 2026, 11:52 UTC
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 19% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 0.4.4
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 5 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.
What to do
Upgrade lxml_html_clean and fedora-python/lxml_html_clean to 0.4.4.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| fedora-pythonlxml_html_clean | Affected
| Fixed in
|
GitHubfedora-python/lxml_html_cleanpkg:github/fedora-python/lxml_html_cleanOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
The primary mitigation is to upgrade lxml_html_clean to version 0.4.4 or later, where the <base> tag is properly handled and sanitized. For organizations unable to upgrade immediately, implement additional HTML sanitization layers that explicitly remove or neutralize <base> tags before or after using lxml_html_clean. Review and restrict the sources of HTML content being cleaned to trusted inputs where possible. Employ Content Security Policy (CSP) headers to limit the impact of malicious redirects and reduce the risk of phishing. Educate users to be cautious with links, especially those that appear suspicious or redirect unexpectedly. Monitor web application logs for unusual link redirection patterns that may indicate exploitation attempts. Finally, integrate automated security testing to detect improper HTML sanitization in development pipelines.
Description
### 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 ```python 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.