CVE-2026-33195: Activestorage Path Traversal Vulnerability

HIGH
Advisory Identifier: GHSA-9xrj-h377-fr87
CWE-22
Published
Advisory Summary

CVE-2026-33195 is a HIGH path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Activestorage libraries in the RubyGems ecosystem. The issue involves rails active storage has possible path traversal in diskservice. Remediation is available by upgrading affected packages to version 8.1.2.1, 8.0.4.1, 7.2.3.1.

CVE-2026-33195 at a Glance

CVE Identifier CVE-2026-33195
GHSA Identifier GHSA-9xrj-h377-fr87
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product Activestorage
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2026-33195

To remediate this vulnerability, upgrade all affected Activestorage dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

activestorage fixed: 8.1.2.1
Upgrade activestorage to 8.1.2.1
activestorage fixed: 8.0.4.1
Upgrade activestorage to 8.0.4.1
activestorage fixed: 7.2.3.1
Upgrade activestorage to 7.2.3.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for activestorage

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-33195, inspect your project dependencies for Activestorage:

inspect dependencies for activestorage

Analyze the terminal output to locate any version of Activestorage in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 8.1.2.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In Activestorage, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Active Storage's `DiskService#path_for` does not validate that the resolved filesystem path remains within the storage root directory. If a blob key containing path traversal sequences (e.g. `../`) is used, it could allow reading, writing, or deleting arbitrary files on the server. Blob keys are expected to be trusted strings, but some applications could be passing user input as keys and would be affected. ### Releases The fixed releases are available at the normal locations. ### Credit This issue was responsibly reported by Hackerone researcher [ksw9722](https://hackerone.com/ksw9722).

CVE-2026-33195 Affected Activestorage Versions

3 component(s)
Fixed Versions:
8.1.2.18.0.4.17.2.3.1
Product / Package Ecosystem Affected Versions Fixed Version
activestorage
RubyGems
≥ 8.1.0.beta1
< 8.1.2.1
8.1.2.1
activestorage
RubyGems
≥ 8.0.0.beta1
< 8.0.4.1
8.0.4.1
activestorage
RubyGems
< 7.2.3.1
7.2.3.1

References

Frequently Asked Questions

What is CVE-2026-33195?
CVE-2026-33195 is a security vulnerability in Activestorage involving Rails Active Storage has possible Path Traversal in DiskService under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which Activestorage versions are affected?
Affected versions include releases prior to 8.1.2.1, 8.0.4.1, 7.2.3.1 across affected packages: activestorage.
What version fixes CVE-2026-33195?
Upgrading to 8.1.2.1, 8.0.4.1, 7.2.3.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is activestorage affected?
Yes, activestorage is affected in releases prior to 8.1.2.1, 8.0.4.1, 7.2.3.1. Upgrade your dependency to 8.1.2.1, 8.0.4.1, 7.2.3.1 or later.
What CWE is associated with CVE-2026-33195?
CVE-2026-33195 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check RubyGems dependencies for CVE-2026-33195?
Run the dependency tree command: 'inspect dependencies for activestorage'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9xrj-h377-fr87",
  "modified" : "2026-05-13T16:16:55Z",
  "published" : "2026-03-23T21:17:19Z",
  "aliases" : [ "CVE-2026-33195" ],
  "summary" : "Rails Active Storage has possible Path Traversal in DiskService",
  "details" : "### Impact\nActive Storage's `DiskService#path_for` does not validate that the resolved filesystem path remains within the storage root directory. If a blob key containing path traversal sequences (e.g. `../`) is used, it could allow reading, writing, or deleting arbitrary files on the server. Blob keys are expected to be trusted strings, but some applications could be passing user input as keys and would be affected.\n\n### Releases\nThe fixed releases are available at the normal locations.\n\n### Credit\nThis issue was responsibly reported by Hackerone researcher [ksw9722](https://hackerone.com/ksw9722).",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "activestorage"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.1.0.beta1"
      }, {
        "fixed" : "8.1.2.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "activestorage"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.0.0.beta1"
      }, {
        "fixed" : "8.0.4.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "activestorage"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "7.2.3.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/security/advisories/GHSA-9xrj-h377-fr87"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33195"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/commit/4933c1e3b8c1bb04925d60347be9f69270392f2c"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/commit/9b06fbc0f504b8afe333f33d19548f3b85fbe655"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/commit/a290c8a1ec189d793aa6d7f2570b6a763f675348"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rails/rails"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/releases/tag/v7.2.3.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/releases/tag/v8.0.4.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rails/rails/releases/tag/v8.1.2.1"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activestorage/CVE-2026-33195.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-23T21:17:19Z",
    "nvd_published_at" : "2026-03-24T00:16:28Z"
  }
}