CVE-2026-126082
9.8 CRITICALpublic exploit availablePublished 2026-11-10 · Updated 2026-11-10
AI risk analysis
- Summary
- A flaw in Active Storage's ImageMagick integration (CWE-1188) allows unauthenticated attackers to trigger arbitrary file read/write operations by uploading a specially crafted image that exploits ImageMagick's coder selection behavior. This occurs because Active Storage does not restrict which ImageMagick coders are invoked during analysis, enabling attackers to leverage coders that operate on embedded filenames rather than the image itself.
- Exploitability
- Exploitation is straightforward for unauthenticated attackers if the application uses :mini_magick as the variant processor, runs under a permissive ImageMagick security policy, and accepts untrusted file uploads—no authentication or user interaction required.
- Blast radius
- Successful exploitation can lead to theft of sensitive files like secret_key_base and credentials, potentially enabling remote code execution or lateral movement into other systems connected via those credentials.
- Detection
- Defenders should monitor for anomalous file creation or access patterns in the application's log directory (e.g., unexpected files written under tmp/ or storage/), especially files with non-image extensions or unusual paths, and correlate with Active Storage attachment events logged by Rails; also watch for ImageMagick process spawns with suspicious command-line arguments referencing external files.
- Prioritized remediation
- Upgrade to Rails 8.1.4.1 or 8.0.5.2 immediately; if upgrading is not feasible, disable ImageMagick variant processing by setting config.active_storage.variant_processor = :vips or restrict ImageMagick coders via policy.xml to deny dangerous coders such as PDF, PS, SVG, and ZIP.
Analysis generated locally by garnet-coder (no data left the box). AI-assisted — verify against primary sources before acting.
NVD description
Active Storage makes it simple to upload and reference files in cloud services and attach those files to Active Record objects. Prior to 8.1.4.1 and 8.0.5.2, a Rails application that processes attachments with ImageMagick may allow an unauthenticated attacker to write arbitrary files on the server and, when attachments are stored with the Disk service, to read arbitrary files readable by the application process. Those files typically include secret_key_base and credentials for external systems, which may in turn allow escalation to remote code execution or lateral movement to those systems. ImageMagick selects a coder from the content of the file it is given, and some coders act on files named inside the image rather than on the image itself. Active Storage constrained none of ImageMagick's coders, and the ImageMagick analyzer runs when a file is attached, so an attacker who can upload a crafted file may be able to invoke one. Attaching the upload is sufficient; no variant, preview, or analyze call is required. One specific attack chain has been reported, but other attack chains may exist. An application is affected when it uses ImageMagick for Active Storage image processing through config.active_storage.variant_processor = :mini_magick, runs ImageMagick under a security policy that does not already deny the involved coders, and allows uploads from untrusted users. This issue is fixed in versions 8.1.4.1 and 8.0.5.2.
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weaknesses
CWE-1188
Public exploit & PoC references
- 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
- https://github.com/rails/rails/security/advisories/GHSA-f3w6-w445-fwh9
All references
- 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
- https://github.com/rails/rails/security/advisories/GHSA-f3w6-w445-fwh9
Source data: NVD (nvd.nist.gov), public domain. Exploit-DB.ai adds local AI analysis for defensive use only.
Related CVEs
- HIGHCVE-2026-116019PoC
- HIGHCVE-2026-60009PoC
- HIGHCVE-2026-65103PoC
- HIGHCVE-2026-105744PoC
- CRITICALCVE-2026-122006PoC
- CRITICALCVE-2021-48014PoC
- CRITICALCVE-2021-48016PoC
- CRITICALCVE-2022-51022PoC
Related by shared AI tags and CWE weakness class. Browse the full archive.