CVE-2020-8162: Circumvention of file size limits in ActiveStorage
Summary
CVE-2020-8162: Circumvention of file size limits in ActiveStorage. Affects activestorage across 2 version ranges.
>= 5.0.0, < 5.2.4.3
>= 6.0.0, < 6.0.3.1
Fixed in 5.2.4.3 or 6.0.3.1, depending on the release line you run. How to fix ↓
Also tracked for
- rails · Debian:11
The same CVE-2020-8162 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
ActiveStorage is a Ruby on Rails component that provides a convenient way to upload and manage files in web applications. It offers various storage services, including the S3 adapter, which allows direct file uploads to Amazon S3. This vulnerability affects versions of ActiveStorage prior to 5.2.4.3 and 6.0.3.1. Applications that utilize the direct upload functionality of the ActiveStorage S3 adapter are vulnerable.
Vulnerability Detail
The vulnerability in ActiveStorage's S3 adapter allows an attacker to modify the Content-Length of a direct file upload URL without obtaining a new signature from the server. By exploiting this vulnerability, an attacker can bypass server-side controls that limit upload size. This can lead to potential abuse and circumvention of file size limits set by the application.
How To Fix
Latest published version: 8.1.4 as of 22 Oct 2026
gem install activestorage -v 8.1.4
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
>= 5.0.0, < 5.2.4.35.2.4.3gem install activestorage -v 5.2.4.3 -
>= 6.0.0, < 6.0.3.16.0.3.1gem install activestorage -v 6.0.3.1
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no specific workaround available for this vulnerability. It is advised to upgrade to the fixed version of ActiveStorage as soon as possible.
Conclusion
The vulnerability in ActiveStorage's S3 adapter allows an attacker to manipulate the Content-Length of a direct file upload URL, potentially bypassing file size limits set by the application. To mitigate this vulnerability, it is crucial to upgrade to the fixed version of ActiveStorage. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for activestorage →
FAQ
ActiveStorage is a Ruby on Rails component that provides file upload and storage capabilities for web applications.
Versions of ActiveStorage prior to 5.2.4.3 for Rails 5.x and prior to 6.0.3.1 for Rails 6.x are affected.
This vulnerability allows an attacker to manipulate the Content-Length of a direct file upload URL, bypassing server-side controls and potentially circumventing file size limits set by the application.
No specific workarounds are available for this vulnerability. It is recommended to upgrade to the fixed version of ActiveStorage.
To fix this vulnerability, upgrade to a fixed version of ActiveStorage. For Rails 5.x, upgrade to version 5.2.4.3 or later. For Rails 6.x, upgrade to version 6.0.3.1 or later.
Related vulnerabilities
Recent vulnerabilities recorded for activestorage.