Description
# Active Storage allowed transformation methods potentially unsafe
Active Storage attempts to prevent the use of potentially unsafe image
transformation methods and parameters by default.
The default allowed list contains three methods allow for the circumvention
of the safe defaults which enables potential command injection
vulnerabilities in cases where arbitrary user supplied input is accepted as
valid transformation methods or parameters.
Impact
------
This vulnerability impacts applications that use Active Storage with the image_processing processing gem in addition to mini_magick as the image processor.
Vulnerable code will look something similar to this:
```
<%= image_tag blob.variant(params[:t] => params[:v]) %>
```
Where the transformation method or its arguments are untrusted arbitrary input.
All users running an affected release should either upgrade or use one of the workarounds immediately.
Workarounds
-----------
Consuming user supplied input for image transformation methods or their parameters is unsupported behavior and should be considered dangerous.
Strict validation of user supplied methods and parameters should be performed
as well as having a strong [ImageMagick security
policy](https://imagemagick.org/script/security-policy.php) deployed.
Credits
-------
Thank you [lio346](https://hackerone.com/lio346) for reporting this!
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Rails | activestorage | 5.2 – < 5.*, 7.0 – < 7.1.5.2, 8.0 – < 7.0.2.1 | 5.* |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | rails | 2:7.2.2.2+dfsg-1 | — |
| Debian 13 | rails | 2:7.2.2.2+dfsg-2~deb13u1 | DSA-6090-1 |
| Debian 12 | rails | 2:6.1.7.10+dfsg-1~deb12u2 | DSA-6090-1 |
| Debian 11 | rails | 2:6.0.3.7+dfsg-2+deb11u4 | DLA-4416-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | rails | No fix yet | — |
| Ubuntu 26.04 LTS | rails | No fix yet | — |
| Ubuntu 25.10 | rails | No fix yet | — |
| Ubuntu 24.04 LTS | rails | No fix yet | — |
Show 4 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu Pro 22.04 LTS | rails | No fix yet | — |
| Ubuntu Pro 20.04 LTS | rails | No fix yet | — |
| Ubuntu Pro 18.04 LTS | rails | No fix yet | — |
| Ubuntu Pro 16.04 LTS | rails | No fix yet | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Metasploit 1 module
-
Ruby on Rails Active Storage Vips Arbitrary File Read and Remote Code Execution
exploit/multi/http/rails_activestorage_vips_rce
GitHub 1 repository
-
usutani/study-turbolinks-link ★ 0 · Apr 5, 2020
Known security vulnerabilities detected. CVE-2022-21831 Critical severity CVE-2025-24293 Critical severity CVE-2020-8162 High severity CVE-2024-26144 Moderate severity
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| RubyGems | activestorage | >= 8.0, < 8.0.2.1 | 8.0.2.1 | GHSA-r4mg-4433-c7g3 |
| RubyGems | activestorage | >= 7.2, < 7.2.2.2 | 7.2.2.2 | GHSA-r4mg-4433-c7g3 |
| RubyGems | activestorage | >= 5.2.0, < 7.1.5.2 | 7.1.5.2 | GHSA-r4mg-4433-c7g3 |
Advisories 3
- WID-SEC-2025-1822 Ruby on Rails: Mehrere Schwachstellen BSI CERT-Bund (WID) · Dec 28, 2025
- DLA-4416-1 rails - security update Debian Security (DSA / DLA) · Dec 21, 2025
- DSA-6090-1 rails - security update Debian Security (DSA / DLA) · Dec 21, 2025