Description
css_parser is a Ruby CSS parser. From 2.2.0 until 3.0.0, CssParser::Parser#read_remote_file in lib/css_parser/parser.rb, and therefore load_uri! and the @import-following branch of add_block!, issued HTTP and HTTPS requests against any host, port, and URI without a scheme allowlist, host or IP filtering, or protection against link-local, loopback, or RFC-1918 addresses. Location: redirects were followed recursively back into the same function, which also serviced file:// URIs, so a single attacker-controlled HTTP redirect could upgrade the bug from SSRF to arbitrary local file disclosure. Any consumer of css_parser that hands it attacker-influenced CSS together with a base_uri: option is exposed. This issue is fixed in version 3.0.0.
Published: 2026-07-17
Score: 8.9 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability resides in css_parser’s read_remote_file method, which processes URLs in CSS without any scheme allowlist or host filtering. An attacker can supply a CSS file that references any HTTP, HTTPS, or file:// URI, causing the parser to perform an HTTP request or local file read. A malicious HTTP redirect can turn a simple external retrieval into an arbitrary local file disclosure, exposing sensitive files on the server. The flaw is a classic SSRF (CWE‑918) that enables remote hosts to read local data.

Affected Systems

The affected library is Premailer’s css_parser, versions 2.2.0 through 2.9.x. Any application that uses css_parser to parse attacker‑controlled CSS and supplies a base_uri option is vulnerable. The problem is fixed in 3.0.0 and later releases.

Risk and Exploitability

The CVSS score of 8.9 indicates high severity, EPSS score of less than 1% shows that exploitation is considered rare at present, and the vulnerability is not listed in CISA’s KEV catalog. Nonetheless, the flaw is exploitable from any web application that processes CSS from external or untrusted sources; the attack vector is a remote HTTP request or redirect, inferred from the description of recursive redirects and file:// handling.

Generated by OpenCVE AI on July 30, 2026 at 23:28 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade css_parser to version 3.0.0 or later, which removes the ability to request arbitrary URLs
  • If an update is not possible, configure the application to disallow any base_uri or to reject CSS containing external URLs, thereby preventing the parser from making HTTP/HTTPS requests
  • Place the application behind a network layer that blocks outbound requests to loopback, RFC‑1918, or link‑local addresses, reducing the risk of internal disclosure via SSRF or redirects

Generated by OpenCVE AI on July 30, 2026 at 23:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-9pmc-p236-855h Ruby CSS Parser: SSRF and Local File Disclosure in `CssParser::Parser#read_remote_file`
History

Tue, 21 Jul 2026 00:15:00 +0000

Type Values Removed Values Added
References
Metrics threat_severity

None

cvssV3_1

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

threat_severity

Important


Mon, 20 Jul 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Fri, 17 Jul 2026 21:45:00 +0000

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

Fri, 17 Jul 2026 20:45:00 +0000

Type Values Removed Values Added
Description css_parser is a Ruby CSS parser. From 2.2.0 until 3.0.0, CssParser::Parser#read_remote_file in lib/css_parser/parser.rb, and therefore load_uri! and the @import-following branch of add_block!, issued HTTP and HTTPS requests against any host, port, and URI without a scheme allowlist, host or IP filtering, or protection against link-local, loopback, or RFC-1918 addresses. Location: redirects were followed recursively back into the same function, which also serviced file:// URIs, so a single attacker-controlled HTTP redirect could upgrade the bug from SSRF to arbitrary local file disclosure. Any consumer of css_parser that hands it attacker-influenced CSS together with a base_uri: option is exposed. This issue is fixed in version 3.0.0.
Title css_parser: SSRF and Local File Disclosure in `CssParser::Parser#read_remote_file`
Weaknesses CWE-918
References
Metrics cvssV4_0

{'score': 8.9, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N'}


Subscriptions

Premailer Css Parser
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-20T13:48:30.250Z

Reserved: 2026-06-10T16:43:31.242Z

Link: CVE-2026-53727

cve-icon Vulnrichment

Updated: 2026-07-20T13:48:19.492Z

cve-icon NVD

No data.

cve-icon Redhat

Severity : Important

Publid Date: 2026-07-17T20:30:37Z

Links: CVE-2026-53727 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-07-30T23:30:08Z

Weaknesses
  • CWE-918

    Server-Side Request Forgery (SSRF)