cve.bz

CVE-2025-24293 rails activestorage: Code Injection

9.2 criticalExploitEPSS 5.6%Fix available

Critical (9.2) in rails activestorage. EPSS 5.6% estimated probability of exploitation activity in the next 30 days. Fixed in activestorage 7.1.5.2, 7.2.2.2, 8.0.2.1.

On this page
# 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!

Severity

CVSS 4.0

9.2 critical
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
5.6% (unchanged from 5.6% a week ago; 5.5% 30 days ago) estimated probability of exploitation activity in the next 30 days; 93rd percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: total, assessed 2026-02-02. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-77 Improper Neutralization of Special Elements used in a Command
CWE-94 Improper Control of Generation of Code (Code Injection)
CWE-88 Improper Neutralization of Argument Delimiters in a Command (Argument Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-24293 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-24293?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-24293?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-24293 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Rails activestoragefrom 5.2 before 5.*
Rails activestoragefrom 7.0 before 7.1.5.2
Rails activestoragefrom 8.0 before 7.0.2.1

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-r4mg-4433-c7g3RubyGemsactivestorage>=8.0 <8.0.2.18.0.2.1
GHSA-r4mg-4433-c7g3RubyGemsactivestorage>=7.2 <7.2.2.27.2.2.2
GHSA-r4mg-4433-c7g3RubyGemsactivestorage>=5.2.0 <7.1.5.27.1.5.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11rails2:6.0.3.7+dfsg-2+deb11u4DLA-4416-1
Debian12rails2:6.1.7.10+dfsg-1~deb12u2DEBIAN-CVE-2025-24293 DSA-6090-1
Debian13rails2:7.2.2.2+dfsg-2~deb13u1DEBIAN-CVE-2025-24293 DSA-6090-1
Debian14rails2:7.2.2.2+dfsg-1DEBIAN-CVE-2025-24293
Ubuntu24.04:LTS, 25.10, 26.04:LTS and 5 morerailsno fix listedUBUNTU-CVE-2025-24293

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Important.

Red Hat's statement

The vulnerability is marked as Important since the exploitation is not possible in default Active Storage configurations and instead requires applications to improperly pass untrusted user input as image transformation methods or parameters.

Since Red Hat products do not utilize configurations that meet the specific conditions required for exploitation, no Red Hat offerings are affected. These conditions include the use of Active Storage with the image_processing gem and MiniMagick, coupled with unsafe application logic that exposes transformation controls to users.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat 3scale API Management Platform 23scale-amp20/systemNot affected
Red Hat 3scale API Management Platform 23scale-amp21/systemNot affected
Red Hat 3scale API Management Platform 23scale-amp21/zyncNot affected
Red Hat 3scale API Management Platform 23scale-amp22/systemNot affected
Red Hat 3scale API Management Platform 23scale-amp22/zyncNot affected
Red Hat 3scale API Management Platform 23scale-amp24/systemNot affected
Red Hat 3scale API Management Platform 23scale-amp24/zyncNot affected
Red Hat 3scale API Management Platform 23scale-amp25/systemNot affected
Red Hat 3scale API Management Platform 23scale-amp25/zyncNot affected
Red Hat 3scale API Management Platform 23scale-amp26/systemNot affected
Red Hat 3scale API Management Platform 23scale-amp26/zyncNot affected
Red Hat 3scale API Management Platform 23scale-amp2/system-rhel7Not affected
Red Hat 3scale API Management Platform 23scale-amp2/system-rhel8Not affected
Red Hat 3scale API Management Platform 23scale-amp2/system-rhel9Not affected
Red Hat 3scale API Management Platform 23scale-amp2/zync-rhel7Not affected
Red Hat 3scale API Management Platform 23scale-amp2/zync-rhel8Not affected
Red Hat 3scale API Management Platform 23scale-amp2/zync-rhel9Not affected
Red Hat Satellite 6rubygem-activestorageNot affected
Red Hat Satellite 6satellite:el8/rubygem-activestorageNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-24293.

Public exploits

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High
  • CAPEC-41 Using Meta-characters in E-mail Headers to Inject Malicious Payloads Likelihood: High · Severity: High
  • CAPEC-88 OS Command Injection Likelihood: High · Severity: High
  • CAPEC-137 Parameter Injection Likelihood: Medium · Severity: Medium
  • CAPEC-174 Flash Parameter Injection Likelihood: High · Severity: Medium
  • CAPEC-460 HTTP Parameter Pollution (HPP) Severity: Medium
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-40 Manipulating Writeable Terminal Devices Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-77.

References

Check your stackJSON