Critical
Rails Active Storage ImageMagick File Write Vulnerability
Ruby on Rails
What happened
An attacker who uploads a crafted file can cause Rails to write arbitrary files and read secrets when using ImageMagick for Active Storage processing
Are you affected?
Rails versions 8.1 before 8.1.4.1 and any version older than 8.0.5.2 may be affected
What to do now
- Upgrade Rails to 8.1.4.1 or newer, or to 8.0.5.2 or newer if you are on an older branch
- Verify that your ImageMagick policy does not permit the vulnerable coders and consider disabling the variant processor for untrusted uploads
Sources
- cve.now/CVE-2026-126082
- CVE-2026-126082
- https://github.com/rails/rails/security/advisories/GHSA-f3w6-w445-fwh9
- https://github.com/rails/rails/commit/468aa9a93fc98f5476b6821770f4ccfcb7f7d328
- https://github.com/rails/rails/commit/ea8c40121ce53a3d0255cd4eb6d13bfe3bc01776
- https://github.com/rails/rails/releases/tag/v8.0.5.2
- https://github.com/rails/rails/releases/tag/v8.1.4.1
Data sources: cve.now, CISA KEV, GitHub Advisory Database, OSV.
This product uses data from the NVD API but is not endorsed or certified by the NVD.
Not sure if your app is affected?
Get a free Finish Line Scan and a senior engineer will tell you what to fix.
Get a free scan