Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
💎 RubyGems

GHSA-ff6c-w6qf-7xqc

MEDIUMFix: premailer/css_parser@35e689c

GHSA-ff6c-w6qf-7xqc is a medium-severity (CVSS 5.8) CWE-295 vulnerability in css_parser. O3 Security confirms whether GHSA-ff6c-w6qf-7xqc is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

CSS Parser: Improper Certificate Validation allows MITM injection of remote CSS content

Also known asCVE-2026-44312
Published
May 7, 2026
Updated
Jun 8, 2026
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed

Real-World Exposure

2 pkgs affected
💎css_parser💎css_parser

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.

Description

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

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.

References

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.

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
💎RubyGemscss_parser2.0.0&&< 2.1.02.1.0
💎RubyGemscss_parserall versions1.22.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for css_parser. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update css_parser to 2.1.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-ff6c-w6qf-7xqc is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-ff6c-w6qf-7xqc is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-ff6c-w6qf-7xqc. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### 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 l
O3 Security · Impact-Aware SCA

Is GHSA-ff6c-w6qf-7xqc in your dependencies?

O3 detects GHSA-ff6c-w6qf-7xqc across RubyGems dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.