Ruby on Rails Active Storage: Unsigned Content-Type in GCS direct uploads
Summary
Active Storage in Rails signs Google Cloud Storage direct-upload URLs with V4 when the cache_control option is set, and the signature does not cover the Content-Type or Content-MD5 headers. A client with a valid upload URL can therefore upload an object with a Content-Type of its choosing, such as text/html, which GCS stores as metadata and may serve inline under the bucket path on storage.googleapis.com. Script in such an object runs on the storage origin and could register a Service Worker to read or replace responses for signed URLs in that bucket. Only applications using the GCS service with cache_control and direct uploads are affected.
Affected
- Rails Active Storage 8.1 before 8.1.4.1
- Rails Active Storage 8.0 before 8.0.5.2
- Only with the GCS service, cache_control configured and direct uploads enabled
- Rails 7.2 and older: unverified, not listed as affected by the vendor
Fixed in
- 8.1.4.1
- 8.0.5.2
Workaround
Unknown.
Exploitation
- Not known to be exploited.
- No public proof of concept found.
- Not listed in CISA KEV according to one aggregator; not checked directly.
Our recommendation
- Upgrade to Rails 8.1.4.1 or 8.0.5.2; for 8.0, moving to 8.1.4.1 is the better target as 8.0 security support has ended.
- Check config/storage.yml for GCS services with cache_control and enabled direct uploads.
- Test client code that relies on the 7-day limit or signed Cache-Control, as these changed.
- Patch the same release promptly, as it also fixes a critical ImageMagick issue in Active Storage.
- If you cannot patch quickly, consider disabling GCS direct uploads or removing cache_control after testing the impact on uploads.
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- GitHub Security Advisory GHSA-3w93-6hmw-whh4 github.com
- CVE Record CVE-2026-126084 www.cve.org
- Rails 8.0.5.2 release tag github.com
- Rails 8.1.4.1 release tag github.com
- Rails release announcement rubyonrails.org
- Fix commit for 8.1 github.com
- Fix commit for 8.0 github.com
- Active Storage CHANGELOG v8.1.4.1 github.com
Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 11 Nov 2026, 20:14.
Original description (NVD)
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.
NVD references (5)
- https://github.com/rails/rails/commit/8d93f6a872e9550a91bf0e4fce50083a235ef3b1
- https://github.com/rails/rails/commit/ddc08ba61a8001e7402864c62e466cf732fc7614
- https://github.com/rails/rails/releases/tag/v8.0.5.2
- https://github.com/rails/rails/releases/tag/v8.1.4.1
- https://github.com/rails/rails/security/advisories/GHSA-3w93-6hmw-whh4
Sources
The tracker combines official, freely usable data sources – updated continuously:
- NVD (NIST) – CVEs, rating (CVSS), affected products
- CISA KEV – vulnerabilities confirmed by CISA as actively exploited
- CISA Vulnrichment – CISA assessment (SSVC) in the official CVE record
- FIRST EPSS – probability of exploitation
- Microsoft MSRC – Patch Tuesday: vulnerabilities, severity, updates
- PoC-in-GitHub – public proof-of-concept repositories
- Metasploit (Rapid7) – modules of the Metasploit Framework
- Exploit-DB (OffSec) – archive of public exploits (links only)
- Patch days: official vendor pages (linked per vendor) (Vendor patch days)
This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.
Affected? We can help.
We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.
