---
id: "CVE-2026-66066"
kind: "vulnerability"
aliases: ["CVE-2026-66066"]
title: "Rails: Active Storage image variants let unauthenticated requests read files, run code"
severity: "critical"
cvss: 9.5
epss: 0.27861
exploited: false
status: "open"
category: "runtime"
products: []
ecosystems: []
tags: ["activestorage", "cloudflare", "lab-disclosure", "rails", "ruby", "runtime", "self-hosted"]
not_affected_if: ["no-active-storage-variants"]
published_at: "2026-07-30T19:18:35+00:00"
first_seen_at: "2026-10-24T18:43:45+00:00"
updated_at: "2026-10-25T12:38:49+00:00"
sources: [{"source": "lab", "url": "https://developers.cloudflare.com/changelog/post/2026-08-04-waf-release/", "first_seen_at": "2026-10-24T18:43:45+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-66066", "first_seen_at": "2026-10-24T18:53:56+00:00"}, {"source": "epss", "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-66066", "first_seen_at": "2026-10-25T12:38:49+00:00"}]
---

# Rails: Active Storage image variants let unauthenticated requests read files, run code

Ruby on Rails Active Storage mishandles input in image variant transformations, so a crafted request can be processed unsafely. According to Cloudflare, an unauthenticated attacker can read arbitrary files and achieve remote code execution.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the Rails version in `Gemfile.lock` for the `actionpack` and `activestorage` gems; the sources do not name the fixed versions, so compare against the vendor advisory.
- Check whether the app uses Active Storage image variants (`variant` or `variant_with` calls, or `config.active_storage` settings).

## Fix

- Upgrade Rails and Active Storage to a patched release: unknown, the sources do not give the version.
- Cloudflare customers: the managed rule 'Rails - Arbitrary File Read & RCE - CVE:CVE-2026-66066' is set to Block as of 2026-08-04, which reduces exposure but is not a code fix.

## Timeline

- 2026-10-24T18:43:45+00:00 lab https://developers.cloudflare.com/changelog/post/2026-08-04-waf-release/ — Cloudflare: WAF Release - 2026-08-04 · Changelog
- 2026-10-24T18:53:56+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-66066
- 2026-10-25T12:38:49+00:00 epss https://api.first.org/data/v1/epss?cve=CVE-2026-66066

## Documents

- [advisory] Cloudflare: WAF Release - 2026-08-04 · Changelog https://developers.cloudflare.com/changelog/post/2026-08-04-waf-release/

## From the sources

WAF Release - 2026-08-04 · Changelog

# Changelog

New updates and improvements at Cloudflare.

August 4, 2026

## WAF Release - 2026-08-04

This release introduces new rules and updates Microsoft SharePoint RCE alongside enhanced SSRF cloud protection rule actions.

Key Findings

- CVE-2026-50522: An insecure deserialization vulnerability in Microsoft SharePoint Server. This may allow an unauthenticated attacker to execute arbitrary code using crafted requests.
- CVE-2026-66066: An improper input processing vulnerability in Ruby on Rails Active Storage image variant transformations. This may allow an unauthenticated attacker to perform arbitrary file reads and achieve Remote Code Execution (RCE) using maliciously crafted payload requests.
- Generic Cloud Protections: Added improved detection logic targeting Server-Side Request Forgery (SSRF) in cloud-hosted applications.

| Ruleset | Rule ID | Legacy Rule ID | Description | Previous Action | New Action | Comments |
| --- | --- | --- | --- | --- | --- | --- |
| Cloudflare Managed Ruleset | ...052b07cf | N/A | Microsoft SharePoint - Remote Code Execution - CVE:CVE-2026-50522 | Log | Block | This is a new detection. |
| Cloudflare Managed Ruleset | ...3a5b40d6 | N/A | Rails - Arbitrary File Read & RCE - CVE:CVE-2026-66066 | Block | Block | This was labeled as File Upload - RCE. |
| Cloudflare Managed Ruleset | ...743a63ec | N/A | SSRF - Local - 2 - Beta | Disabled | - | This detection has been removed. |
| Cloudflare Managed Ruleset | ...c2e84e2d | N/A | SSRF - Cloud - Beta | Disabled | - | This detection has been removed. |
| Cloudflare Managed Ruleset | ...ab8af26f | N/A | SSRF - Cloud - 2 - Beta | Disabled | - | This detection has been removed. |
| Cloudflare Managed Ruleset | ...25ba9d7c | N/A | SSRF - Cloud | Disabled | Block | We are changing the action for this rule from Disabled to BLOCK |
| Cloudflare Managed Ruleset | ...01a076eb | N/A | SSRF - Local - Beta | Disabled | - | This detection has been removed. |

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
