CVE-2026-126084 — rails
One of 9 rails vulnerabilities published together by NVD: our article covers all of them.
RubyCloud & containersVulnerabilitiesAnalysis
CVE-2026-126084: Rails Active Storage GCS direct uploads let clients set content type, enabling inline HTML
A flaw in Rails Active Storage lets direct-upload clients on Google Cloud Storage choose their own Content-Type, so uploaded files can be served as inline HTML from the bucket path. It is rated MEDIUM (CVSS 4.7) and is fixed in Rails 8.1.4.1 and 8.0.5.2.
Key points
- Affects Rails Active Storage with GCS, cache_control configured, and direct uploads enabled
- V4 signatures cover only Cache-Control and Host, so clients can set their own Content-Type
- Uploaded objects may be served as inline HTML on the storage origin, where scripts could register Service Workers
- Fixed in 8.1.4.1 and 8.0.5.2; CVSS 4.7 (MEDIUM)
- Exploitation status has not been published in the sources
CVE-2026-126084 affects the Active Storage component of Rails. The NVD entry, dated 2026-11-10, describes the issue in applications that store files in Google Cloud Storage (GCS) with the cache_control option set and that accept direct uploads.
What's affected
The problem is in how ActiveStorage::Service::GCSService#url_for_direct_upload signs upload URLs. When cache_control is configured, the URLs are signed with GCS V4 signatures, and the signature covers only the Cache-Control and Host headers. A client using a direct-upload URL can therefore send a Content-Type of its own choosing, and can omit the declared Content-MD5, without invalidating the signature.
GCS stores the supplied content type as object metadata. That metadata takes precedence over the response-content-type that Active Storage sets on download URLs, so an object can be served as inline HTML under the application's bucket path on storage.googleapis.com. Applications using GCS without cache_control sign with V2 and are not affected, according to the source.
Versions before 8.1.4.1 and 8.0.5.2 are affected. Both versions contain the fix.
How serious is it
NVD rates the issue MEDIUM with a CVSS score of 4.7. The source explains that script in such an object runs on the storage origin, not the application's origin. That script could register a Service Worker scoped to the bucket path and read or replace later responses for signed URLs in that bucket. The impact therefore depends on how the bucket is used and what content is fetched from it.
The sources do not report whether this flaw is being exploited in the wild, and they do not provide details beyond the NVD description.
What to do
Upgrade Rails to 8.1.4.1 or 8.0.5.2, depending on your release line. If you cannot upgrade immediately, review whether your application uses GCS with cache_control and accepts direct uploads, and consider disabling direct uploads until you can patch. Review the bucket for objects with unexpected HTML content types, and restrict access to the bucket path where sensitive signed content is stored.
Recommended actions
- Upgrade Rails to 8.1.4.1 or 8.0.5.2 depending on your release line.
- Check whether your GCS service sets cache_control and accepts direct uploads; if so, prioritize the upgrade.
- If patching is delayed, temporarily disable direct uploads for the affected GCS service.
- Audit the bucket for objects with HTML or other active content types that were not expected.
Summary
Active Storage makes it simple to upload and reference files in cloud services and attach those files to Active Record objects. Prior to 8.1.4.1 and 8.0.5.2, when a GCS service is configured with the cache_control option, ActiveStorage::Service::GCSService#url_for_direct_upload signs direct-upload URLs with V4, and the V4 signature covers only the Cache-Control and Host headers. A direct-upload client can therefore send a Content-Type of its choosing, and can omit the declared Content-MD5, without invalidating the URL. GCS stores the supplied content type as object metadata, which takes precedence over the response-content-type that Active Storage sets on download URLs, so an uploaded object could be served as inline HTML under the application's bucket path on storage.googleapis.com. Script in such an object runs on the storage origin rather than the application's, but could register a Service Worker scoped to the bucket path and read or replace a victim's later responses for signed URLs in that bucket. Applications that use the GCS service with cache_control configured and accept direct uploads are affected. GCS services without cache_control sign with V2 and are not affected. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.
Severity breakdown
Medium · 4.7
An attacker without an account can exploit this over the network if a user is tricked into an action, but only under specific conditions.
- Attack from
- the network (remotely)
- Attack complexity
- high (only works under specific conditions)
- Login needed
- no
- User action needed
- yes, someone must click, open or visit something
- Scope
- reaches beyond the vulnerable component (e.g. from a sandbox or VM to the host)
- Impact
- low on confidentiality and integrity, none on availability
Weakness
- CWE-345: Insufficient Verification of Data Authenticity
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| activestorage (RubyGems) | ≥ 8.1.0.beta1, < 8.1.4.1 | 8.1.4.1 |
| < 8.0.5.2 | 8.0.5.2 | |
| rails | >= 8.1, < 8.1.4.1, < 8.0.5.2 | — |
References by type
Vendor advisories
Patches and fixed releases
- github.com/rails/rails/commit/8d93f6a872e9550a91bf0e4fce50083a235ef3b1
- github.com/rails/rails/commit/ddc08ba61a8001e7402864c62e466cf732fc7614
- github.com/rails/rails/releases/tag/v8.0.5.2
- github.com/rails/rails/releases/tag/v8.1.4.1
Other references
Affected
- rails
What to do
- Follow the vendor advisory and the references below for fixed versions and workarounds.
Frequently asked questions
What is CVE-2026-126084?
A flaw in Rails Active Storage lets direct-upload clients on Google Cloud Storage choose their own Content-Type, so uploaded files can be served as inline HTML from the bucket path. It is rated MEDIUM (CVSS 4.7) and is fixed in Rails 8.1.4.1 and 8.0.5.2. Weakness type: Insufficient Verification of Data Authenticity (CWE-345).
How severe is CVE-2026-126084?
CVE-2026-126084 has a CVSS 3.1 base score of 4.7 (medium), from the CNA (github.com). An attacker without an account can exploit this over the network if a user is tricked into an action, but only under specific conditions.
Is CVE-2026-126084 being exploited?
Not as far as is known: CVE-2026-126084 is not in CISA's Known Exploited Vulnerabilities catalog as of November 29, 2026. EPSS estimates a 0.2% chance that it is exploited in the next 30 days.
Which versions are affected by CVE-2026-126084?
activestorage (RubyGems) ≥ 8.1.0.beta1, < 8.1.4.1 (fixed in 8.1.4.1); activestorage (RubyGems) < 8.0.5.2 (fixed in 8.0.5.2); rails >= 8.1, < 8.1.4.1, < 8.0.5.2.
How do I fix CVE-2026-126084?
Upgrade Rails to 8.1.4.1 or 8.0.5.2 depending on your release line. Check whether your GCS service sets cachecontrol and accepts direct uploads; if so, prioritize the upgrade. If patching is delayed, temporarily disable direct uploads for the affected GCS service.
Timeline & sources
References
Related vulnerabilities & news
- msgpack-ruby JRuby decoder: header-declared sizes drive uncapped allocation and memory exhaustion (CVE-2026-126366)
- CVE-2026-126082: Critical Rails Active Storage flaw can expose files and enable code execution
- MongoDB Ruby Driver Vulnerability Enables Unauthenticated Data Manipulation
- MongoDB Ruby Driver Logic Flaw Enables Unauthorized Data Access
- MongoDB Ruby Driver Type Confusion Vulnerability in Extended JSON Parsing