Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2026-28348: CWE-116: Improper Encoding or Escaping of Output in fedora-python lxml_html_clean

0
Medium
VulnerabilityCVE-2026-28348cvecve-2026-28348cwe-116
Published: Thu Mar 05 2026 (03/05/2026, 19:49:26 UTC)
Source: CVE Database V5
Vendor/Project: fedora-python
Product: lxml_html_clean

Description

lxml_html_clean is a project for HTML cleaning functionalities copied from `lxml.html.clean`. Prior to version 0.4.4, the _has_sneaky_javascript() method strips backslashes before checking for dangerous CSS keywords. This causes CSS Unicode escape sequences to bypass the @import and expression() filters, allowing external CSS loading or XSS in older browsers. This issue has been patched in version 0.4.4.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 03/12/2026, 20:26:07 UTC

Technical Analysis

The vulnerability identified as CVE-2026-28348 affects the lxml_html_clean library, a Python project providing HTML cleaning functionalities derived from lxml.html.clean. The core issue lies in the _has_sneaky_javascript() method, which attempts to detect and filter dangerous CSS constructs such as @import and expression() that could be used for malicious purposes. However, prior to version 0.4.4, this method improperly strips backslashes before performing keyword checks, allowing CSS Unicode escape sequences to evade detection. This bypass enables attackers to inject external CSS or execute cross-site scripting (XSS) attacks, particularly in older browsers that interpret these escape sequences. The vulnerability is categorized under CWE-116, indicating improper encoding or escaping of output. The CVSS v3.1 base score is 6.1, reflecting a medium severity level with network attack vector, low attack complexity, no privileges required, but requiring user interaction. The scope is changed, indicating that the vulnerability can affect components beyond the initially vulnerable library. Although no known exploits have been reported, the flaw poses a tangible risk to applications relying on vulnerable versions of lxml_html_clean for sanitizing HTML content. The issue was publicly disclosed and patched in version 0.4.4, which corrects the filtering logic to properly handle CSS Unicode escapes and prevent bypasses.

Potential Impact

This vulnerability can lead to the injection of malicious CSS or JavaScript code via bypassing sanitization filters, resulting in cross-site scripting (XSS) attacks or unauthorized external CSS loading. For organizations, this can compromise the confidentiality and integrity of user data, enable session hijacking, defacement, or execution of arbitrary scripts in the context of trusted web applications. The impact is particularly significant for web applications that rely on lxml_html_clean for sanitizing user-generated HTML content before rendering it in browsers. Older browsers are more susceptible to exploitation due to their handling of CSS Unicode escapes. While availability is not directly affected, the reputational damage and potential data breaches from successful XSS attacks can be severe. Since the attack requires user interaction, phishing or social engineering could be used to lure victims. The vulnerability affects any organization using vulnerable versions of the library, especially those in sectors with high web application usage such as finance, e-commerce, healthcare, and government services.

Mitigation Recommendations

Organizations should immediately upgrade lxml_html_clean to version 0.4.4 or later, where the vulnerability is patched. Review and audit all instances where lxml_html_clean is used for HTML sanitization to ensure no legacy versions remain in production. Implement additional defense-in-depth measures such as Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts and loading of external CSS resources. Employ rigorous input validation and output encoding on all user-supplied content, especially in web applications accessible via older browsers. Conduct security testing focusing on CSS injection and XSS vectors to detect any residual weaknesses. Educate developers about the risks of improper encoding and escaping, and encourage the use of well-maintained libraries for sanitization. Monitor security advisories for updates or emerging exploits related to this vulnerability. If upgrading immediately is not feasible, consider applying temporary filters or disabling features that rely on vulnerable sanitization until patched.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-02-26T18:38:13.890Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69a9e2f561e8e69ef5e9240e

Added to database: 3/5/2026, 8:09:25 PM

Last enriched: 3/12/2026, 8:26:07 PM

Last updated: 4/20/2026, 2:51:21 AM

Views: 60

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses