Rails patches a critical Active Storage flaw that lets an unauthenticated uploader write server files through ImageMagick, and read them when Disk storage is in use.
The Rails project has fixed a critical flaw in Active Storage, its file-upload component, rated 9.8 out of 10 on the CVSS scale, in activestorage 8.1.4.1 and 8.0.5.2. Rails said an unauthenticated attacker who can upload a crafted file may be able to make ImageMagick write arbitrary files on the server and, when attachments are stored with the Disk service, read files the application can read, including secret_key_base and credentials, which could lead to further compromise and possible remote code execution. Not every Rails app is affected. An app is exposed only if it processes images with ImageMagick through mini_magick, the default for apps on load_defaults 6.1 or earlier, runs without an ImageMagick policy that already blocks the coders involved, and accepts uploads from untrusted users. Attaching the upload is enough; no further processing call is needed. Rails told apps that use Disk storage to change secret_key_base and every other secret the app can read after upgrading. The flaw is tracked as GHSA-f3w6-w445-fwh9 and CVE-2026-122006.
Sources: Rails advisory (GitHub) · Rails release notes · NVD · Dark Reading · The Hacker News