Remote Code Execution Risk in Active Storage for Rails by Ruby on Rails
CVE-2026-126186
What is CVE-2026-126186?
Active Storage in Ruby on Rails allows file uploads and their integration into Active Record objects. In earlier versions (before 8.1.4.1 and 8.0.5.2), it improperly handles file uploads by using the uploaded file's extension to determine the decoder, without adequately validating the content type. This behavior can lead to situations where an attacker chooses the filename and content type of an upload. If that file has an .avs extension and the FFmpeg is compiled with AviSynth support, it can execute an AviSynth script, potentially disclosing sensitive files or allowing for remote code execution within the FFmpeg process. The vulnerability affects applications that allow untrusted users to upload and analyze video, audio, or image files. As a mitigation, ensure that the latest versions are installed.
Affected Version(s)
rails >= 8.1, < 8.1.4.1 < 8.1, 8.1.4.1
rails < 8.0.5.2 < 8.0.5.2
