Advisory Database
  • Advisories
  • Dependency Scanning
  1. gem
  2. ›
  3. activestorage
  4. ›
  5. CVE-2025-24293

CVE-2025-24293: Active Storage allowed transformation methods that were potentially unsafe

August 14, 2025

Active Storage attempts to prevent the use of potentially unsafe image transformation methods and parameters by default.

The default allowed list contains three methods allowing 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.

This has been assigned the CVE identifier CVE-2025-24293.

Versions Affected: >= 5.2.0 Not affected: < 5.2.0 Fixed Versions: 7.1.5.2, 7.2.2.2, 8.0.2.1

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.

Releases

The fixed releases are available at the normal locations.

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

Credits

Thank you lio346 for reporting this!

References

  • github.com/advisories/GHSA-r4mg-4433-c7g3
  • github.com/rails/rails
  • github.com/rails/rails/commit/1b1adf6ee6ca0f3104fcfce79360b2ec1e06a354
  • github.com/rails/rails/commit/2d612735ac0d9712fdfffaf80afa627e7295f6ce
  • github.com/rails/rails/commit/fb8f3a18c3d97524c0efc29150d1e5f3162fbb13
  • github.com/rails/rails/security/advisories/GHSA-r4mg-4433-c7g3
  • nvd.nist.gov/vuln/detail/CVE-2025-24293

Code Behaviors & Features

Detect and mitigate CVE-2025-24293 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 5.20 before 7.1.5.2, all versions starting from 7.2 before 7.2.2.2, all versions starting from 8.0 before 8.0.2.1

Fixed versions

  • 8.0.2.1
  • 7.2.2.2
  • 7.1.5.2

Solution

Upgrade to versions 7.1.5.2, 7.2.2.2, 8.0.2.1 or above.

Weakness

  • CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection')

Source file

gem/activestorage/CVE-2025-24293.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 19 Aug 2025 12:19:06 +0000.