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

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, activestorage (RubyGems). Vendors: Ruby on Rails, 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.