Command InjectionWeakness · CWE-77

CVE-2025-24293

HIGH · 8.1 CVSS v3.1 Published 2026-01-30
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
90/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
# 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!

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Active Storage's default allowlist for image transformation methods contains entries that can be circumvented, enabling command injection when applications accept arbitrary user input for transformation methods or parameters. This affects only applications using both the image_processing gem and mini_magick as the image processor.

MitigationUpgrade to a patched Rails version that restricts the transformation method allowlist, and eliminate any patterns that pass user-supplied input directly to variant transformations.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
High
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Confirm Active Storage is in use
    Check your Rails application configuration (config/application.rb, Gemfile) for 'active_storage' in Gemfile or config.active_storage present in initializers
    Affected if Active Storage is not being used in the application
  2. Verify image_processing gem is installed
    Run 'gem list image_processing' or check Gemfile.lock for the image_processing gem
    Affected if image_processing gem is not present in the project dependencies
  3. Check if mini_magick is configured as the image processor
    Inspect config/environments/development.rb (or other environment files) for config.active_storage.analyze = false and look for mini_magick usage in the codebase; also check Gemfile.lock to confirm mini_magick is installed
    Affected if mini_magick is not configured or is not being used as the image processor (e.g., using vips instead)
  4. Identify if user input flows into transformation methods
    Search codebase for Active Storage variant calls that accept user-supplied parameters, such as: variant(resize: params[:resize]), variant(params[:transform]), or similar patterns using request/params in variant definitions
    Affected if Application code passes untrusted user input directly to Active Storage variant transformation methods or parameters

Your environment is affected only if you use Active Storage with the image_processing gem and mini_magick, AND your application accepts arbitrary user input for transformation methods or parameters without strict allowlist validation.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Upgrade to a patched Rails version that restricts the transformation method allowlist, and eliminate any patterns that pass user-supplied input directly to variant transformations.

Recommended fix Moderate confidence

Rails 7.1.x or later (with Active Storage fix)

  1. 1. Identify the Rails version currently in use by checking the Gemfile.lock or running `bundle exec rails --version`
  2. 2. Identify the Active Storage version by checking the Gemfile.lock for 'activesorage'
  3. 3. Upgrade to Rails 7.1.x or later which contains the fix for this vulnerability
  4. 4. Run `bundle update rails` or specify the new Rails version in Gemfile and run `bundle install`
  5. 5. Verify the upgrade by testing image variant generation with your Active Storage setup
  6. 6. If upgrading is not immediately possible, implement strict validation on any user-supplied transformation parameters before passing them to Active Storage variants
  7. 7. Additionally, configure ImageMagick security policies as a defense-in-depth measure
Caveat Minor Rails upgrades within 7.x should have minimal breaking changes, but review the Rails 7.1 release notes for any migration requirements

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing4.0 h
  • Review / QA2.0 h
18.0 hours of engineering $3,200
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,120.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-24293 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-24293 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data