Active Storage: Circumvention of file size limits in GCS direct uploads
Summary
Active Storage in Ruby on Rails does not bind the declared file size into the signed URL for direct uploads to Google Cloud Storage (GCS). A client holding such a signed URL can upload a file larger than the size it declared, and the stored blob keeps the declared size. This can bypass application file size validations and storage quotas. Only applications that store files in GCS and accept direct uploads are affected.
Affected
- rails (activestorage) 8.1 before 8.1.4.1
- rails (activestorage) before 8.0.5.2
- Only the Google Cloud Storage service with direct uploads
Fixed in
- Upgrade to activestorage 8.1.4.1 or 8.0.5.2 (or later)
Workaround
Unknown. The vendor documents no workaround. Upgrading is the fix.
Exploitation
- No evidence of in-the-wild exploitation found in the sources reviewed
- No public proof of concept found in the sources reviewed
- Not listed in CISA KEV in the sources reviewed
Our recommendation
- Identify Rails applications that use the GCS storage service with direct uploads (config/storage.yml)
- Upgrade to Active Storage 8.1.4.1 or 8.0.5.2 (or later); plan an upgrade to a supported branch if running an older version
- Add x-goog-content-length-range to the GCS bucket CORS responseHeader list and test browser uploads
- Review whether direct-upload URLs are issued to unauthenticated users and check storage quotas and size limits
Public exploits
PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.
Research sources
- Rails GHSA-hfr4-8rjc-97m2 advisory github.com
- Rails release v8.1.4.1 github.com
- Rails release v8.0.5.2 github.com
- Rails commit e19916c (8.1) github.com
- Rails commit 7fe85a7 (8.0) github.com
- OSV GHSA-hfr4-8rjc-97m2 osv.dev
- Rails security releases 8.0.5.2 and 8.1.4.1 discuss.rubyonrails.org
- CVE Record CVE-2026-126085 www.cve.org
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, 18:15.
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, ActiveStorage::Service::GCSService#url_for_direct_upload does not bind the declared content length into the signed direct-upload URL, and #headers_for_direct_upload returns no length constraint, so the URL authorizes an upload body of any size. A direct-upload client could store a file larger than the byte_size it declared, and the resulting blob keeps the declared size, possibly bypassing application file size validations and quotas. This is the weakness that CVE-2020-8162 fixed in the S3 service. Applications that store files in Google Cloud Storage and accept direct uploads are 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/7fe85a72a789eae5ee070ce3ee1dad10a8a5f70c
- https://github.com/rails/rails/commit/e19916cea31cbfb0030b165ae853b741f8dd57a7
- 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-hfr4-8rjc-97m2
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.
