Activestorage: Active Storage has possible arbitrary file read and remote code execution in Active Storage variant processing (CVE-2026-66066)
Active Storage in Ruby on Rails versions before 7.2.3.2 and certain 8.x versions has a critical vulnerability allowing unauthenticated attackers to read arbitrary files on the server via crafted image uploads processed by libvips. This can expose sensitive environment secrets such as secret_key_base and credentials, potentially leading to remote code execution or lateral movement. The vulnerability arises because Active Storage did not disable unsafe 'unfuzzed' libvips operations by default. Fixed versions of Active Storage and libvips (>= 8.13) are available. Applications must also rotate all secrets if compromise is suspected. Workarounds exist only if libvips >= 8.13 is installed; otherwise, removing libvips is the only option.
AI Analysis
Technical Summary
Active Storage in Ruby on Rails uses libvips for image variant processing. libvips includes 'unfuzzed' operations that are unsafe for untrusted content. Active Storage did not disable these operations, allowing an attacker who can upload crafted files to cause arbitrary file reads on the server, including sensitive environment data such as secret_key_base and credentials. This exposure can lead to remote code execution or lateral movement. The vulnerability affects applications using libvips as the variant processor and allowing image uploads from untrusted users. Fixed activestorage versions and libvips >= 8.13 disable these unsafe operations. Secret rotation is required if secrets were exposed. Workarounds involve disabling unfuzzed operations if libvips >= 8.13 is used. No workaround exists for older libvips versions except removing libvips dependency.
Potential Impact
An unauthenticated attacker can read arbitrary files on the server hosting the Rails application, including environment variables that contain critical secrets such as secret_key_base and external service credentials. Exposure of these secrets can lead to session hijacking, remote code execution, and lateral movement to other systems. The vulnerability impacts applications using Active Storage with libvips for image processing and accepting image uploads from untrusted users. The severity is critical due to the potential for full system compromise.
Mitigation Recommendations
Upgrade activestorage to a fixed version (>= 7.2.3.2, >= 8.0.5.1, or >= 8.1.3.1 as appropriate). Upgrade libvips to version 8.13 or later. After upgrading, rotate all secrets accessible to the application process, including secret_key_base, master key, credentials, database credentials, and third-party service tokens. If libvips >= 8.13 is in use but upgrading activestorage is not immediately possible, disable unfuzzed operations by setting the VIPS_BLOCK_UNTRUSTED environment variable or calling Vips.block_untrusted(true) in ruby-vips >= 2.2.1. If libvips < 8.13 is used, the only workaround is to remove libvips from the application. No other mitigations are effective. Technical details are withheld to encourage patching.
Activestorage: Active Storage has possible arbitrary file read and remote code execution in Active Storage variant processing (CVE-2026-66066)
Description
Active Storage in Ruby on Rails versions before 7.2.3.2 and certain 8.x versions has a critical vulnerability allowing unauthenticated attackers to read arbitrary files on the server via crafted image uploads processed by libvips. This can expose sensitive environment secrets such as secret_key_base and credentials, potentially leading to remote code execution or lateral movement. The vulnerability arises because Active Storage did not disable unsafe 'unfuzzed' libvips operations by default. Fixed versions of Active Storage and libvips (>= 8.13) are available. Applications must also rotate all secrets if compromise is suspected. Workarounds exist only if libvips >= 8.13 is installed; otherwise, removing libvips is the only option.
CVSS v4.0
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Active Storage in Ruby on Rails uses libvips for image variant processing. libvips includes 'unfuzzed' operations that are unsafe for untrusted content. Active Storage did not disable these operations, allowing an attacker who can upload crafted files to cause arbitrary file reads on the server, including sensitive environment data such as secret_key_base and credentials. This exposure can lead to remote code execution or lateral movement. The vulnerability affects applications using libvips as the variant processor and allowing image uploads from untrusted users. Fixed activestorage versions and libvips >= 8.13 disable these unsafe operations. Secret rotation is required if secrets were exposed. Workarounds involve disabling unfuzzed operations if libvips >= 8.13 is used. No workaround exists for older libvips versions except removing libvips dependency.
Potential Impact
An unauthenticated attacker can read arbitrary files on the server hosting the Rails application, including environment variables that contain critical secrets such as secret_key_base and external service credentials. Exposure of these secrets can lead to session hijacking, remote code execution, and lateral movement to other systems. The vulnerability impacts applications using Active Storage with libvips for image processing and accepting image uploads from untrusted users. The severity is critical due to the potential for full system compromise.
Mitigation Recommendations
Upgrade activestorage to a fixed version (>= 7.2.3.2, >= 8.0.5.1, or >= 8.1.3.1 as appropriate). Upgrade libvips to version 8.13 or later. After upgrading, rotate all secrets accessible to the application process, including secret_key_base, master key, credentials, database credentials, and third-party service tokens. If libvips >= 8.13 is in use but upgrading activestorage is not immediately possible, disable unfuzzed operations by setting the VIPS_BLOCK_UNTRUSTED environment variable or calling Vips.block_untrusted(true) in ruby-vips >= 2.2.1. If libvips < 8.13 is used, the only workaround is to remove libvips from the application. No other mitigations are effective. Technical details are withheld to encourage patching.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-xr9x-r78c-5hrm
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-66066"]
- Ecosystems
- ["RubyGems"]
- Database Specific Severity
- CRITICAL
- Cvss Version
- 4.0
Threat ID: 6a6bde219c2644c7f8dcb7c2
Added to database: 07/30/2026, 23:28:33 UTC
Last enriched: 07/31/2026, 00:19:38 UTC
Last updated: 07/31/2026, 00:19:38 UTC
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.