---
id: "GHSA-4v2w-w6g6-f8f8"
page: "https://infrastack.ai/live/GHSA-4v2w-w6g6-f8f8"
kind: "vulnerability"
aliases: ["GHSA-4v2w-w6g6-f8f8"]
title: "Possible DoS vulnerability in Active Storage proxy mode via storage errors during streaming"
severity: "medium"
cvss: 5.3
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "activestorage", "fixed": ["8.1.4.1"], "affected": ">= 8.1, < 8.1.4.1", "ecosystem": "rubygems"}, {"name": "activestorage", "fixed": ["8.0.5.2"], "affected": ">= 8.0, < 8.0.5.2", "ecosystem": "rubygems"}]
ecosystems: ["rubygems"]
tags: ["activestorage", "cwe-772", "google-cloud-storage", "package", "rails", "ruby", "s3"]
not_affected_if: ["no-proxy-routes", "non-streaming-storage"]
published_at: "2026-11-04T03:02:00+00:00"
first_seen_at: "2026-11-09T22:53:29+00:00"
updated_at: "2026-11-09T22:56:30+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/rails/rails/security/advisories/GHSA-4v2w-w6g6-f8f8", "first_seen_at": "2026-11-09T22:53:29+00:00"}]
exploit_sources: []
---

# Possible DoS vulnerability in Active Storage proxy mode via storage errors during streaming

Link for people: https://infrastack.ai/live/GHSA-4v2w-w6g6-f8f8 (this .md is for agents)

When Active Storage streams a file through its proxy routes and the storage service fails after the response has started, the server thread blocks until restart. Repeated failed downloads can exhaust server threads and cause a denial of service.

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

## Affected

- rubygems:activestorage affected >= 8.1, < 8.1.4.1 fixed 8.1.4.1
- rubygems:activestorage affected >= 8.0, < 8.0.5.2 fixed 8.0.5.2

## How to check

- Check the Rails version in the Gemfile.lock for `activestorage`
- Confirm the app stores files on S3, an S3-compatible service or Google Cloud Storage
- Confirm the app draws Active Storage's default routes

## Fix

- activestorage `8.1.4.1` for the 8.1 line
- activestorage `8.0.5.2` for the 8.0 line
- Patches for those who cannot upgrade at once are linked in the advisory (commits 3c67a693 for 8.1 and 655b4442 for 8.0)

## Timeline

- 2026-11-09T22:53:29+00:00 ghsa-repo https://github.com/rails/rails/security/advisories/GHSA-4v2w-w6g6-f8f8

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/rails/rails/security/advisories/GHSA-4v2w-w6g6-f8f8

## From the sources

### Impact
When Active Storage serves a file through its proxy controllers, `ActiveStorage::Streaming#send_blob_stream` handles an error from the storage service by calling `head` to send a 404 or 500 response. If the error occurs after the first chunk has been written, the response is already committed, and `head` replaces the response body while the server is still reading the original `ActionController::Live` buffer. That buffer is never closed, so the server thread handling the request blocks until the process restarts. Repeated failed downloads could exhaust the server's threads, possibly resulting in a DoS vulnerability.

Applications are affected when they store files on a service that streams a download in several requests, such as Amazon S3, an S3-compatible service or Google Cloud Storage, and draw Active Storage's default routes. The proxy routes are drawn whether or not proxy mode is the default for the application. A file deleted while it is being served, or any other storage error partway through a download, triggers the condition.

### Details
A storage error raised before the response is committed still produces a 404 or 500 response. After the fix, a storage error raised after the response is committed is re-raised instead, so the server closes the streamed response and releases the thread; the client receives a truncated body, and the exception reaches the application's error reporting.

### Releases
The fixed releases are available at the normal locations.

Patches for those who cannot upgrade at once:
- 8.1: https://github.com/rails/rails/commit/3c67a693fb21870ecb1222e3da59d5c491a62009.patch
- 8.0: https://github.com/rails/rails/commit/655b4442de136a3701334607f634d698bf9d5b82.patch

### Credit
This issue was found by the Anthropic OSS Scanner (ANT-2026-FMPUMYTB).

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
