CVE-2020-8162 — Circumvention of file size limits in activestorage
Circumvention of file size limits in ActiveStorage
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (3.03%). Schedule for your next planned update.
Does your project use an affected activestorage version?
Paste your Gemfile.lock to check it for CVE-2020-8162 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
There is a vulnerability in ActiveStorage's S3 adapter that allows the Content-Length of a direct file upload to be modified by an end user.
Versions Affected: rails < 5.2.4.2, rails < 6.0.3.1 Not affected: Applications that do not use the direct upload functionality of the ActiveStorage S3 adapter. Fixed Versions: rails >= 5.2.4.3, rails >= 6.0.3.1
Impact
Utilizing this vulnerability, an attacker can control the Content-Length of an S3 direct upload URL without receiving a new signature from the server. This could be used to bypass controls in place on the server to limit upload size.
Workarounds
This is a low-severity security issue. As such, no workaround is necessarily until such time as the application can be upgraded.
Advisory Timeline
- First published May 26, 2020 (2375 days ago).
- Last revised February 22, 2024 — 1367 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install activestorage -v 6.0.3.1
gem install activestorage -v 5.2.4.3
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| activestorage RubyGems · Affected: 6.0.0, 6.0.1, 6.0.1.rc1, 6.0.2 (+6 more) | 6.0.3.1 |
| activestorage RubyGems · Affected: 5.2.0, 5.2.0.beta1, 5.2.0.beta2, 5.2.0.rc1 (+13 more) | 5.2.4.3 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-434Unrestricted File UploadMITRE
- CWE-602
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-8162ADVISORY
- https://github.com/aws/aws-sdk-ruby/issues/2098WEB
- https://hackerone.com/reports/789579WEB
- https://github.com/aws/aws-sdk-rubyWEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activestorage/CVE-2020-8162.ymlWEB
- https://groups.google.com/forum/#!topic/rubyonrails-security/PjU3946mreQWEB
- https://groups.google.com/g/rubyonrails-security/c/PjU3946mreQWEB
- https://www.debian.org/security/2020/dsa-4766WEB
Frequently Asked Questions
- What is CVE-2020-8162?
- Circumvention of file size limits in ActiveStorage. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 7.5/10).
- How do I check if my project is affected by CVE-2020-8162?
- CVE-2020-8162 affects activestorage. It has a 3.0% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2020-8162 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Significant impact if exploited, or exploitable with modest effort.
This places it in the top quartile of EPSS-scored vulnerabilities — 88.2% of tracked vulnerabilities score at or below it, so it is more likely to be exploited than most of the tracked corpus.
Also Known As
Related CVEs
- CVE-2025-24293CRITICAL
Active Storage allowed transformation methods that were potentially unsafe
- CVE-2022-21831CRITICAL
Possible code injection vulnerability in Rails / Active Storage
- CVE-2026-66066CRITICAL
Active Storage has possible arbitrary file read and remote code execution in Active Storage variant processing
- CVE-2026-126186HIGH
Active Storage: Possible arbitrary file read and remote code execution in video previews, analysis and image processing
- CVE-2026-126084MEDIUM
Active Storage: Unsigned Content-Type in GCS direct uploads with cache_control
- CVE-2026-126071MEDIUM
Active Storage: Possible DoS vulnerability in Active Storage proxy mode via storage errors during streaming
- CVE-2026-33202MEDIUM
Rails Active Storage has possible glob injection in its DiskService
- CVE-2018-16477MEDIUM
Exposure of Sensitive Information to an Unauthorized Actor in activestorage