CVE-2026-28348

lxml_html_clean: CSS @import Filter Bypass via Unicode Escapes

Published Mar 5, 2026 CVSS 3.1 · 6.1 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

The lxml_html_clean library contained a flaw in its _has_sneaky_javascript() method that removed backslashes before checking for dangerous CSS keywords. This allowed CSS Unicode escape sequences to bypass the @import and expression() filters, meaning an attacker could load external CSS or trigger legacy XSS victims in older browsers.

Affected Systems

Fedora‑Python lxml_html_clean versions prior to 0.4.4 are affected; the vulnerability is present in the library bundled with older Fedora releases or in projects that depend on the unpatched library.

Risk and Exploitability

The CVSS score of 6.1 indicates moderate severity while the EPSS score of less than 1% shows the likelihood of exploitation is low at this time. The vulnerability is not listed in the CISA KEV catalog. Attackers would need to supply crafted HTML content that is processed by a web application using the vulnerable library, and the exploit typically succeeds only in legacy browsers that honor the @import directive and CSS expression() feature. Because it leads to cross‑site scripting, it poses a confidentiality and integrity risk to users of the affected application. The confidentiality and integrity risks are inferred from the CVE description's focus on cross‑site scripting, as they are not explicitly listed in the original CVE text.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade the lxml_html_clean package to version 0.4.4 or later, as the fix removes the backslash stripping bug and properly checks for dangerous CSS patterns.
  • Ensure that all projects and virtual environments that reference lxml_html_clean use the updated library, including any downstream dependencies.
  • Add a secondary sanitization layer or configure the application to explicitly strip or block @import directives and CSS expressions before passing data to lxml_html_clean, providing an additional safeguard against future similar issues.

Generated by OpenCVE AI on April 17, 2026 at 12:40 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4799-1 lxml security update
Github GHSA Github GHSA GHSA-hw26-mmpg-fqfg lxml-html-clean has CSS @import Filter Bypass via Unicode Escapes
History
Type Values Removed Values Added
First Time appeared Fedoralovespython
Fedoralovespython lxml Html Clean
CPEs cpe:2.3:a:fedoralovespython:lxml_html_clean:*:*:*:*:*:python:*:*
Vendors & Products Fedoralovespython
Fedoralovespython lxml Html Clean
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Fedora-python
Fedora-python lxml Html Clean
Vendors & Products Fedora-python
Fedora-python lxml Html Clean
Type Values Removed Values Added
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.
Title lxml_html_clean: CSS @import Filter Bypass via Unicode Escapes
Weaknesses CWE-116
References
Metrics cvssV3_1

{'score': 6.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N'}

Weaknesses
  • CWE-116

    Improper Encoding or Escaping of Output

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Mar 6, 2026, 5:55 PM
Reserved
Feb 26, 2026, 6:38 PM
Status
Analyzed
Published
Mar 5, 2026, 8:16 PM
Modified
Jun 17, 2026, 10:28 AM