Skip to content
CVE-2026-122006 Sumo Logic CSE · Sumo

Detect CVE-2026-122006: Active Storage Arbitrary File Read/Write via Image Analysis in Sumo Logic CSE

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.

MITRE ATT&CK

Tactic
Initial Access Execution Collection

Sumo Detection Query

Sumo Logic CSE (Sumo)
sql
// df00tech DF00-3eb7bf365d · https://df00tech.com/detections/CVE-2026-122006 · licence: https://df00tech.com/detections/licence
_sourceCategory=*linux* OR _sourceCategory=*endpoint*
| where parent_process_name in ("ruby","puma","unicorn","rails")
| where process_name in ("identify","convert","magick","vips","vipsheader","ffprobe","ffmpeg","mutool","gs")
| where command_line matches /(\.\.\/|\/etc\/|\/root\/|msl:|ephemeral:|label:@|text:@|-write)/
| fields _messagetime, host, user, parent_process_name, process_name, command_line
| sort by _messagetime desc
high severity medium confidence

Sumo Logic search for image-analysis subprocesses of Rails workers carrying path-traversal/coder indicators tied to CVE-2026-122006.

Data Sources

Linux host logsEndpoint process telemetry

Required Tables

linux_process_eventsendpoint_process_events

False Positives & Tuning

  • Legitimate image variant/thumbnail jobs
  • Developer debugging sessions
  • Media processing services

Other platforms for CVE-2026-122006


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.

  1. 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.

  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.

  3. Test 3 Simulated ImageMagick coder pseudo-protocol invocation

    Expected signal: Process event: ruby-named parent spawning convert with text:@ coder referencing a filesystem path.

  4. 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

  1. 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.
  2. 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.
  3. 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.
  4. Determine whether the analyzer process read or wrote any file outside the Active Storage temp/upload directory using filesystem audit logs.

Containment

  1. Disable or quarantine the affected upload endpoint and pause Active Storage analysis jobs (analyze_later queue) until patched.
  2. 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.
  3. If compromise of files is suspected, rotate secrets (Rails credentials, DB passwords, API keys) that may have been read from disk.

Evidence Collection

  1. Preserve the uploaded blob file(s), their ActiveStorage metadata rows, and associated web/app logs for the request timeframe.
  2. Capture process-execution records (parent/child, full command line, user) for the analyzer invocations and any resulting file create/read events.
  3. 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.

Hunting — KQL
kql
// 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
Hunting — SPL
spl
``` 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

Test 1 Vulnerable ActiveStorage version present
linux

Checks a Ruby project's lockfile for an ActiveStorage version in the affected range.

Command

bash
grep -A1 -i 'activestorage' Gemfile.lock | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+(\.[0-9a-z]+)?' | head -1

Cleanup

bash
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.

Test 2 Simulated analyzer path-traversal invocation
linux

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
bash -c 'exec -a puma bash -c "identify ../../../../etc/passwd 2>/dev/null; true"'

Cleanup

bash
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.

Test 3 Simulated ImageMagick coder pseudo-protocol invocation
linux

Invokes ImageMagick with a coder pseudo-protocol (text:@) referencing a file, simulating arbitrary file read attempts during analysis (lab only).

Command

bash
bash -c 'exec -a ruby bash -c "convert text:@/etc/hostname info: 2>/dev/null; true"'

Cleanup

bash
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:@).

Test 4 Crafted upload triggering analysis (end-to-end lab)
linux

Uploads a crafted image attachment to a lab Rails app to trigger ActiveStorage analysis and observe analyzer subprocess behavior.

Command

bash
curl -s -F 'image=@/tmp/poc.png' http://localhost:3000/uploads >/dev/null; echo 'uploaded'

Cleanup

bash
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