Skip to main content
Menu
CVEs

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.

CVE-2026-126082Published November 10, 2026, updated Rejected

9.8CriticalCNA

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”

github.com

cve.now Index

32of 100 · methodology v3
  • 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

  1. CVE published
  2. First seen by cve.now
  3. Posted on X by cve.now2 days
  4. Record last updated

On X 2

Evidence 7

KindSource
Vendor advisory 1Establishes: Affected and fixed versions.
AdvisoryGitHub · rails/rails · Advisory GHSA-f3w6-w445-fwh9
CVE record 2Establishes: The identifier and description.
RecordCVE List · CVE-2026-126082
RecordNVD · CVE-2026-126082
Other links 4
RepositoryGitHub · rails/rails · Commit 468aa9a9
RepositoryGitHub · rails/rails · Commit ea8c4012
RepositoryGitHub · rails/rails · Release v8.0.5.2
RepositoryGitHub · rails/rails · Release v8.1.4.1

No corrections so far. Something wrong on this page? Report an error.