# CVE-2026-33202: Ruby on Rails Active Storage glob injection in DiskService

Source: https://junglewise.ai/threats/cve-2026-33202-ruby-on-rails-active-storage-glob-injection-in-diskservice  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-03-23. Updated: 2026-05-13  
License: CC BY 4.0 with a link back

CVE-2026-33202 · Severity: medium · CVSS 4 · Published 2026-03-23

Active Storage, a component of the Ruby on Rails framework used for managing file uploads, contains a flaw in how it handles file deletion on local disk storage. If an application uses custom-generated file names or allows user input to influence file keys, an attacker could potentially delete unintended files from the server's storage directory. This could lead to data loss or disruption of service by removing critical application assets.

Technologies: [Ruby on Rails Active Storage](https://junglewise.ai/threats/technologies/active-storage), [activestorage (RubyGems)](https://junglewise.ai/threats/technologies/activestorage). Vendors: [Ruby on Rails](https://junglewise.ai/threats/vendors/ruby-on-rails), [RubyGems](https://junglewise.ai/threats/vendors/rubygems).

## Quick answers

**Is CVE-2026-33202 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-33202 being exploited in the wild.

**How severe is CVE-2026-33202?** Medium severity, with a CVSS score of 4, published 23 March 2026.

**Which products and versions are affected?** Ruby on Rails Active Storage < 7.2.3.1, >= 8.0.0.beta1, < 8.0.4.1, >= 8.1.0.beta1, < 8.1.2.1; activestorage (RubyGems) ECOSYSTEM:introduced=8.1.0.beta1,fixed=8.1.2.1.

**Is there a fix for CVE-2026-33202?** Yes. activestorage (RubyGems): upgrade to 8.1.2.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-33202 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-33202?** Check whether you run Ruby on Rails Active Storage or activestorage (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- activestorage (RubyGems): upgrade to 8.1.2.1 or later

  ```sh
  bundle update activestorage
  ```


## Technical details

A glob injection vulnerability exists in `ActiveStorage::Service::DiskService#delete_prefixed`. The method passes blob keys directly to Ruby's `Dir.glob` without escaping metacharacters (such as `*` or `?`). If an attacker can control or influence the blob keys—either through custom key generation logic or direct input—they can inject glob patterns to match and delete files outside of the intended scope within the storage directory. This is primarily a risk when using the `DiskService` for local file storage. Patches have been released in versions 7.2.3.1, 8.0.4.1, and 8.1.2.1 which implement proper escaping of glob metacharacters.

## Affected products

- Ruby on Rails activestorage < 7.2.3.1, >= 8.0.0.beta1, < 8.0.4.1, >= 8.1.0.beta1, < 8.1.2.1

## Identifiers

- CVE-2026-33202
- GHSA-73f9-jhhh-hr5m

## Timeline

- 2026-03-23: disclosed
- 2026-03-23: patched
- 2026-03-23: advisory

## References

- [https://github.com/rails/rails/security/advisories/GHSA-73f9-jhhh-hr5m](https://github.com/rails/rails/security/advisories/GHSA-73f9-jhhh-hr5m)
- [https://github.com/rails/rails/commit/8c9676b803820110548cdb7523800db43bc6874c](https://github.com/rails/rails/commit/8c9676b803820110548cdb7523800db43bc6874c)
- [https://github.com/rails/rails/commit/955284d26e469a9c026a4eee5b21f0414ab0bccf](https://github.com/rails/rails/commit/955284d26e469a9c026a4eee5b21f0414ab0bccf)
- [https://github.com/rails/rails/commit/fa19073546360856e9f4dab221fc2c5d73a45e82](https://github.com/rails/rails/commit/fa19073546360856e9f4dab221fc2c5d73a45e82)
- [https://github.com/rails/rails/releases/tag/v7.2.3.1](https://github.com/rails/rails/releases/tag/v7.2.3.1)
- [https://github.com/rails/rails/releases/tag/v8.0.4.1](https://github.com/rails/rails/releases/tag/v8.0.4.1)

## Related threats

- [Active Storage: Possible local file disclosure in video previews and analysis](https://junglewise.ai/threats/cve-2026-126188-active-storage-makes-it-simple-to-upload-and-reference-files-in)
- [Ruby on Rails Active Storage arbitrary file read and RCE in media processing](https://junglewise.ai/threats/cve-2026-126186-active-storage-possible-arbitrary-file-read-and-remote-code)
- [Ruby on Rails Active Storage content length bypass in Google Cloud Storage uploads](https://junglewise.ai/threats/cve-2026-126085-active-storage-possible-circumvention-of-file-size-limits-in)
- [Ruby on Rails Active Storage GCS signature bypass](https://junglewise.ai/threats/cve-2026-126084-active-storage-makes-it-simple-to-upload-and-reference-files-in)
- [Rails Active Storage persistent DoS via NUL byte filename](https://junglewise.ai/threats/cve-2026-126074-active-storage-makes-it-simple-to-upload-and-reference-files-in)
