---
id: "GHSA-3f4q-8x5m-76v8"
page: "https://infrastack.ai/live/GHSA-3f4q-8x5m-76v8"
kind: "vulnerability"
aliases: ["GHSA-3f4q-8x5m-76v8"]
title: "Possible local file disclosure in Active Storage video previews and analysis"
severity: "low"
cvss: 3.7
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.5.2", "ecosystem": "rubygems"}]
ecosystems: ["rubygems"]
tags: ["activestorage", "cwe-200", "package", "rails", "ruby", "self-hosted"]
not_affected_if: ["no-video-processing", "trusted-uploads-only"]
published_at: "2026-11-04T03:01:58+00:00"
first_seen_at: "2026-11-09T22:53:29+00:00"
updated_at: "2026-11-09T22:57:17+00:00"
sources: [{"source": "ghsa-repo", "url": "https://github.com/rails/rails/security/advisories/GHSA-3f4q-8x5m-76v8", "first_seen_at": "2026-11-09T22:53:29+00:00"}]
exploit_sources: []
---

# Possible local file disclosure in Active Storage video previews and analysis

Link for people: https://infrastack.ai/live/GHSA-3f4q-8x5m-76v8 (this .md is for agents)

Active Storage runs FFmpeg on uploaded video and audio without limiting the input format, so a crafted HLS playlist uploaded under a video or audio type can make FFmpeg read local media files. An attacker who knows a file path readable by the app can get that file's content back through a preview image or stored metadata.

_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.5.2 fixed 8.0.5.2

## How to check

- Check the activestorage gem version in `Gemfile.lock` (look for `activestorage (`).
- Check whether `ActiveStorage::Previewer::VideoPreviewer`, `ActiveStorage::Analyzer::VideoAnalyzer` or `ActiveStorage::Analyzer::AudioAnalyzer` appear in `config.active_storage.previewers` or `config.active_storage.analyzers`.

## Fix

- activestorage 8.1 series: move to `8.1.4.1`
- activestorage 8.0 series: move to `8.0.5.2`
- Patches for teams that cannot upgrade now are linked in the advisory for 8.1 and 8.0.

## Timeline

- 2026-11-09T22:53:29+00:00 ghsa-repo https://github.com/rails/rails/security/advisories/GHSA-3f4q-8x5m-76v8

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/rails/rails/security/advisories/GHSA-3f4q-8x5m-76v8

## From the sources

### Impact
Active Storage's `VideoPreviewer`, `VideoAnalyzer` and `AudioAnalyzer` run `ffmpeg` and `ffprobe` on a blob's contents without restricting the input format, so FFmpeg selects a demuxer by probing the file. A blob created through a direct upload keeps the content type the client declared, so a client can store an HLS playlist under a `video/*` or `audio/*` type. When that blob is previewed or analyzed, the `hls` demuxer opens the `file://` segments that the playlist names, and the preview image or the stored metadata could disclose a local media file that the application process can read and whose path the attacker knows.

Applications that accept uploads from untrusted users and generate video previews, or analyze video or audio attachments with FFmpeg, are affected.

### Details
The fixed releases limit the formats FFmpeg may open to common audio and video containers, configured by the new `config.active_storage.ffmpeg_allowed_formats` setting. Files in other formats no longer preview or receive media metadata; the Active Storage CHANGELOG names some of them and shows how to add a format to the list.

### Workarounds
Applications that cannot upgrade can stop Active Storage from running FFmpeg on uploaded files by removing `ActiveStorage::Previewer::VideoPreviewer` from `config.active_storage.previewers`, and `ActiveStorage::Analyzer::VideoAnalyzer` and `ActiveStorage::Analyzer::AudioAnalyzer` from `config.active_storage.analyzers`.

### 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/3b1f2627538dc597cd973530c08514a26c2b0282.patch
- 8.0: https://github.com/rails/rails/commit/69aff80d115bbb9d1e82fd6c6f2fd3ddeafb958b.patch

### Credit
This issue was responsibly reported by HackerOne researcher [w3rmut](https://hackerone.com/w3rmut).

---

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