CVE-2026-122006 — Active Storage: Possible arbitrary file write and read in image analysis
Research article
CVE-2026-122006: Active Storage Vulnerability in Ruby on Rails
| CVE | CVE-2026-122006 |
|---|---|
| Vendor and product | rubygems:activestorage |
| Published | November 19, 2026 08:15 UTC |
| Research cut-off | November 19, 2026 08:01 UTC |
| Sources reviewed | 4: NVD record (last modified 2026-11-12); CISA KEV catalog; GitHub advisory (2026-11-12); FIRST EPSS (2026-11-18) |
Executive summary
CVE-2026-122006 affects Ruby on Rails' Active Storage component, with a CVSS 3.1 score of 9.8 CRITICAL, scored by cve@mitre.org [1]. The vulnerability impacts versions of Active Storage below 8.0.5.2 and between 8.1 and 8.1.4.1. The reviewed sources do not report exploitation [2]. The main action is to update to a fixed version of Active Storage [1].
Key points
- CVE-2026-122006 affects Ruby on Rails' Active Storage component [1].
- The CVSS 3.1 score is 9.8 CRITICAL, scored by cve@mitre.org [1].
- Versions below 8.0.5.2 and between 8.1 and 8.1.4.1 are affected [1].
- The reviewed sources do not report exploitation [2].
- Remediation requires updating to a fixed version of Active Storage and applying the new security policy [3].
Vulnerability identification
| CVE ID | Vendor | Product | CWE | CVSS 3.1 | Published | Last Modified | Record Status |
|---|---|---|---|---|---|---|---|
| CVE-2026-122006 | Ruby on Rails | Active Storage | CWE-1188 | 9.8 CRITICAL, scored by cve@mitre.org [1] | 2026-11-04T15:17:42 | 2026-11-12T22:09:39 | Awaiting Analysis |
Vulnerability description
A Rails application that uses ImageMagick for Active Storage image processing is at risk of unauthenticated file writing and reading attacks if it accepts untrusted file uploads [3]. The flaw stems from ImageMagick's ability to process filenames within images, which Active Storage does not restrict [3]. An attacker could exploit this by uploading a specially crafted file, which would trigger ImageMagick to run arbitrary code without requiring additional steps like previews or analysis [3].
Attack surface and exploitation prerequisites
The CVSS vector indicates the vulnerability has network access (AV:N), requires no privileges (PR:N), needs no user interaction (UI:N), and has high impact on confidentiality, integrity, and availability (C:H, I:H, A:H) [1].
Impact analysis
The CVSS vector highlights a high impact on confidentiality, integrity, and availability (C:H, I:H, A:H) [1]. The flaw allows attackers to access files that the application process can read, including secrets and credentials for external systems [3].
Affected products and versions
Exploitation and threat intelligence status
CVE-2026-122006 is not listed in the CISA Known Exploited Vulnerabilities Catalog as of 2026-11-19 [2]. The EPSS score for this CVE is 0.74%, suggesting a low likelihood of exploitation in the next 30 days [4].
Detection and exposure assessment
Users can assess their exposure by verifying whether their installed version of Active Storage falls within the affected range [1].
Remediation
Applications configured to use config.active_storage.variant_processor = :mini_magick must upgrade activestorage to a fixed version: 8.0.5.2 for the affected 8.0 line or 8.1.4.1 for the affected 8.1 line [3]. Older versions of activestorage below 8.0.5.2 or 8.1.4.1 are vulnerable [3]. The solution involves updating to a fixed version of activestorage and applying the new security policy [3].
Remediation checklist
- Upgrade Active Storage to the fixed version for your branch: 8.0.5.2 for the 8.0 line and 8.1.4.1 for the 8.1 line [1].
- Apply the new security policy to ImageMagick's system policy file, such as `/etc/ImageMagick-7/policy.xml` [3].
- Applications that replace `MiniMagick.cli_env` or use `MiniMagick.cli_prefix` must apply the security policy rules manually [3].
- Change all secrets readable by the application process, including credentials and encryption keys, if using the Disk service [3].
Evidence gaps
- The sources do not describe the affected component's internals.
- The sources do not mention a workaround.
- The sources do not describe the attack lifecycle in detail.
- The sources do not provide indicators of compromise.
- The sources do not list a fixed version for all affected products.
References
- CVE-2026-122006 record. NIST National Vulnerability Database (NVD), 2026-11-12. https://nvd.nist.gov/vuln/detail/CVE-2026-122006. Accessed 2026-11-19.
- Known Exploited Vulnerabilities Catalog. Cybersecurity and Infrastructure Security Agency (CISA), 2026-11-19. https://www.cisa.gov/known-exploited-vulnerabilities-catalog. Accessed 2026-11-19.
- GHSA-f3w6-w445-fwh9 / CVE-2026-122006 — Active Storage: Possible arbitrary file write and read in image analysis. GitHub Security Advisory Database, 2026-11-12. https://github.com/advisories/GHSA-f3w6-w445-fwh9. Accessed 2026-11-19.
- EPSS score for CVE-2026-122006. FIRST, 2026-11-18. https://api.first.org/data/v1/epss?cve=CVE-2026-122006. Accessed 2026-11-19.
Severity breakdown
Critical · 9.8
An attacker without an account can exploit this over the network, without any user action.
- Attack from
- the network (remotely)
- Attack complexity
- low (no special conditions)
- Login needed
- no
- User action needed
- no
- Scope
- stays within the vulnerable component
- Impact
- high on confidentiality, integrity and availability
Weakness
- CWE-1188: Initialization of a Resource with an Insecure Default
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| activestorage (RubyGems) | ≥ 8.1.0.beta1, < 8.1.4.1 | 8.1.4.1 |
| < 8.0.5.2 | 8.0.5.2 | |
| rubyonrails Active Storage | < 8.0.5.2 | 8.0.5.2 |
| ≥ 8.1, < 8.1.4.1 | 8.1.4.1 |
References by type
Vendor advisories
Patches and fixed releases
- github.com/rails/rails/releases/tag/v8.0.5.2
- github.com/rails/rails/releases/tag/v8.1.4.1
- github.com/digitalocean/droplet-1-clicks/pull/488
- github.com/rubysec/ruby-advisory-db/pull/1300
- github.com/rails/rails/commit/468aa9a93fc98f5476b6821770f4ccfcb7f7d328
- github.com/rails/rails/commit/ea8c40121ce53a3d0255cd4eb6d13bfe3bc01776
Other references
Details
Impact
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.
Details
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 to us, but we do not assume it is the only one that exists.
The fixed versions ship an ImageMagick security policy and prepend its directory to MAGICK_CONFIGURE_PATH through MiniMagick.cli_env, so every ImageMagick process that MiniMagick spawns applies it. The policy denies the MSL scripting coder, the coders that read or delete files other than the image, fetch remote or local references, or display to a screen, every coder backed by Ghostscript together with the gs delegate, and @filename indirection. ImageMagick applies every policy.xml on its search path, so the shipped policy adds to the host's policy rather than replacing it. The policy applies to every ImageMagick command that MiniMagick runs, not only those of Active Storage. See the activestorage CHANGELOG and "ImageMagick Security Policy" in the Active Storage guide.
Affected applications
An application is affected if it meets all of these requirements:
- Uses ImageMagick for Active Storage image processing. This is
config.active_storage.variant_processor = :mini_magick, which is the default for applications onload_defaults 6.1or earlier. - Runs ImageMagick under a security policy that does not already deny the coders involved. The policies that Debian and Ubuntu package do not.
- Allows file uploads from untrusted users.
Mitigation
- Upgrade to a fixed version of
activestorage. - An application whose variant processor is
:mini_magickmust use mini_magick>= 5.1, which applying the policy requires. With an older mini_magick, such an application raises an exception during boot. - An application that renders PostScript or PDF through ImageMagick must re-allow the
gsdelegate and the coders it uses in the host'spolicy.xml. - An application that replaces
MiniMagick.cli_envafter boot, clears the environment withMiniMagick.cli_prefix, or installs its ownMiniMagick::Shelldoes not receive the shipped policy and must carry its rules in ImageMagick's system policy. GraphicsMagick does not read ImageMagick policies. - If attachments are stored with the Disk service, change
secret_key_baseand every secret readable by the application process, including the master key and everythingconfig/credentials.yml.encholds, storage and database credentials, and third-party tokens. Do not retain an exposed secret as a fallback.
Workarounds
Copy the rules of the policy that the fixed versions ship, activestorage/lib/active_storage/image_magick/policy.xml, into ImageMagick's system policy, for example /etc/ImageMagick-7/policy.xml. At a minimum, deny the MSL coder, the Ghostscript coders, and the gs delegate:
<policy domain="coder" rights="none" pattern="MSL"/>
<policy domain="delegate" rights="none" pattern="gs"/>
<policy domain="coder" rights="none" pattern="{PS,PS2,PS3,EPS,EPS2,EPS3,EPI,EPSF,EPSI,EPT,EPT2,EPT3,PDF,AI,EPDF,PDFA,POCKETMOD,XPS,PCL}"/>
Releases
The fixed releases are available at the normal locations.
Patches for those who cannot upgrade at once:
- 8.1: https://github.com/rails/rails/commit/468aa9a93fc98f5476b6821770f4ccfcb7f7d328
- 8.0: https://github.com/rails/rails/commit/ea8c40121ce53a3d0255cd4eb6d13bfe3bc01776
Versions affected
- activestorage < 8.0.5.2
- activestorage >= 8.1, < 8.1.4.1
Credit
This issue was responsibly reported by HackerOne researcher ryotak.
References
- ImageMagick security policy
Affected
- rubygems:activestorage
Frequently asked questions
What is CVE-2026-122006?
CVE-2026-122006 affects Ruby on Rails' Active Storage component, with a CVSS 3.1 score of 9.8 CRITICAL, scored by cve@mitre.org. The vulnerability impacts versions of Active Storage below 8.0.5.2 and between 8.1 and 8.1.4.1. The reviewed sources do not report exploitation. The main action is to update to a fixed version of Active Storage. Weakness type: Initialization of a Resource with an Insecure Default (CWE-1188).
How severe is CVE-2026-122006?
CVE-2026-122006 has a CVSS 3.1 base score of 9.8 (critical), from the CNA (mitre.org). An attacker without an account can exploit this over the network, without any user action.
Is CVE-2026-122006 being exploited?
Not as far as is known: CVE-2026-122006 is not in CISA's Known Exploited Vulnerabilities catalog as of November 26, 2026. EPSS estimates a 0.7% chance that it is exploited in the next 30 days.
Which versions are affected by CVE-2026-122006?
activestorage (RubyGems) ≥ 8.1.0.beta1, < 8.1.4.1 (fixed in 8.1.4.1); activestorage (RubyGems) < 8.0.5.2 (fixed in 8.0.5.2); rubyonrails Active Storage < 8.0.5.2 (fixed in 8.0.5.2); rubyonrails Active Storage ≥ 8.1, < 8.1.4.1 (fixed in 8.1.4.1).
How do I fix CVE-2026-122006?
Upgrade Active Storage to the fixed version for your branch: 8.0.5.2 for the 8.0 line and 8.1.4.1 for the 8.1 line. Apply the new security policy to ImageMagick's system policy file, such as /etc/ImageMagick-7/policy.xml. Applications that replace MiniMagick.clienv or use MiniMagick.cliprefix must apply the security policy rules manually.
Timeline & sources
References
Related vulnerabilities & news
- CVE-2026-126186: Rails Active Storage flaw can expose files or allow code execution via media processing
- msgpack-ruby JRuby decoder: header-declared sizes drive uncapped allocation and memory exhaustion (CVE-2026-126366)
- AutoGPT SSRF Vulnerability in IPv6 Blocklist Allows Local Network Access
- OpenAI and Cisco Debut Shirudo, an Open-Source Tool to Shield Linux Servers from Exploits
- Debian Fixes pam-mysql Flaw That Let Empty-Password Users Authenticate