Ruby on Rails Active Storage
Rails advisory published Rails patches file read and write in ImageMagick analysis
A crafted upload can cause arbitrary server file writes during Active Storage image analysis. If the Disk service stores attachments, application-readable files can also be read, potentially exposing secrets and enabling further compromise.[1]
Fix. Upgrade activestorage to 8.0.5.2 or 8.1.4.1 as applicable.[1]
Versions, remediation & sources
- Affected systems & conditions
- The Rails advisory lists activestorage before 8.0.5.2 and 8.1 before 8.1.4.1. An application must use ImageMagick with Active Storage, permit untrusted uploads, and have a policy that does not already deny the involved coders. Attaching the file triggers the analyzer.[1]
- Remediation
- Upgrade activestorage to 8.0.5.2 or 8.1.4.1 as applicable. Applications using mini_magick need version 5.1 or later. With Disk storage, Rails recommends rotating all application-readable secrets, including secret_key_base and credentials. Review the advisory for policy exceptions and workarounds.[1]
- Evidence at review time
- Rails describes a reported attack chain, but the advisory does not establish exploitation in the wild.[1]
- Vendor severity
- Rails rates the issue Critical, CVSS v3.0 9.8.[1]