Skip to main content

CVE-2020-8162 — Circumvention of file size limits in activestorage

HIGH

Circumvention of file size limits in ActiveStorage

Published May 26, 2020Updated February 22, 2024Source: OSV

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.

Check my Gemfile.lock

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.

Bundler
Update activestorage to 6.0.3.1 or later
gem install activestorage -v 6.0.3.1
Bundler
Update activestorage to 5.2.4.3 or later
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).

PackageFixed 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.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 7.5 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

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

CVSS Score
7.5

Significant impact if exploited, or exploitable with modest effort.

EPSS Score (30-day exploit probability)
3.03%
EPSS percentile: 88.2

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

GHSA-m42x-37p3-fv5w

Related CVEs

  • CVE-2025-24293
    CRITICAL

    Active Storage allowed transformation methods that were potentially unsafe

  • CVE-2022-21831
    CRITICAL

    Possible code injection vulnerability in Rails / Active Storage

  • CVE-2026-66066
    CRITICAL

    Active Storage has possible arbitrary file read and remote code execution in Active Storage variant processing

  • CVE-2026-126186
    HIGH

    Active Storage: Possible arbitrary file read and remote code execution in video previews, analysis and image processing

  • CVE-2026-126084
    MEDIUM

    Active Storage: Unsigned Content-Type in GCS direct uploads with cache_control

  • CVE-2026-126071
    MEDIUM

    Active Storage: Possible DoS vulnerability in Active Storage proxy mode via storage errors during streaming

  • CVE-2026-33202
    MEDIUM

    Rails Active Storage has possible glob injection in its DiskService

  • CVE-2018-16477
    MEDIUM

    Exposure of Sensitive Information to an Unauthorized Actor in activestorage

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Gemfile.lock