Cloudanix VulnDB

CVE-2025-24293

None

CVSS

—

EPSS

5.5%

Published

Jan 30, 2026

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A flaw in image transformation handling can let attackers turn a user-facing image feature into a way to run commands on the server if the application accepts unsafe image options from users.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Remote Code Execution
Component
Web Framework
Class
Command Injection
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

This is a command injection weakness in applications using Active Storage with the image_processing gem and mini_magick/ImageMagick as the processor. Active Storage’s default transformation allowlist included methods that could be abused to bypass intended safety controls when an application accepts user-controlled transformation method names or transformation parameters. If vulnerable application code passes untrusted request input into image variant generation, an attacker may cause the image processor to execute unintended operating system commands in the context of the application process. The issue requires a vulnerable application pattern, such as dynamically building blob.variant calls from arbitrary user input; applications that only use fixed, server-defined transformations are not expected to be directly exploitable through this flaw.

Why it matters to the business

Successful exploitation can turn an image transformation feature into remote code execution on the application server, allowing theft of application secrets, access to stored data, service disruption, or follow-on compromise of connected systems. Although this issue is not currently listed in CISA KEV, is not marked as ransomware-used, and has no known public exploit maturity in the provided intelligence, command injection vulnerabilities should be treated as high priority because the impact can be severe when the vulnerable coding pattern is present. Organizations using the affected Chainguard or Wolfi Infinispan 15.2 package lines should upgrade to the fixed 15.2.5-r1 builds and separately review any Rails Active Storage image transformation paths that consume user-supplied methods or parameters.

How an attack unfolds

An attacker first identifies an application endpoint that returns or generates image variants and observes that transformation behavior can be influenced through request parameters. The attacker then supplies crafted transformation method names or arguments that are accepted by the application and passed into Active Storage variant processing. When the image variant is generated, Active Storage invokes image_processing with mini_magick, which in turn calls ImageMagick. Because unsafe transformation methods or parameters can circumvent the intended safe defaults, the crafted input may be interpreted in a way that causes operating system command execution. The commands execute with the privileges of the application worker or web process, after which the attacker may enumerate the runtime environment, read secrets, access application data, download additional tools, or attempt lateral movement.

How to fix it

Upgrade affected packages to fixed versions: infinispan-15.2 for Chainguard and Wolfi to 15.2.5-r1; infinispan-15.2-compat for Chainguard and Wolfi to 15.2.5-r1; and infinispan-15.2-images for Chainguard and Wolfi to 15.2.5-r1. For applications using Active Storage, image_processing, and mini_magick, do not pass arbitrary user input as transformation method names or transformation arguments. Replace dynamic transformation construction with explicit server-side allowlists of supported operations and tightly validated numeric or enum parameters. Deploy and enforce a restrictive ImageMagick security policy, including disabling dangerous coders, delegates, external URL handling, and shell-capable behavior where not required. Regenerate and redeploy container images or application artifacts after upgrading dependencies. If immediate upgrade is not possible, disable user-controlled image transformations, route variant generation through fixed presets, or temporarily disable affected image-processing features until corrected.

How to confirm the fix worked

Confirm installed package versions show 15.2.5-r1 or later for all affected Chainguard and Wolfi package variants. Review dependency manifests, container SBOMs, image scan output, and running container package inventories to ensure vulnerable builds are no longer present. Search application code for dynamic Active Storage variant generation patterns where request parameters are used as transformation method names or arguments, including blob.variant(params...), variant(params...), public_send with transformation names, or dynamically constructed transformation hashes. Test exposed image transformation endpoints to verify that unsupported transformation names, non-numeric parameters, shell metacharacters, remote URLs, and delegate-like values are rejected before reaching image processing. Validate the ImageMagick policy with `magick -list policy` or equivalent tooling and confirm risky coders/delegates are disabled. After deployment, clear or regenerate cached variants if there is concern that maliciously generated artifacts or processing side effects may remain.

Typical attack path

  1. Find an application feature that generates transformed image variants, thumbnails, previews, or resized images.
  2. Determine whether image transformation methods or parameters are controlled by request input rather than fixed server-side logic.
  3. Supply crafted transformation input that reaches Active Storage blob.variant or equivalent variant-processing code.
  4. Trigger lazy generation or regeneration of the image variant so mini_magick/ImageMagick processes the transformation.
  5. Achieve command execution as the application service account if unsafe input is accepted.
  6. Use the gained execution context to inspect files, environment variables, credentials, temporary directories, and network reachability.
  7. Attempt persistence, data access, or lateral movement depending on the permissions available to the application process.

How to detect it

Investigate whether this was already exploited by correlating image upload, thumbnail, preview, and variant-generation requests with process execution and outbound network activity from application servers or containers. Review web access logs for requests to image transformation endpoints containing unusual transformation keys, shell metacharacters, encoded command separators, external URLs, or parameters that do not match expected resize/crop/format values. Review application logs for Active Storage variant generation errors, MiniMagick/ImageMagick exceptions, unexpected delegate or policy-denied messages, and repeated failed transformation attempts. Use EDR, auditd, Sysmon for Linux, container runtime telemetry, or Kubernetes audit/runtime logs to identify web, application, or background worker processes spawning shells or utilities such as curl, wget, nc, bash, sh, python, perl, ruby, or busybox during image processing. Inspect temporary directories used by ImageMagick and the application for unexpected scripts, downloaded binaries, reverse-shell tools, or unusual image-processing artifacts. Examine outbound proxy, DNS, and firewall logs for unexpected connections from application workloads immediately after image variant requests. If exploitation is suspected, preserve container layers, application logs, Active Storage logs, process execution telemetry, temporary files, and the original uploaded image objects for forensic analysis.

  • blob.variant(params
  • variant(params
  • ActiveStorage::Variant
  • MiniMagick::Error
  • ImageMagick
  • policy.xml
  • convert
  • magick
  • identify
  • /tmp/magick-
  • /tmp/mini_magick
  • /var/tmp/magick-
  • sh -c
  • /bin/sh
  • /bin/bash
  • curl
  • wget
  • nc
  • netcat
  • busybox
  • python -c
  • perl -e
  • ruby -e
  • delegate failed
  • not authorized by the security policy

What your security team should do

  • Prioritize patching all affected Chainguard and Wolfi package variants to 15.2.5-r1 or later, especially internet-facing services that perform image uploads, previews, thumbnails, or transformations.
  • Ask application teams to identify all Active Storage usage with image_processing and mini_magick, then remove any user-controlled transformation method or argument handling.
  • Implement fixed transformation presets instead of accepting arbitrary transformation operations from users.
  • Deploy a hardened ImageMagick security policy and verify it is included in all runtime containers and hosts.
  • Add detection for web or worker processes spawning shells, download utilities, scripting interpreters, or unusual child processes during image processing.
  • Review recent application, web, worker, EDR, process execution, and outbound network logs for suspicious activity tied to image variant generation endpoints.
  • If suspicious execution is found, rotate application secrets, API tokens, database credentials, and signing keys accessible to the application runtime.
  • Add regression tests that reject unsafe image transformation parameters and fail builds if vulnerable dynamic variant patterns are reintroduced.

The record

# Active Storage allowed transformation methods potentially unsafe Active Storage attempts to prevent the use of potentially unsafe image transformation methods and parameters by default. The default allowed list contains three methods allow for the circumvention of the safe defaults which enables potential command injection vulnerabilities in cases where arbitrary user supplied input is accepted as valid transformation methods or parameters. Impact ------ This vulnerability impacts applications that use Active Storage with the image_processing processing gem in addition to mini_magick as the image processor. Vulnerable code will look something similar to this: ``` <%= image_tag blob.variant(params[:t] => params[:v]) %> ``` Where the transformation method or its arguments are untrusted arbitrary input. All users running an affected release should either upgrade or use one of the workarounds immediately. Workarounds ----------- Consuming user supplied input for image transformation methods or their parameters is unsupported behavior and should be considered dangerous. Strict validation of user supplied methods and parameters should be performed as well as having a strong [ImageMagick security policy](https://imagemagick.org/script/security-policy.php) deployed. Credits ------- Thank you [lio346](https://hackerone.com/lio346) for reporting this!

Affected packages

Ecosystem Package Introduced Fixed
RubyGems activestorage 5.2.0 7.1.5.2
RubyGems activestorage 7.2 7.2.2.2
RubyGems activestorage 8.0 8.0.2.1
Chainguard gitlab-rails-ce-assets-18.1 0 18.1.6-r1
Chainguard gitlab-rails-ce-assets-18.2 0 18.2.8-r1
Chainguard gitlab-rails-ce-assets-18.3 0 18.3.5-r0
Chainguard gitlab-rails-ce-assets-fips-18.1 0 18.1.6-r2
Chainguard gitlab-rails-ce-assets-fips-18.2 0 18.2.8-r2
Chainguard gitlab-rails-ce-assets-fips-18.3 0 18.3.5-r2
Chainguard gitlab-rails-ce-doc-18.1 0 18.1.6-r1
Chainguard gitlab-rails-ce-doc-18.2 0 18.2.8-r1
Chainguard gitlab-rails-ce-doc-18.3 0 18.3.5-r0
Chainguard gitlab-rails-ce-doc-fips-18.1 0 18.1.6-r2
Chainguard gitlab-rails-ce-doc-fips-18.2 0 18.2.8-r2
Chainguard gitlab-rails-ce-doc-fips-18.3 0 18.3.5-r2
gem activestorage 5.2.0 7.1.5.2
gem activestorage 5.20 7.1.5.2
gem activestorage 7.2 7.2.2.2
gem activestorage 8.0 8.0.2.1

Related vulnerabilities