Summary
CVE-2026-126082 is a critical insecure-default vulnerability (CWE-1188) in Ruby on Rails Active Storage’s ImageMagick image analysis. An unauthenticated remote attacker can abuse unconstrained ImageMagick coders to write arbitrary files on the server and potentially read sensitive files. It is rated CVSS 9.8 (Critical).
Technical details
- Root cause: Active Storage image analysis invokes ImageMagick with unconstrained coders (CWE-1188, Initialization of a Resource with an Insecure Default).
- Trigger conditions: The application processes attachments with ImageMagick, accepts untrusted file uploads, and ImageMagick runs without existing policy restrictions.
- Attack vector: Network; no privileges or user interaction required.
- Impact: Arbitrary file write on the server. Where attachments are stored with the Disk service, the attacker may also read files the application process can access, such as
secret_key_baseand credentials for other systems. The advisory notes this can lead to remote code execution or lateral movement.
Affected software
- Ruby on Rails (Active Storage) versions earlier than 8.0.5.2
- Ruby on Rails 8.1.x versions earlier than 8.1.4.1
- Release series older than 8.0 are no longer supported and will not receive fixed versions.
Severity
CVSS v3.1 base score 9.8 (Critical): CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: upgrade Rails to 8.0.5.2 or 8.1.4.1.
- Applications on unsupported release series should move to a patched supported version, as no fixes will be released for them.
- Review whether the application accepts untrusted uploads processed by ImageMagick, and restrict ImageMagick with an explicit policy. Consider rotating
secret_key_baseand credentials if exposure is suspected.

