Critical Rails Active Storage Flaw Enables Unauthenticated File Reads

· Original article ↗

Summary

CVE-2026-66066 can let unauthenticated attackers read files through crafted image uploads to affected Rails Active Storage apps using libvips. Rails released fixes; operators should upgrade and rotate accessible secrets. No in-the-wild exploitation was reported.

Key points

  • CVE-2026-66066 affects Rails Active Storage applications that use libvips to process untrusted image uploads.
  • A crafted upload can invoke unsafe libvips operations and disclose files readable by the Rails worker, including application secrets and credentials.
  • The article assesses that exposed credentials could enable further access or RCE, depending on what the credentials permit.
  • Fixed versions are Rails 7.2.3.2, 8.0.5.1, and 8.1.3.1; Rails 7.0 and 7.1 users must upgrade to a supported fixed branch.
  • Operators should rotate secrets accessible to the application and ensure libvips 8.13 or later and, when installed, ruby-vips 2.2.1 or later.
  • A temporary mitigation is to block untrusted libvips operations; earlier libvips versions cannot use this mitigation.
  • As of July 29, 2026, no proof of concept or in-the-wild exploitation had been reported in the article.

Article Details

Vulnerability Types
  • Arbitrary file read
Severity
Critical (CVSS 9.5)
Affected Versions
  • Ruby on Rails 7.0.0 through 7.2.3.1
  • Ruby on Rails 8.0.0 through 8.0.5
  • Ruby on Rails 8.1.0 through 8.1.3
  • Ruby on Rails 6.0.0 through 6.1.7.10 when Active Storage is configured to use Vips
Exploitation Status
not_reported
Exploit Availability
none_reported
Patch Status
available
Workarounds
  • With libvips 8.13 or later, set VIPS_BLOCK_UNTRUSTED.
  • With ruby-vips 2.2.1 or later, call Vips.block_untrusted(true).
  • If unable to upgrade Rails immediately, upgrade libvips or remove it from the application.

MITRE ATT&CK

CVE

People

Products