Rails Fixes Critical ImageMagick Upload Vulnerability
Rails released updates 8.0.5.2 and 8.1.4.1 to address a critical Active Storage vulnerability when processing untrusted uploads through ImageMagick.

A critical Rails vulnerability in the Active Storage component could allow an unauthenticated attacker in affected applications to write arbitrary files to the server through a crafted upload. The Rails project tracks the vulnerability as GHSA-f3w6-w445-fwh9 and assigned it a CVSS score of 9.8 out of 10.
Fixes were released on November 4, 2026, in Active Storage/Rails versions 8.0.5.2 and 8.1.4.1. The issue affects applications that accept untrusted files and use ImageMagick to process them without an effective policy blocking the affected coders.
Critical Rails Vulnerability During Upload Analysis
The flaw is located in the process of handling attachments through Active Storage. According to the security advisory, a maliciously crafted file could lead to arbitrary file writes on the server when uploaded. Processing a preview or image variant may not be necessary to trigger the processing; analyzing the upload through ImageMagick alone may be sufficient.
The potential impact depends on the specific configuration. If an application uses the Active Storage Disk service, an attacker could under certain circumstances also access files readable by the application process. However, this is not a universally confirmed impact for every Rails installation: the storage used and the application process permissions are key factors.
Rails states that access to readable files could expose application secrets. Such exposure could subsequently serve as a stepping stone to remote code execution or lateral movement within the environment.
Who Is Affected
The risk primarily affects operators of Rails applications that allow users to upload files, process them through ImageMagick, and do not have an effective ImageMagick security policy in place. Administrators should also check the processor in use. With the processor: :mini_magick configuration, the supplied security policy requires the mini_magick package to be at least version 5.1.
Along with the fixes, the Rails project also supplied an ImageMagick security policy. If an immediate update is not possible, it recommends deploying the official workaround in the ImageMagick system policy. The exact procedure should be based on the official security advisory and the configuration of the specific server.
Recommended Steps for Administrators
- Update Rails or Active Storage to version 8.0.5.2 or 8.1.4.1.
- Check whether the application accepts uploads from untrusted users and uses ImageMagick.
- Verify that an effective ImageMagick policy is deployed and, for the
:mini_magickvariant, that the required dependency version is installed. - If exposure is suspected, rotate secrets readable by the application process.
The Rails security advisory does not currently report confirmed exploitation in the wild. At the time the security advisory was issued, the vulnerability also had no assigned CVE ID. Operators should therefore monitor further information from the Rails project, particularly any confirmation of active exploitation and the addition of a CVE identifier.
Sources
- Rails GitHub Security Advisory GHSA-f3w6-w445-fwh9 – Confirms the scope of the flaw, affected conditions, CVSS score of 9.8, fixed versions, and recommended mitigations.
- Ruby on Rails – Rails 8.0.5.2 and 8.1.4.1 have been released – Confirms the release of security updates on November 4, 2026, and the inclusion of the critical advisory among the issues fixed.
- The Hacker News – Independently summarizes the flaw’s technical mechanism and notes that the advisory does not report confirmed exploitation.
Verified and updated: 11/04/2026 15:23


