CVE-2026-53727: CWE-918: Server-Side Request Forgery (SSRF) in premailer css_parser
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.
AI Analysis
Technical Summary
The css_parser Ruby library's Parser#read_remote_file method is vulnerable to SSRF and local file disclosure due to insufficient validation of URI schemes, hosts, and IP addresses. It follows HTTP redirects recursively, including cross-scheme redirects to file:// URIs, which allows attackers to read arbitrary local files. This vulnerability affects applications that use css_parser with attacker-controlled CSS and the base_uri option, such as Premailer. The vulnerability permits arbitrary HTTP/HTTPS requests to internal and external hosts, local file existence enumeration, and partial local file content disclosure constrained by CSS grammar. Additionally, attacker-controlled gzip payloads can cause resource exhaustion through forced decompression. There is no known patch or official fix available at this time.
Potential Impact
Successful exploitation allows attackers to perform SSRF attacks, making arbitrary HTTP/HTTPS requests to internal and external hosts. It also enables local file existence enumeration and partial disclosure of local file contents on the vulnerable system. The vulnerability can lead to resource exhaustion via forced decompression of attacker-controlled gzip payloads. These impacts can compromise confidentiality and availability of the affected system. No known exploits in the wild have been reported so far.
Mitigation Recommendations
No official patch or fix is currently available for this vulnerability. Users of the css_parser library versions prior to 3.0.0 should avoid processing attacker-controlled CSS with the base_uri option enabled. Monitor vendor advisories for updates regarding patches or official remediation. Until a fix is released, restrict usage scenarios that allow untrusted input to be processed by the vulnerable method.
CVE-2026-53727: CWE-918: Server-Side Request Forgery (SSRF) in premailer css_parser
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.
CVSS v4.0
Score 8.9high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The css_parser Ruby library's Parser#read_remote_file method is vulnerable to SSRF and local file disclosure due to insufficient validation of URI schemes, hosts, and IP addresses. It follows HTTP redirects recursively, including cross-scheme redirects to file:// URIs, which allows attackers to read arbitrary local files. This vulnerability affects applications that use css_parser with attacker-controlled CSS and the base_uri option, such as Premailer. The vulnerability permits arbitrary HTTP/HTTPS requests to internal and external hosts, local file existence enumeration, and partial local file content disclosure constrained by CSS grammar. Additionally, attacker-controlled gzip payloads can cause resource exhaustion through forced decompression. There is no known patch or official fix available at this time.
Potential Impact
Successful exploitation allows attackers to perform SSRF attacks, making arbitrary HTTP/HTTPS requests to internal and external hosts. It also enables local file existence enumeration and partial disclosure of local file contents on the vulnerable system. The vulnerability can lead to resource exhaustion via forced decompression of attacker-controlled gzip payloads. These impacts can compromise confidentiality and availability of the affected system. No known exploits in the wild have been reported so far.
Mitigation Recommendations
No official patch or fix is currently available for this vulnerability. Users of the css_parser library versions prior to 3.0.0 should avoid processing attacker-controlled CSS with the base_uri option enabled. Monitor vendor advisories for updates regarding patches or official remediation. Until a fix is released, restrict usage scenarios that allow untrusted input to be processed by the vulnerable method.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-9pmc-p236-855h
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-53727"]
- Ecosystems
- ["RubyGems"]
- Database Specific Severity
- HIGH
- Cvss Version
- 4.0
Threat ID: 6a50bac868715ace435892a4
Added to database: 07/10/2026, 09:26:32 UTC
Last enriched: 07/18/2026, 11:18:31 UTC
Last updated: 07/21/2026, 05:31:24 UTC
Views: 76
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.