CVE-2026-66066 is a severe arbitrary file read and RCE vulnerability affecting the Active Storage component of Ruby on Rails. The flaw carries a CVSS score of 9.5 (Critical) and represents a significant risk to organizations that are running applications that handle user-uploaded images.
The vulnerability is rooted in how Active Storage interacts with the libvips library to generate image variants. The libvips processor contains certain “unfuzzed” operations intended for file formats unrelated to standard web images. Because these operations are unsafe for handling untrusted content, and Active Storage fails to adequately disable them, an attacker can exploit this pathway.
By uploading a specially crafted file, an attacker can trigger these unsafe operations, granting them the ability to read arbitrary files from the server's file system. Most critically, this includes the application's process environment, which exposes highly sensitive secrets, such as the secret_key_base, cloud storage credentials, and database passwords.
The following activestorage versions are notably affected:
- Versions prior to 7.2.3.2
- Versions 8.0.x prior to 8.0.5.1
- Versions 8.1.x prior to 8.1.3.1