Skip to main content
CybersecurityVulnerability Management

Rails patches Active Storage flaw with RCE potential

Server room interior with rows of racks and a single workstation terminal.

CVE-2026-66066 is a critical vulnerability in Rails’ Active Storage that can let an unauthenticated attacker read arbitrary files from an application and — under a specific exploitation chain — escalate to remote code execution.

CVE-2026-66066 and Active Storage

Rails maintainers published an advisory assigning critical severity to CVE-2026-66066. The flaw resides in the Active Storage component, the built-in Rails facility for handling file uploads and attachments. When the vulnerability is exploitable, an attacker may access files belonging to the application process, including the process environment and secrets stored there.

libvips image-processing vector and exploitation prerequisites

The exploit vector documented by the Rails team requires that the application generate image thumbnails using libvips. If libvips is used, an attacker can upload a specially crafted image to a vulnerable application and trigger arbitrary-file reads on the server. A separate prerequisite is that the server must allow image uploads from untrusted users. If both conditions are met, the attacker may access sensitive app files such as the process environment, which typically contains the Rails master key (the 'secret_key_base') and credentials for databases, cloud storage, and other services.

Akamai’s assessment and the path from stolen keys to RCE

Security firm Akamai labeled the attack chain “KindaRails2Shell” and warned about its RCE potential. Akamai spelled out the consequence of a compromised Rails master key: “With the secret_key_base compromised, the attacker holds the master cryptographic key to the application,” explains Akamai. “They can forge session cookies, sign global IDs, and manipulate serialized data, which directly translates into full RCE on the underlying server.” Akamai coordinated with the researchers who reported the bug before public disclosure and has released web application firewall (WAF) protections for its customers.

Affected versions, distribution defaults, and mitigations

  • CVE-2026-66066 impacts Active Storage before 7.2.3.2, 8.0.x before 8.0.5.1, and 8.1.x before 8.1.3.1.
  • Rails 6.x is affected only when Active Storage has been configured outside its defaults.
  • ImageMagick users are not affected by this libvips-based vector; however, libvips is the default processor in the official Rails Docker images and in many Debian and Ubuntu setups, increasing exposure.

The Rails team recommends multiple mitigation and remediation steps. Administrators should upgrade libvips to version 8.13 or later and rotate the 'secret_key_base', database credentials, Active Storage service credentials, and any other secrets accessible to the application process. For systems already running libvips 8.13 or later, administrators can temporarily disable the vulnerable functionality by setting the VIPS_BLOCK_UNTRUSTED environment variable or by calling Vips.block_untrusted(true) when using ruby-vips 2.2.1 or newer. The advisory states there is no workaround for applications that use libvips versions earlier than 8.13.

Disclosure timeline, researchers, and tooling

The vulnerability was discovered and responsibly reported to the Rails team by researchers from Ethiack and GMO Flatt Security Inc. Rails maintainers intentionally withheld technical details to reduce risk of exploitation and initially scheduled full disclosure for August 28 on the Rails forums. Because public proof-of-concept exploits appeared quickly, maintainers decided to publish the full technical details and forensic investigation tooling earlier than planned.

What this means for technologists, DevOps teams, and adversaries

  • Technologists and security teams: Patch Active Storage to the listed fixed versions, upgrade libvips to 8.13 or later where possible, and prioritize rotating the 'secret_key_base' and other credentials that the process can read.
  • DevOps and infrastructure administrators: Identify deployments that use the libvips default (official Rails Docker images, Debian and Ubuntu packaging) and either upgrade libvips or apply VIPS_BLOCK_UNTRUSTED / Vips.block_untrusted(true) with ruby-vips 2.2.1+; recognize that no workaround exists for libvips versions older than 8.13.
  • Adversaries and threat analysts: Public proof-of-concept code appeared quickly, and Akamai cautions that compromising the master key creates a direct path to full RCE; WAF protections may buy time, but the underlying secrets and patched images remain the critical containment points.

The Rails advisory and the rapid appearance of proofs of concept have compressed the remediation window: fixes for Active Storage and an upgrade path for libvips are available, and maintainers and vendors have published defenses and tooling. The immediate test for administrators is operational: find deployments that use libvips (especially defaults in Docker, Debian, and Ubuntu), apply the libvips or Active Storage updates, and rotate any secrets that the process can access. How quickly those steps are executed will determine whether KindaRails2Shell remains a theoretical risk or becomes a widespread exploitation campaign.

Original report