CVE-2026-122006: Active Storage Arbitrary File Read/Write via Image Analysis
Detects potential exploitation of CVE-2026-122006, an arbitrary file write and read vulnerability in Ruby on Rails Active Storage image analysis. Affected versions (>= 8.1.0.beta1 < 8.1.4.1, and < 8.0.5.2) do not constrain ImageMagick's coders. ImageMagick selects a coder from a file's content, and some coders act on files named inside the image rather than on the image itself. The ImageMagick analyzer runs when a file is attached, so an unauthenticated attacker who can upload a crafted file may invoke such a coder to write arbitrary files on the server and, when attachments use the Disk service, read files readable by the application process (such as secret_key_base). No variant, preview, or analyze call is required. CWE-1188 (insecure default initialization). The fixed versions ship an ImageMagick security policy that denies the MSL scripting coder, the Ghostscript coders and the gs delegate, and the coders that read or delete other files. This detection surfaces vulnerable ActiveStorage versions and runtime indicators such as unexpected file writes or reads by the Rails app process during blob analysis and anomalous ImageMagick subprocess invocations.
Vulnerability Intelligence
TheoreticalAffected Software
- Vendor
- rubygems
- Product
- activestorage
- Versions
- >= 8.1.0.beta1, < 8.1.4.1, < 8.0.5.2
Weakness (CWE)
Timeline
- Disclosed
- November 12, 2026
References & Proof of Concept
- https://github.com/rails/rails/security/advisories/GHSA-f3w6-w445-fwh9
- https://nvd.nist.gov/vuln/detail/CVE-2026-122006
- https://github.com/digitalocean/droplet-1-clicks/pull/488
- https://github.com/rubysec/ruby-advisory-db/pull/1300
- https://github.com/rails/rails/commit/468aa9a93fc98f5476b6821770f4ccfcb7f7d328
- https://github.com/rails/rails/commit/ea8c40121ce53a3d0255cd4eb6d13bfe3bc01776
- https://github.com/alan-turing-institute/cyber-threat-observatory/blob/main/reports/2026-11-04/TIER_2_CVE-2026-122006.md
- 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/rubysec/ruby-advisory-db/blob/master/gems/activestorage/GHSA-f3w6-w445-fwh9.yml
- https://github.com/advisories/GHSA-f3w6-w445-fwh9
CVSS
- Attack Vector
- Network
- Attack Complexity
- Low
- Privileges Required
- None
- User Interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
What is CVE-2026-122006 CVE-2026-122006: Active Storage Arbitrary File Read/Write via Image Analysis?
CVE-2026-122006: Active Storage Arbitrary File Read/Write via Image Analysis (CVE-2026-122006) maps to the Initial Access and Execution and Collection tactics — the adversary is trying to get into your network in MITRE ATT&CK.
This page provides production-ready detection logic for CVE-2026-122006: Active Storage Arbitrary File Read/Write via Image Analysis, covering the data sources and telemetry it touches: Microsoft Defender for Endpoint. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Initial Access Execution Collection
// df00tech DF00-3eb7bf365d · https://df00tech.com/detections/CVE-2026-122006 · licence: https://df00tech.com/detections/licence
// Detect anomalous image-analyzer subprocesses spawned by Rails/Active Storage during blob analysis
let appProcs = dynamic(["ruby","puma","unicorn","rails"]);
let analyzerTools = dynamic(["identify","convert","magick","vipsheader","vips","ffprobe","ffmpeg","mutool","gs"]);
DeviceProcessEvents
| where InitiatingProcessFileName has_any (appProcs) or InitiatingProcessCommandLine has "active_storage"
| where FileName has_any (analyzerTools)
| where ProcessCommandLine has_any ("/etc/","/root/","..\\","../","-write","msl:","@/","ephemeral:","label:@","text:@")
| project TimeGenerated, DeviceName, AccountName, InitiatingProcessFileName, FileName, ProcessCommandLine, InitiatingProcessCommandLine
| order by TimeGenerated desc Flags image-analysis tooling (ImageMagick/Vips/ffprobe) launched by a Ruby/Rails process with command lines referencing sensitive paths or ImageMagick coder pseudo-protocols indicative of path traversal/arbitrary file access during Active Storage analysis.
Data Sources
Required Tables
False Positives
- Legitimate batch image processing or thumbnailing jobs that legitimately invoke ImageMagick/Vips with temp paths
- Developers running image tooling manually on a web server for debugging
- Monitoring or backup agents that scan image directories and trigger analyzer tooling
Query fingerprint DF00-3eb7bf365d · licence
Sigma logsource & community rules
The detection logic for CVE-2026-122006: Active Storage Arbitrary File Read/Write via Image Analysis (CVE-2026-122006) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: process_creation
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-122006
References (8)
- https://github.com/rails/rails/security/advisories/GHSA-f3w6-w445-fwh9
- https://nvd.nist.gov/vuln/detail/CVE-2026-122006
- https://github.com/rails/rails/commit/468aa9a93fc98f5476b6821770f4ccfcb7f7d328
- https://github.com/rails/rails/commit/ea8c40121ce53a3d0255cd4eb6d13bfe3bc01776
- https://github.com/rails/rails/releases/tag/v8.1.4.1
- https://github.com/rails/rails/releases/tag/v8.0.5.2
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activestorage/GHSA-f3w6-w445-fwh9.yml
- https://github.com/advisories/GHSA-f3w6-w445-fwh9
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Vulnerable ActiveStorage version present
Expected signal: Version string printed; compare against >= 8.1.0.beta1 < 8.1.4.1 or < 8.0.5.2.
- Test 2 Simulated analyzer path-traversal invocation
Expected signal: ProcessRollup/auditd record: parent masquerading as puma spawning identify with ../ and /etc/passwd in command line.
- Test 3 Simulated ImageMagick coder pseudo-protocol invocation
Expected signal: Process event: ruby-named parent spawning convert with text:@ coder referencing a filesystem path.
- Test 4 Crafted upload triggering analysis (end-to-end lab)
Expected signal: App log shows ActiveStorage::Analyzer run; child analyzer process spawned by the Rails worker.
Response Playbook
Triage
- Identify the affected host and confirm the Rails application's ActiveStorage gem version via Gemfile.lock or `bundle list activestorage`; versions >= 8.1.0.beta1 < 8.1.4.1 or < 8.0.5.2 are vulnerable.
- Correlate the alerting subprocess with the originating HTTP upload: find the Active Storage blob record and the request that created it, noting source IP, user/session, and uploaded filename/content-type.
- Inspect the analyzer command line for traversal sequences (../), absolute sensitive paths (/etc/, /root/), or ImageMagick coder pseudo-protocols (msl:, ephemeral:, label:@, text:@) that indicate attempted arbitrary file read/write.
- Determine whether the analyzer process read or wrote any file outside the Active Storage temp/upload directory using filesystem audit logs.
Containment
- Disable or quarantine the affected upload endpoint and pause Active Storage analysis jobs (analyze_later queue) until patched.
- Upgrade ActiveStorage to 8.1.4.1 (8.1.x) or 8.0.5.2 (8.0.x) and redeploy; invalidate any blobs uploaded during the suspected exploitation window.
- If compromise of files is suspected, rotate secrets (Rails credentials, DB passwords, API keys) that may have been read from disk.
Evidence Collection
- Preserve the uploaded blob file(s), their ActiveStorage metadata rows, and associated web/app logs for the request timeframe.
- Capture process-execution records (parent/child, full command line, user) for the analyzer invocations and any resulting file create/read events.
- Snapshot filesystem timestamps (mtime/atime) on sensitive directories to determine whether arbitrary read/write succeeded.
Escalation Criteria
- ! Escalate to IR if analyzer command lines reference files outside the upload directory (e.g. /etc/passwd, app credentials) or if unexpected files were written to webroot or system paths.
- ! Escalate if the vulnerable version is confirmed and the upload endpoint is internet-facing with unauthenticated or low-privilege upload capability.
Investigation Guide
Forensic Artifacts
- >
Active Storage blob files and metadata rows in the active_storage_blobs/attachments tables - >
Process-execution logs showing analyzer tool invocations with attacker-influenced arguments - >
Web/app server access logs correlating the malicious upload request - >
Filesystem audit records for reads/writes outside the upload temp directory
Tuning Guidance
Establish a baseline of legitimate analyzer command lines produced by your thumbnail/variant pipeline and allowlist those temp-directory paths. Focus alerting on invocations whose arguments reference paths outside the Active Storage temp/upload root or use ImageMagick coder pseudo-protocols. Once ActiveStorage is upgraded to 8.1.4.1/8.0.5.2, keep the detection as a regression guard but lower severity for patched hosts.
Hunting Queries
Baselines image-analyzer invocations by Rails workers so anomalous command lines (traversal, coder protocols, sensitive paths) stand out from routine thumbnailing.
// df00tech DF00-3eb7bf365d · https://df00tech.com/detections/CVE-2026-122006 · licence: https://df00tech.com/detections/licence
DeviceProcessEvents | where InitiatingProcessFileName in ("ruby","puma","unicorn") | where FileName in ("identify","convert","magick","vips","ffprobe") | summarize count() by ProcessCommandLine, DeviceName | order by count_ desc ``` df00tech DF00-3eb7bf365d · https://df00tech.com/detections/CVE-2026-122006 · licence: https://df00tech.com/detections/licence ```
index=linux (process_name="identify" OR process_name="convert" OR process_name="ffprobe" OR process_name="vips") parent_process_name IN ("ruby","puma","unicorn") | stats count by command_line, host Atomic Red Team Tests
Checks a Ruby project's lockfile for an ActiveStorage version in the affected range.
Command
grep -A1 -i 'activestorage' Gemfile.lock | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+(\.[0-9a-z]+)?' | head -1 Cleanup
echo 'no changes made' Expected Telemetry
Version string printed; compare against >= 8.1.0.beta1 < 8.1.4.1 or < 8.0.5.2.
Expected Detection
Not a runtime alert; inventory/vuln-scan control flags the host as vulnerable.
Simulates an image-analysis subprocess invoked with a traversal/sensitive path argument as a Rails worker child, to validate process-telemetry detection (lab only).
Command
bash -c 'exec -a puma bash -c "identify ../../../../etc/passwd 2>/dev/null; true"' Cleanup
echo 'no changes made' Expected Telemetry
ProcessRollup/auditd record: parent masquerading as puma spawning identify with ../ and /etc/passwd in command line.
Expected Detection
KQL/SPL/EDR rules fire on analyzer process with traversal + /etc/ indicators.
Invokes ImageMagick with a coder pseudo-protocol (text:@) referencing a file, simulating arbitrary file read attempts during analysis (lab only).
Command
bash -c 'exec -a ruby bash -c "convert text:@/etc/hostname info: 2>/dev/null; true"' Cleanup
echo 'no changes made' Expected Telemetry
Process event: ruby-named parent spawning convert with text:@ coder referencing a filesystem path.
Expected Detection
Detection rules match the ImageMagick coder pseudo-protocol indicator (text:@).
Uploads a crafted image attachment to a lab Rails app to trigger ActiveStorage analysis and observe analyzer subprocess behavior.
Command
curl -s -F 'image=@/tmp/poc.png' http://localhost:3000/uploads >/dev/null; echo 'uploaded' Cleanup
rm -f /tmp/poc.png; echo 'removed poc artifact' Expected Telemetry
App log shows ActiveStorage::Analyzer run; child analyzer process spawned by the Rails worker.
Expected Detection
If the crafted metadata includes traversal/coder indicators, the analyzer command line triggers the detection rules.
Related Detections
Related Techniques
Same Tactic: Initial Access
Blog posts about this detection
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040