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

AILast updated: 03/05/2026, 20:24:31 UTC

Technical Analysis

The vulnerability identified as CVE-2026-28348 affects the lxml_html_clean project, a Python library used for HTML content cleaning, which is derived from lxml.html.clean. The core of the issue lies in the _has_sneaky_javascript() method, which attempts to detect and filter out dangerous CSS constructs such as @import and expression() to prevent malicious CSS from executing. However, prior to version 0.4.4, this method improperly strips backslashes before performing these checks. This flawed logic allows attackers to use CSS Unicode escape sequences to obfuscate these dangerous keywords, effectively bypassing the filters. As a result, malicious CSS can be injected that loads external stylesheets or executes JavaScript via CSS expressions, leading to cross-site scripting (XSS) vulnerabilities, particularly in older browsers that support these CSS features. The vulnerability impacts the confidentiality and integrity of affected applications by enabling unauthorized script execution and data leakage. The issue does not affect availability and requires user interaction but no privileges or authentication. The vulnerability has been addressed in version 0.4.4 of lxml_html_clean by correcting the filtering logic to properly handle escape sequences. No known exploits have been reported in the wild as of the publication date.

Potential Impact

This vulnerability can lead to cross-site scripting (XSS) attacks, allowing attackers to execute arbitrary scripts in the context of affected web applications. This compromises user confidentiality by potentially exposing sensitive data such as cookies, session tokens, or personal information. Integrity is also at risk as attackers could manipulate the content displayed to users or perform actions on their behalf. Although the vulnerability does not impact system availability, the trustworthiness of affected applications is undermined. Organizations using vulnerable versions of lxml_html_clean in their web applications or services that process HTML content are at risk, especially if they serve users with older browsers susceptible to CSS expression exploitation. The lack of authentication requirements and the possibility of remote exploitation increase the threat level. However, the need for user interaction and the medium CVSS score suggest a moderate risk overall. Failure to patch could lead to targeted attacks, data breaches, and reputational damage.

Mitigation Recommendations

To mitigate this vulnerability, organizations should upgrade all instances of lxml_html_clean to version 0.4.4 or later, where the issue has been fixed. Additionally, developers should review and enhance input validation and sanitization routines to ensure that CSS content is properly escaped and filtered, especially focusing on handling Unicode escape sequences and other obfuscation techniques. Employ Content Security Policy (CSP) headers to restrict the loading of external stylesheets and the execution of inline scripts, reducing the impact of potential XSS attacks. Regularly audit and update third-party libraries to incorporate security patches promptly. For legacy systems that cannot upgrade immediately, consider implementing additional server-side filtering or proxy-based sanitization to detect and block malicious CSS payloads. Educate developers and security teams about the risks of improper encoding and escaping in HTML and CSS processing to prevent similar issues in future development.

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/5/2026, 8:24:31 PM

Last updated: 3/5/2026, 11:42:58 PM

Views: 6

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 in Console -> Billing 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