Remote code execution risk via file write in Active Storage
Affects Rails Active Storage before 8.0.5.2 and 8.1 before 8.1.4.1 when ImageMagick (mini_magick) processes uploads from untrusted users under a policy that does not deny the coders involved. Fixed in 8.1.4.1 and 8.0.5.2.
Summary
Rails applications that use Active Storage with ImageMagick to process uploaded images can let an unauthenticated attacker write arbitrary files on the server, and with Disk storage read files the app can access, such as secret keys and credentials, which may lead to remote code execution or lateral movement. The attacker reaches it remotely, without logging in, by uploading a crafted file to an app that accepts uploads from untrusted users.
Written by a model
Original 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.
Who should check
Rails teams using Active Storage with mini_magick/ImageMagick (e.g. Debian/Ubuntu policies) that accept uploads from untrusted users, on activestorage before 8.0.5.2 or 8.1.4.1.
“A Rails application that processes attachments with ImageMagick may allow an unauthenticated attacker to write arbitrary files on the server”
cve.now Index
- Exploitation?/40Unknown. No CISA SSVC exploitation rating yet
- Exposure22/25Default setups, reachable over the network without a login
- Reach?/20Unknown. No tracked technology or package matched
- Severity9.8/10CVSS 9.8
- No patch0/5No signal
What would change the score
- Would score about 72 if added to CISA KEV
- Would score about 67 if CISA's SSVC rates exploitation active
Timeline
- CVE published
- First seen by cve.now
- Posted on X by cve.now2 days
- Record last updated
On X 2
Evidence 7
| Kind | Source |
|---|---|
| Vendor advisory 1Establishes: Affected and fixed versions. | |
| Advisory | GitHub · rails/rails · Advisory GHSA-f3w6-w445-fwh9 |
| CVE record 2Establishes: The identifier and description. | |
| Record | CVE List · CVE-2026-126082 |
| Record | NVD · CVE-2026-126082 |
| Other links 4 | |
| Repository | GitHub · rails/rails · Commit 468aa9a9 |
| Repository | GitHub · rails/rails · Commit ea8c4012 |
| Repository | GitHub · rails/rails · Release v8.0.5.2 |
| Repository | GitHub · rails/rails · Release v8.1.4.1 |
Related
- CVE-2026-122006
- CVE-2026-73969AnsibleForms: Authentication bypass via hard-coded default JWT signing secret
- CVE-2016-20105Lucee Server 5.0.0.0 < 5.3.4.46 Unauthenticated Admin Password Setup
- CVE-2026-125758Aptabase before commit 61d4c01 Authentication Bypass via Known Example AUTH_SECRET
- CVE-2026-74756Apache James: WebAdmin exposed without authentication on official Docker default
- CVE-2026-95860node-opcua: Namespace-Level RBAC Fail-Open - Anonymous Write/Call Bypass via Unbound `DefaultRolePermissions
No corrections so far. Something wrong on this page? Report an error.