⚡ The main thing in 60 seconds (TL;DR)
⏱ ~ 7 мин чтения- Rails developers have fixed a critical Active Storage vulnerability that could allow attackers to read sensitive files and write arbitrary files by uploading images.
- The platform's Active Storage component handles file uploads and can use the ImageMagick image processing package to analyze uploaded images.
- what encoder it uses) based on the file name or extension, but rather on its content.
An attacker could write arbitrary files and read sensitive files via images loaded into the Rails Active Storage ImageMagick integration, possibly positioning the attacker for lateral movement.

A critical vulnerability in Rails could crash affected web servers.
Rails, or Ruby on Rails is a web application platform built on Ruby. The platform's Active Storage component handles file uploads and can use the image processing package ImageMagick to analyze uploaded images. And unfortunately, the vulnerability allows attackers to write arbitrary files to the web server via ImageMagick.
The vulnerability (tracked as GHSA-f3w6-w445-fwh9) is critical, with a score of CVSS 9.8 and is considered so severe that an attacker can download a crafted image file to write arbitrary files, read sensitive files, and access secrets such as secret_key_base files, external system data credentials, database passwords and third-party tokens. These secrets could then be used to laterally move or execute code remotely on external systems.
The GitHub advisory published by the Rails maintainers explains, "A Rails application that processes attachments using ImageMagick could allow an unauthenticated attacker to write arbitrary files to the server and, when attachments are stored in the Disk service, to read arbitrary files read by the application." process."
How image downloading becomes an attack vector
The vulnerability exists because ImageMagick does not necessarily decide how to process a file (i.e., what encoder it uses) based on the file name or extension, but rather on its content. This means that an attacker could upload an image file named "maliciousfile.jpeg" but containing content that causes ImageMagick to call a different encoder. This could potentially allow random reading or writing of files on the server.
Vulnerable versions of Active Storage include versions 8.0 before 8.0.5.2 and versions 8.1 before 8.1.4.1. Affected organizations running Rails applications that use ImageMagick to process Active Storage images use a security policy that does not block affected programmers and accept downloads from untrusted users.
Active Storage patches are now available. The GitHub page provides additional mitigation requirements for applications using MiniMagick and ImageMagick.
Additionally, if an application stores attachments through a drive service, users must "modify secret_key_base and every secret key read by the application process, including the master key and anything stored in config/credentials.yml.enc, storage and database credentials, and third-party tokens”, this is stated in the GitHub message. Users should not store revealed secrets as a fallback.
If the user requires a workaround, the GitHub page suggests system rules that the user can apply to the ImageMagick system policy.
Jake Knott, director of threat intelligence at risk management vendor WatchTowr, told Dark Reading that the firm has already reproduced the vulnerability in a lab environment, and "that against the right target it would be no problem at all to exploit."
Moreover, he says he would be surprised if a public proof-of-concept exploit took more than a few days to become known.
“For attackers, reproducing the vulnerability here will likely be the easiest task since the patterns and primitives used in the exploit are well known,” Knott says. “The hard part is finding software and deployments that are common enough and configured in a vulnerable way to have an impact at scale.”
About the author
Work with us
Follow us

Copyright © 2026 TechTarget, Inc. d/b/a Informa TechTarget. This website is owned and operated by Informa TechTarget, part of a global network that informs, influences and connects the world's technology buyers and sellers. All copyrights belong to them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. TechTarget, Inc. Registered Office: 275 Grove St. Newton, MA 02466.















💬 Discussion 0
BBCode & Emoji supportedParticipate in discussions, ask authors questions, and share benchmarks by joining the ProArena engineering community.