CVE-2026-33202: Rails Active Storage DiskService Glob Injection Vulnerability
Summary
CVE-2026-33202: Rails Active Storage has possible glob injection in its DiskService. Affects activestorage across 3 version ranges.
< 7.2.3.1
>= 8.0.0.beta1, < 8.0.4.1
>= 8.1.0.beta1, < 8.1.2.1
Fixed in 7.2.3.1, 8.0.4.1 or 8.1.2.1, depending on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Active Storage is a component of the Ruby on Rails framework that facilitates file uploads and storage. It allows developers to manage file attachments in their applications seamlessly. The DiskService is responsible for handling file storage on the local filesystem. However, a vulnerability has been identified in this service that can lead to unintended file deletions due to improper handling of user input.
Vulnerability Detail
The vulnerability arises from the DiskService#delete_prefixed method, which directly passes blob keys to the Dir.glob function without escaping glob metacharacters. This oversight allows an attacker to craft blob keys containing special characters that can manipulate the glob pattern, potentially leading to the deletion of unintended files from the storage directory. The implications of this vulnerability are significant, as it could result in data loss and disruption of service.
How To Fix
Latest published version: 8.1.4 as of 22 Oct 2026
gem install activestorage -v 8.1.4
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
< 7.2.3.17.2.3.1gem install activestorage -v 7.2.3.1 -
>= 8.0.0.beta1, < 8.0.4.18.0.4.1gem install activestorage -v 8.0.4.1 -
>= 8.1.0.beta1, < 8.1.2.18.1.2.1gem install activestorage -v 8.1.2.1
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
As a temporary workaround, avoid using blob keys that contain glob metacharacters. Validate and sanitize user input to prevent the inclusion of such characters in blob keys.
Conclusion
The CVE-2026-33202 vulnerability in Rails Active Storage's DiskService poses a risk of unintended file deletions due to glob injection. It is crucial to update to the patched versions of the package to mitigate this risk. Implementing input validation can serve as a temporary workaround while updates are being planned.
See every vulnerability recorded for activestorage →
FAQ
The vulnerability allows for glob injection, which can lead to unintended file deletions.
Versions 8.1.0.beta1, 8.0.0.beta1, and 7.2.3 are affected by this vulnerability.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability.
The CVSS score of this vulnerability is 6.6, indicating a moderate severity.
If immediate updates are not possible, implement input validation to prevent the use of glob metacharacters in blob keys.
References
Related vulnerabilities
Recent vulnerabilities recorded for activestorage.