Reliance on File Name or Extension of Externally-Supplied File Affecting activestorage package, versions <8.0.5.2>=8.1.0.beta1, <8.1.4.1


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.51% (46th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUBY-ACTIVESTORAGE-22840004
  • published24 Nov 2026
  • disclosed10 Nov 2026
  • creditPirikara

Introduced: 10 Nov 2026

NewCVE-2026-126186  (opens in a new tab)
CWE-646  (opens in a new tab)

How to fix?

Upgrade activestorage to version 8.0.5.2, 8.1.4.1 or higher.

Overview

Affected versions of this package are vulnerable to Reliance on File Name or Extension of Externally-Supplied File via the open method in ActiveStorage::Blob. An attacker can upload a file with a decoder-triggering extension such as .avs but declare a different content type; when Active Storage analyzes or previews it, FFmpeg or ImageMagick can select a decoder based on that extension, letting the attacker read files accessible to the application and expose their contents through a preview, or load an uploaded native library to execute code. This requires the application to accept untrusted uploads and process them; the AviSynth attack also requires FFmpeg built with AviSynth support.

Notes

  • Reachability gate: Active Storage must analyze video or audio (these analyzers run on attach by default), generate video previews, or process images with the :mini_magick variant processor; deployments that use none of these paths are not affected.
  • The AviSynth attack also requires the AviSynthPlus runtime on the host, in addition to FFmpeg being built with --enable-avisynth.

Workarounds

  • Remove ActiveStorage::Previewer::VideoPreviewer from config.active_storage.previewers, and remove ActiveStorage::Analyzer::VideoAnalyzer and ActiveStorage::Analyzer::AudioAnalyzer from config.active_storage.analyzers. This stops Active Storage from running FFmpeg on uploaded files.
  • Use an FFmpeg build without AviSynth support to block the AviSynth attack. This does not address extension-selected decoders in ImageMagick.

CVSS Base Scores

version 4.0
version 3.1