Active Storage GCS direct uploads can exceed declared file size
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat.
Summary
Active Storage in Rails from 8.1 before 8.1.4.1 and before 8.0.5.2 does not enforce declared sizes for direct uploads to Google Cloud Storage. The url_for_direct_upload method does not bind the declared content length into the signed URL, so the URL accepts a body of any size. A remote client that can perform direct uploads can store a file larger than its declared byte_size, and the blob keeps the declared size, which can bypass application file size validations and quotas. This is CWE-602.
Written with Claude Haiku 5.5 from the sources below · 2026-11-11
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Rails | rails | 8.1 to before 8.1.4.1; before 8.0.5.2 | 8.1.4.1, 8.0.5.2 | Patch available | CNA |
| — | activestorage (RubyGems) | 8.1.0.beta1 to before 8.1.4.1 | 8.1.4.1 | Patch available | GHSA-hfr4-8rjc-97m2 |
| — | activestorage (RubyGems) | before 8.0.5.2 | 8.0.5.2 | Patch available | GHSA-hfr4-8rjc-97m2 |
- rails VendorRails Affected 8.1 to before 8.1.4.1; before 8.0.5.2 Fixed in 8.1.4.1, 8.0.5.2 Patch available CNA
- activestorage (RubyGems) Vendor— Affected 8.1.0.beta1 to before 8.1.4.1 Fixed in 8.1.4.1 Patch available GHSA-hfr4-8rjc-97m2
- activestorage (RubyGems) Vendor— Affected before 8.0.5.2 Fixed in 8.0.5.2 Patch available GHSA-hfr4-8rjc-97m2
Remediation
Upgrade Rails to 8.1.4.1 or 8.0.5.2, or upgrade the activestorage gem to 8.1.4.1 for versions from 8.1.0.beta1 before 8.1.4.1 and to 8.0.5.2 for earlier versions. Red Hat lists no plan for 3scale API Management Platform 2, which is affected without a fix.
Written with Claude Haiku 5.5 from the sources below · 2026-11-11
- Fix · CNA rails (rails) Fixed in 8.1.4.1, 8.0.5.2
- Fix · GHSA-hfr4-8rjc-97m2 activestorage (RubyGems) Fixed in 8.1.4.1 Advisory →
- Fix · GHSA-hfr4-8rjc-97m2 activestorage (RubyGems) Fixed in 8.0.5.2 Advisory →
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat 3scale API Management Platform 2 | Affected | No fix yet: Fix deferred |
Timeline
- 2026-11-10 Threatist record created from CVE-2026-126085
- 2026-11-10 Alias added: GHSA-hfr4-8rjc-97m2
- 2026-11-10 Fix available: RubyGems/[email protected], RubyGems/[email protected] · GHSA-hfr4-8rjc-97m2
- 2026-11-10 CVSS score added · GHSA-hfr4-8rjc-97m2
- 2026-11-10 Weakness changed · GHSA-hfr4-8rjc-97m2
- 2026-11-10 7 new references · GHSA-hfr4-8rjc-97m2
- 2026-11-11 Affected versions changed · Red Hat
- 2026-11-11 CVSS score added · Red Hat
- 2026-11-14 CISA SSVC decision points changed
References
Other 7
- https://github.com/rails/rails/security/advisories/GHSA-hfr4-8rjc-97m2
- 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
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activestorage/GHSA-hfr4-8rjc-97m2.yml
More Rails vulnerabilities
- TI-2014-00124 Path traversal in Ruby on Rails lets remote attackers read files KEVCVSS 3.1HIGH 7.5
- TI-2019-03828 File content disclosure in Rails Action View KEVCVSS 3.1HIGH 7.5
- TI-2016-00672 Directory traversal in Rails Action View lets attackers read files KEVCVSS 3.1HIGH 7.5
- TI-2019-03830 Command injection in Rails https://github.com/rails/rails CVSS 3.1CRITICAL 9.8
- TI-2026-47043 Action Pack: Possible arbitrary file read and remote code execution in Active Storage variant processing CVSS 4.0CRITICAL 9.5
- TI-2025-18040 Command injection in Rails activestorage CVSS 4.0CRITICAL 9.2
Sources
- CVE-2026-126085 · CVE Program
- CVE-2026-126085 · NVD
- FIRST EPSS
- GHSA-hfr4-8rjc-97m2 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-126085 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences