← News
/DISPATCH · 2026-08-02

CVE-2026-66066: Rails Active Storage Arbitrary File Read — Upgrading Rails Alone Does Not Fix It

CVE-2026-66066 (KindaRails2Shell) hits Rails 7.0–8.1 across three branches, CVSSv4 9.5. Unauthenticated arbitrary file read via a malicious image upload. A Rails upgrade is not enough; you also need libvips 8.13+.

Overview

CVE-2026-66066, named KindaRails2Shell, was disclosed 1 August 2026 in Ruby on Rails Active Storage. CVSSv4 9.5 (Critical). An unauthenticated attacker reads any file the Rails worker can access by uploading a crafted image. The advisory landed 29 July; full technical details dropped 31 July, four weeks early. Rails apps using libvips as the image backend are a remote unauthenticated attack surface.

The bug is tightly coupled to default Active Storage config. libvips is a common backend for user-uploaded images — public signup, avatars, product photos, attachments. The patch chain requires libvips 8.13, which many production deployments lack. Upgrade Rails without it and the app may refuse to boot; the hole stays open.

Technical Details

Affected Versions and Patches

Mechanism

Active Storage passes uploaded attachments to image analyzers and transformers. With a libvips backend, libvips starts processing without blocking unsafe operations. A crafted malicious image triggers an internal libvips op chain that reads any local file the Rails worker process can read, including /etc/shadow, `application.yml`, database credentials, and SSH private keys.

Researchers named it KindaRails2Shell because, under specific conditions, it can escalate to remote shell-level control. Characteristics:

PoC and Disclosure Timeline

Disclosed by research group RECATOOLS. Full technical details were planned after patches had time to land. Escalating attack activity forced an early dump on 31 July (two days after the patch) of a complete PoC and analysis. Assume the PoC is already circulating in public channels.

Impact

CVSSv4 base 9.5 (Critical), vector `AV:N/AC:L/PR:N/UI:N`. Rails 6.x through 8.x — the three main branches, covering 12 years of releases since 2014. High risk for ecommerce SaaS, content platforms, social networks, and internal enterprise portals. File read yields database credentials, cloud API keys, KMS encryption keys, and SSH private keys, enabling lateral movement, data theft, and persistence.

Remediation

Immediate Actions

Mitigation and Detection

Long-term Hardening

References