Description
css_parser is a Ruby CSS parser. Prior to 2.1.0 and 1.22.0, the CSS Parser gem does not validate HTTPS connections, allowing a Man-in-the-Middle (MITM) attacker to inject or modify CSS content when stylesheets are loaded via HTTPS. The connection is established with OpenSSL::SSL::VERIFY_NONE, meaning any HTTPS certificate—even entirely untrusted—will be accepted without validation. This vulnerability is fixed in 2.1.0 and 1.22.0.
Published: 2026-05-14
Score: 5.8 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The css_parser Ruby gem, before versions 2.1.0 and 1.22.0, does not verify HTTPS certificates when loading external stylesheets. It establishes the connection with OpenSSL::SSL::VERIFY_NONE, accepting any certificate, even an invalid or malicious one. This flaw allows an attacker who can intercept or modify traffic between the application and the stylesheet source to inject or alter CSS content. The compromise affects confidentiality and integrity of the user’s visual interface, potentially enabling UI redirection, spoofing, or other malicious UI manipulation. The weakness aligns with CWE‑295 and CWE‑829 and has an associated CVSS score of 5.8.

Affected Systems

Ruby applications that depend on the premailer css_parser gem and use it to process external stylesheet URLs are vulnerable if they are running a version older than 2.1.0 or 1.22.0. The issue resides in the gem itself and can impact any project that imports or uses css_parser for CSS parsing or fetching.

Risk and Exploitability

The CVSS score indicates a moderate severity, and the EPSS score is not available, suggesting limited publicly known exploitation. The attack requires the attacker to control network traffic between the application and the stylesheet host or to deliver a malicious stylesheet from a trusted source. The vulnerability is not currently listed in the CISA KEV catalog, implying no confirmed exploitation. Nonetheless, because HTTPS is meant to provide confidentiality and integrity, the lack of verification lowers the security posture and enables compromise when attackers can impersonate the stylesheet provider.

Generated by OpenCVE AI on May 14, 2026 at 18:26 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the css_parser gem to version 2.1.0 or 1.22.0 (or any later release that includes the fix).
  • If an upgrade is not immediately possible, configure the application to enforce SSL certificate verification manually—avoid using OpenSSL::SSL::VERIFY_NONE when establishing the connection.
  • Audit all code paths that fetch external CSS resources and restrict accepted sources to trusted hosts, or replace external stylesheets with local copies.

Generated by OpenCVE AI on May 14, 2026 at 18:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-ff6c-w6qf-7xqc CSS Parser: Improper Certificate Validation allows MITM injection of remote CSS content
History

Fri, 15 May 2026 18:15:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 15 May 2026 11:45:00 +0000

Type Values Removed Values Added
First Time appeared Premailer
Premailer css Parser
Vendors & Products Premailer
Premailer css Parser

Thu, 14 May 2026 17:00:00 +0000

Type Values Removed Values Added
Description css_parser is a Ruby CSS parser. Prior to 2.1.0 and 1.22.0, the CSS Parser gem does not validate HTTPS connections, allowing a Man-in-the-Middle (MITM) attacker to inject or modify CSS content when stylesheets are loaded via HTTPS. The connection is established with OpenSSL::SSL::VERIFY_NONE, meaning any HTTPS certificate—even entirely untrusted—will be accepted without validation. This vulnerability is fixed in 2.1.0 and 1.22.0.
Title css_parser allows to MITM included https css urls
Weaknesses CWE-295
CWE-829
References
Metrics cvssV3_1

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


Subscriptions

Premailer Css Parser
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-05-15T18:05:54.862Z

Reserved: 2026-05-05T19:00:06.022Z

Link: CVE-2026-44312

cve-icon Vulnrichment

Updated: 2026-05-15T18:03:38.497Z

cve-icon NVD

Status : Deferred

Published: 2026-05-14T17:16:22.393

Modified: 2026-05-15T19:16:59.240

Link: CVE-2026-44312

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-15T11:21:12Z

Weaknesses