Skip to main content

CSS Parser EUVDEUVD-2026-30330

| CVE-2026-44312 MEDIUM
Improper Certificate Validation (CWE-295)
2026-05-07 https://github.com/premailer/css_parser GHSA-ff6c-w6qf-7xqc
5.8
CVSS 3.1 · Vendor: https://github.com/premailer/css_parser
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Recon
    Position on network path
  2. Delivery
    Intercept HTTPS request to stylesheet URL
  3. Exploit
    Present forged certificate to client
  4. Install
    CSS Parser accepts cert without validation
  5. C2
    Inject malicious CSS into response
  6. Execute
    Application loads and applies injected CSS
  7. Impact
    User sees attacker-controlled content

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V12 - Secure Communication Certificate validation
Exploitation Conditions

The vulnerability requires two specific conditions: first, the application must call CSS Parser to load stylesheets from HTTPS URLs (either directly via css_parser gem or indirectly through a dependency); second, an attacker must be positioned on the network path between the application and the remote stylesheet host to intercept and modify the HTTPS traffic. CSS Parser will not validate any HTTPS certificate when loading remote stylesheets, regardless of the certificate's validity or issuer. No special configuration or non-default settings are required-the vulnerability is present by default in all versions < 2.1.0 when loading stylesheets via HTTPS. The impact is limited to CSS injection and content manipulation; it does not directly enable remote code execution on the application server unless the application uses parsed CSS in an unsafe context (e.g., evaluating CSS as code).

Impact

CVSS 5.8 (AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N) correctly indicates network-based attack requiring low complexity and no user interaction, with integrity impact across scope boundaries. However, real-world risk is conditional on deployment context: if the application loads stylesheets only from trusted first-party HTTPS sources over secure networks, practical exploitation is unlikely; if stylesheets are loaded from third-party URLs or over untrusted networks (public WiFi, ISP-level compromise, state-level interception), risk is substantially higher. The absence of EPSS score and KEV listing suggests this is not yet confirmed as actively exploited in the wild, though a public proof-of-concept exists and the attack is trivially reproducible with standard MITM tools (mitmproxy, Burp Suite). This is a real vulnerability with clear exploitation prerequisites: the attacker must be on the network path AND the application must load stylesheets via HTTPS. Organizations with network segmentation and TLS traffic inspection should assess whether their deployment model creates exposure. The patch (version 2.1.0) is available and straightforward to apply, making this a high-priority remediation for affected applications without special constraints.

Exploit ScenarioDerived

An attacker on a network path (compromised WiFi router, ISP, or BGP hijack) intercepts HTTPS requests from an application using CSS Parser to load a remote stylesheet (e.g., https://cdn.example.com/style.css). The attacker presents a self-signed certificate, which CSS Parser accepts due to disabled validation. The attacker injects malicious CSS into the response-such as hiding elements, stealing form data via CSS attribute selectors, or defacing the page layout. The application receives and renders the injected CSS without warning, and users see the attacker-controlled content.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – May 07, 2026

CSS Parser gem disables HTTPS certificate validation by setting OpenSSL::SSL::VERIFY_NONE, allowing man-in-the-middle attackers to inject or modify CSS content loaded via HTTPS. Any application using CSS Parser versions prior to 2.1.0 to fetch external stylesheets over HTTPS can be exploited by network-positioned attackers without authentication. A proof-of-concept using mitmproxy or Burp Suite demonstrates practical exploitation; CVSS 5.8 reflects the network attack vector and integrity impact, but real-world risk depends on whether the application loads stylesheets from untrusted or attacker-controllable URLs and whether the attacker can intercept network traffic.

RemediationAI

Upgrade CSS Parser to version 2.1.0 or later, which restores proper HTTPS certificate validation. Update your Gemfile to specify gem 'css_parser', '>= 2.1.0' and run bundle update css_parser. If immediate upgrade is not possible, implement network-level mitigations: restrict CSS stylesheet loading to first-party HTTPS sources only, disable loading of remote stylesheets if not required by the application, implement certificate pinning for known remote stylesheet hosts (if feasible with Ruby SSL libraries), or deploy TLS-terminating proxies with certificate validation at the network boundary. These workarounds have trade-offs: disabling remote stylesheet loading may break functionality, certificate pinning requires maintenance, and network-level controls introduce operational complexity. The preferred fix remains upgrading to 2.1.0, which is a minor version bump with no expected breaking changes.

Affected VersionsENISA

css_parser 2.0.0, < 2.1.0
css_parser < 1.22.0

Affected Packages

rubygems css_parser fix: 1.22.0, 2.1.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in rubygems

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CSS Parser (RubyGems package css_parser) is a Ruby library for parsing and manipulating CSS stylesheets. The vulnerability stems from improper certificate validation (CWE-295) in the HTTP client used to fetch remote stylesheets. When loading stylesheets via HTTPS, the library explicitly sets OpenSSL::SSL::VERIFY_NONE in lib/css_parser/parser.rb (line 646), which disables validation of the remote server's X.509 certificate chain. This allows any certificate-including self-signed, expired, or issued for a different domain-to be accepted without verification. An attacker positioned on the network path (via ARP spoofing, DNS hijacking, BGP hijacking, or compromised network infrastructure) can present a fake certificate and intercept, modify, or inject CSS content. The flaw affects all versions prior to 2.1.0 that use HTTPS URLs for stylesheet retrieval.

Know when OpenSSL gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/premailer/css_parser) PRIMARY 5.8 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N
SUSE MEDIUM
Red Hat 5.8 MEDIUM

Primary rating from Vendor (https://github.com/premailer/css_parser).

CVSS VectorVendor: https://github.com/premailer/css_parser

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Changed
Confidentiality
None
Integrity
Low
Availability
None

DescriptionCVE.org

Summary

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.

Details

In lib/css_parser/parser.rb, the HTTP client sets: https://github.com/premailer/css_parser/blob/3f91e8db7547fac50ab50cb7f9920f785f722740/lib/css_parser/parser.rb#L646

ruby
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

As a result, the library does not validate the authenticity of HTTPS connections and does not protect against man-in-the-middle attacks. Any attacker in a position to intercept network traffic can inject or modify CSS loaded via HTTPS URLs without detection or warning.

PoC

  1. Set up a test Ruby project that uses the CSS Parser gem and loads an external stylesheet over HTTPS.
  2. Use a local proxy (such as mitmproxy or Burp Suite) to intercept outgoing HTTPS requests.
  3. Present a fake self-signed certificate to the client.
  4. Inject custom CSS into the intercepted HTTPS response.

The request will succeed and the injected CSS will be delivered to the application, as the connection is not validated.

Resources

https://github.com/premailer/css_parser/issues/185

Impact

Applications using CSS Parser to load remote stylesheets over HTTPS are vulnerable to CSS injection and content manipulation, regardless of the trust status of the remote server. All users who use CSS Parser to fetch external CSS over HTTPS may be impacted.

Credit

This vulnerability was uncovered by @JLLeitschuh of the @braze-inc security team.

Threat Intelligence Overview

EPSS Score
0.0%
Top 96% exploitable
Threat Intel
1
1 source
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

29
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +29
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

CVE-2014-0160 HIGH POC
7.5 Apr 07

The (1) TLS and (2) DTLS implementations in OpenSSL 1.0.1 before 1.0.1g do not properly handle Heartbeat Extension packe

CVE-2021-3711 CRITICAL POC
9.8 Aug 24

In order to decrypt SM2 encrypted data an application is expected to call the API function EVP_PKEY_decrypt(). Rated cri

CVE-2014-0195 MEDIUM POC
6.8 Jun 05

The dtls1_reassemble_fragment function in d1_both.c in OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2016-0800 MEDIUM POC
5.9 Mar 01

The SSLv2 protocol, as used in OpenSSL before 1.0.1s and 1.0.2 before 1.0.2g and other products, requires a server to se

CVE-2015-0204 MEDIUM POC
4.3 Jan 09

The ssl3_get_key_exchange function in s3_clnt.c in OpenSSL before 0.9.8zd, 1.0.0 before 1.0.0p, and 1.0.1 before 1.0.1k

CVE-2022-2068 HIGH
7.3 Jun 21

In addition to the c_rehash shell command injection identified in CVE-2022-1292, further circumstances where the c_rehas

CVE-2015-4000 LOW POC
3.7 May 21

The TLS protocol 1.2 and earlier, when a DHE_EXPORT ciphersuite is enabled on a server but not on a client, does not pro

CVE-2014-3566 LOW POC
3.4 Oct 15

The SSL protocol 3.0, as used in OpenSSL through 1.0.1i and other products, uses nondeterministic CBC padding, which mak

CVE-2016-2107 MEDIUM POC
5.9 May 05

The AES-NI implementation in OpenSSL before 1.0.1t and 1.0.2 before 1.0.2h does not consider memory allocation during a

CVE-2015-1793 MEDIUM POC
6.5 Jul 09

The X509_verify_cert function in crypto/x509/x509_vfy.c in OpenSSL 1.0.1n, 1.0.1o, 1.0.2b, and 1.0.2c does not properly

CVE-2022-3602 HIGH
7.5 Nov 01

A buffer overrun can be triggered in X.509 certificate verification, specifically in name constraint checking. Rated hig

Vendor StatusVendor

SUSE

Severity: Medium

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy