{"id":"CVE-2026-66066","published":"2026-07-30T18:32:11Z","modified":"2026-08-05T13:46:21Z","title":"Action Pack: Possible arbitrary file read and remote code execution in Active Storage variant processing","vendor":"rails","product":"rails","tier":"core","eol":null,"affectedVersions":[{"vendor":"rails","product":"rails","versions":["< 7.2.3.2",">= 8.0.0.beta1, < 8.0.5.1",">= 8.1.0.beta1, < 8.1.3.1"]}],"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"The flaw is in Active Storage's variant processing within the Rails framework (Action Pack), where libvips operations marked unsafe for untrusted content are not disabled. Applications are exposed when they use libvips and accept image uploads from untrusted users, and an unauthenticated remote attacker can craft an upload that invokes such an operation to read arbitrary files accessible to the Rails process, including environment variables and secrets.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T08:31:13Z"},"cvss":{"score":9.5,"severity":"CRITICAL","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.30071,"percentile":0.98209,"date":"2026-10-30","provenance":"source"},"kev":null,"vulncheckKev":{"dateAdded":"2026-08-25","exploitedFirstSeen":"2026-08-31","ransomware":false,"evidence":[{"url":"https://www.linkedin.com/posts/vulncheck_critical-ruby-on-rails-vulnerability-in-attackers-activity-7501342523660091392-3XzK/","date":"2026-08-31"},{"url":"https://www.trellix.com/blogs/research/the-bug-report-august-2026-edition/","date":"2026-09-03"}],"evidenceTotal":2,"provenance":"source"},"exploited":true,"otx":{"pulseCount":10,"pulses":[{"name":"CVE-2026-66066 (KindaRails2Shell): Rails Active Storage file read to RCE","url":"https://otx.alienvault.com/pulse/6accfba2fc8d50fe16b1e37d","created":"2026-10-12"},{"name":"PaperCut NG/MF CVE-2026-81578/82078 Mass RCE via 45.142.193.132 (AI-Orchestrated)","url":"https://otx.alienvault.com/pulse/6aa63cef9672396217b8d823","created":"2026-09-13"},{"name":"SAP OVERPASS & S4GET: Critical Unauth Kernel/Message Server RCEs (CVE-2026-44756, CVE-2026-58240)","url":"https://otx.alienvault.com/pulse/6aa248d8c5b6d6b3e7daf6fb","created":"2026-09-10"},{"name":"CVE-2026-66066 KindaRails2Shell — Exploited Rails Active Storage/libvips RCE","url":"https://otx.alienvault.com/pulse/6a9e53caf9bf37a41a1c54ed","created":"2026-09-07"},{"name":"Active Exploit: Langflow RCE CVE-2026-0768 & Rails CVE-2026-66066 Credential/C2 Activity","url":"https://otx.alienvault.com/pulse/6a97bca155ecdcb7db1515a6","created":"2026-09-02"},{"name":"CVE-2026-66066 Rails Active Storage libvips File Read to RCE","url":"https://otx.alienvault.com/pulse/6a6eddbee03e92e90b0f8fb9","created":"2026-08-02"},{"name":"CVE-2026-66066 KindaRails2Shell: Rails Active Storage/libvips File Read to RCE","url":"https://otx.alienvault.com/pulse/6a6eddbe219477207240e759","created":"2026-08-02"},{"name":"CVE-2026-66066 KindaRails2Shell Active Storage libvips RCE","url":"https://otx.alienvault.com/pulse/6a6eddbb343ee8a4e1805df6","created":"2026-08-02"},{"name":"Rails patches critical Active Storage flaw with RCE potential [BleepingComputer]","url":"https://otx.alienvault.com/pulse/6a6e08ee0ebb58ecad9b6ae2","created":"2026-08-01"},{"name":"Critical Rails Flaw Could Let Unauthenticated Attackers Read Server Files via Image Uploads [The Hacker News]","url":"https://otx.alienvault.com/pulse/6a6d9951e3d2877c430dee11","created":"2026-08-01"}],"provenance":"machine"},"cwes":[{"id":"CWE-1188","name":"Initialization of a Resource with an Insecure Default"}],"references":[{"url":"https://github.com/rails/rails/security/advisories/GHSA-xr9x-r78c-5hrm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/rails/rails/commit/1c01bb587206ee6eb0e1179c2cef96a6a47acb1e","tags":["x_refsource_MISC"]},{"url":"https://github.com/rails/rails/commit/349e7a5d5b4b715af1e416db824f3c078a7d59e5","tags":["x_refsource_MISC"]},{"url":"https://github.com/rails/rails/commit/d79b7f4aa17dec8ce4960fef05733c8c0c7ef49a","tags":["x_refsource_MISC"]},{"url":"https://github.com/rails/rails/releases/tag/v7.2.3.2","tags":["x_refsource_MISC"]},{"url":"https://github.com/rails/rails/releases/tag/v8.0.5.1","tags":["x_refsource_MISC"]},{"url":"https://github.com/rails/rails/releases/tag/v8.1.3.1","tags":["x_refsource_MISC"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activestorage/CVE-2026-66066.yml","tags":["x_refsource_MISC"]},{"url":"https://thehackernews.com/2026/07/critical-rails-flaw-could-let.html","tags":["x_refsource_MISC"]},{"url":"http://www.openwall.com/lists/oss-security/2026/07/29/9","tags":[]},{"url":"https://ethiack.com/info-hub/research/kindarails2shell-rails-rce-cve-2026-66066","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2026/08/01/6","tags":[]},{"url":"https://github.com/rails/rails-forensics-CVE-2026-66066","tags":["exploit"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"RubyGems","package":"activestorage","vulnerableRanges":["<7.2.3.2",">=8.0.0.beta1, <8.0.5.1",">=8.1.0.beta1, <8.1.3.1"],"patched":["7.2.3.2","8.0.5.1","8.1.3.1"],"from":["GHSA-xr9x-r78c-5hrm"],"provenance":"source"}],"advisories":[{"id":"GHSA-xr9x-r78c-5hrm","url":"https://github.com/advisories/GHSA-xr9x-r78c-5hrm","severity":"CRITICAL","ecosystem":"RubyGems","package":"activestorage","vulnerableRanges":["<7.2.3.2"],"patched":["7.2.3.2"],"provenance":"source","from":"GHSA"},{"id":"GHSA-xr9x-r78c-5hrm","url":"https://github.com/advisories/GHSA-xr9x-r78c-5hrm","severity":"CRITICAL","ecosystem":"RubyGems","package":"activestorage","vulnerableRanges":[">=8.0.0.beta1, <8.0.5.1"],"patched":["8.0.5.1"],"provenance":"source","from":"GHSA"},{"id":"GHSA-xr9x-r78c-5hrm","url":"https://github.com/advisories/GHSA-xr9x-r78c-5hrm","severity":"CRITICAL","ecosystem":"RubyGems","package":"activestorage","vulnerableRanges":[">=8.1.0.beta1, <8.1.3.1"],"patched":["8.1.3.1"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2026-51270","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-51270","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":6,"skipped":1,"earliest":"2026-07-29","earliestUrl":"https://github.com/0xBlackash/CVE-2026-66066","repos":[{"name":"rails/rails-forensics-CVE-2026-66066","url":"https://github.com/rails/rails-forensics-CVE-2026-66066","stars":30,"created":"2026-07-30"},{"name":"Zer0SumGam3/CVE-2026-66066-POC","url":"https://github.com/Zer0SumGam3/CVE-2026-66066-POC","stars":23,"created":"2026-07-29"},{"name":"0xsha/KindaRails2Shell","url":"https://github.com/0xsha/KindaRails2Shell","stars":5,"created":"2026-07-31"},{"name":"HackSpeak/CVE-2026-66066","url":"https://github.com/HackSpeak/CVE-2026-66066","stars":4,"created":"2026-08-03"},{"name":"0xBlackash/CVE-2026-66066","url":"https://github.com/0xBlackash/CVE-2026-66066","stars":1,"created":"2026-07-29"}]},"metasploit":[{"name":"Ruby on Rails Active Storage Vips Arbitrary File Read and Remote Code Execution","module":"exploit/multi/http/rails_activestorage_vips_rce","type":"exploit","disclosureDate":"2026-07-29","url":"https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/http/rails_activestorage_vips_rce.rb"}],"first":{"date":"2026-07-29","source":"PoC-in-GitHub","url":"https://github.com/0xBlackash/CVE-2026-66066"},"provenance":"source"},"exploitRefs":["https://github.com/rails/rails-forensics-CVE-2026-66066"],"flow":[],"timeline":[{"date":"2026-07-29","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub; later: Metasploit 2026-07-29","url":"https://github.com/0xBlackash/CVE-2026-66066","provenance":"source"},{"date":"2026-07-30","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2026-66066","provenance":"source"},{"date":"2026-08-31","kind":"exploited-reported","label":"Exploitation first reported (VulnCheck KEV evidence)","url":"https://www.linkedin.com/posts/vulncheck_critical-ruby-on-rails-vulnerability-in-attackers-activity-7501342523660091392-3XzK/","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":78.7,"factors":[{"name":"In a KEV catalog","points":35.0,"detail":"listed in VulnCheck KEV"},{"name":"Recent KEV listing","points":10.0,"detail":"added 67 days ago"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.64,"detail":"percentile 0.9821"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"1 NVD reference tagged Exploit; 6 PoC-in-GitHub repos; 1 Metasploit module"},{"name":"Mentioned in OTX pulses","points":2.36,"detail":"10 pulses"},{"name":"CVSS severity","points":6.65,"detail":"base score 9.5"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}