GHSA-ff6c-w6qf-7xqc

Suggest an improvement
Source
https://github.com/advisories/GHSA-ff6c-w6qf-7xqc
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-ff6c-w6qf-7xqc/GHSA-ff6c-w6qf-7xqc.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-ff6c-w6qf-7xqc
Aliases
  • CVE-2026-44312
Published
2026-05-07T02:06:49Z
Modified
2026-05-08T20:14:07.761470433Z
Severity
  • 5.8 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N CVSS Calculator
Summary
CSS Parser: Improper Certificate Validation allows MITM injection of remote CSS content
Details

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/cssparser/blob/3f91e8db7547fac50ab50cb7f9920f785f722740/lib/cssparser/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.

Database specific
{
    "github_reviewed": true,
    "severity": "MODERATE",
    "github_reviewed_at": "2026-05-07T02:06:49Z",
    "cwe_ids": [
        "CWE-295",
        "CWE-829"
    ],
    "nvd_published_at": null
}
References

Affected packages

RubyGems / css_parser

Package

Name
css_parser
Purl
pkg:gem/css_parser

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.0.0
Fixed
2.1.0

Affected versions

2.*
2.0.0

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-ff6c-w6qf-7xqc/GHSA-ff6c-w6qf-7xqc.json"

RubyGems / css_parser

Package

Name
css_parser
Purl
pkg:gem/css_parser

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.22.0

Affected versions

0.*
0.9.0
0.9.1
1.*
1.0.0
1.0.1
1.1.1
1.1.2
1.1.3
1.1.4
1.1.5
1.1.6
1.1.7
1.1.8
1.1.9
1.2.1
1.2.2
1.2.3
1.2.4
1.2.5
1.2.6
1.3.0
1.3.1
1.3.2
1.3.3
1.3.4
1.3.5
1.3.6
1.3.7
1.4.0
1.4.1
1.4.2
1.4.3
1.4.4
1.4.5
1.4.6
1.4.7
1.4.8
1.4.9
1.4.10
1.5.0.pre
1.5.0.pre2
1.5.0
1.6.0
1.7.0
1.7.1
1.8.0
1.9.0
1.10.0
1.11.0
1.12.0
1.13.0
1.14.0
1.15.0
1.16.0
1.17.0
1.17.1
1.19.0
1.19.1
1.20.0
1.21.0
1.21.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/05/GHSA-ff6c-w6qf-7xqc/GHSA-ff6c-w6qf-7xqc.json"