GHSA-pmwx-rm49-xv39: ActiveRecord Path Traversal Vulnerability
LOWGHSA-pmwx-rm49-xv39 is a LOW path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting ActiveRecord libraries in the RubyGems ecosystem. The issue involves :tenanted::storage::diskservice#path_for has a possible path traversal. Remediation is available by upgrading affected packages to version 0.7.0.
GHSA-pmwx-rm49-xv39 at a Glance
How to Fix GHSA-pmwx-rm49-xv39
To remediate this vulnerability, upgrade all affected ActiveRecord dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade activerecord-tenanted to 0.7.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for activerecord-tenanted
How to Check if You Are Affected
To determine whether your application is affected by GHSA-pmwx-rm49-xv39, inspect your project dependencies for ActiveRecord:
inspect dependencies for activerecord-tenanted
Analyze the terminal output to locate any version of ActiveRecord in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.7.0), 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 ActiveRecord, 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
GHSA-pmwx-rm49-xv39 Affected ActiveRecord Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
activerecord-tenanted
|
RubyGems |
< 0.7.0
|
0.7.0
|
References
Frequently Asked Questions
What is GHSA-pmwx-rm49-xv39?
Which ActiveRecord versions are affected?
What version fixes GHSA-pmwx-rm49-xv39?
Is activerecord-tenanted affected?
What CWE is associated with GHSA-pmwx-rm49-xv39?
How can I check RubyGems dependencies for GHSA-pmwx-rm49-xv39?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pmwx-rm49-xv39",
"modified" : "2026-07-29T17:06:00Z",
"published" : "2026-07-29T17:06:00Z",
"aliases" : [ ],
"summary" : "ActiveRecord::Tenanted::Storage::DiskService#path_for has a possible path traversal",
"details" : "### Summary\n\nActive Record Tenanted's override of 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.\n\n### Mitigation\n\nUpgrade to Active Record Tenanted v0.7.0 or later.\n\nAs a workaround, do not use untrusted user input as blob keys. Blob keys are expected to be trusted strings.\n\n### Credit\n\nThis issue was responsibly reported by @tonghuaroot.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "activerecord-tenanted"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/basecamp/activerecord-tenanted/security/advisories/GHSA-pmwx-rm49-xv39"
}, {
"type" : "WEB",
"url" : "https://github.com/rails/rails/security/advisories/GHSA-9xrj-h377-fr87"
}, {
"type" : "WEB",
"url" : "https://github.com/basecamp/activerecord-tenanted/pull/307"
}, {
"type" : "WEB",
"url" : "https://github.com/basecamp/activerecord-tenanted/commit/b242c8ad9bf58bbd7f5a032d153b0f29db54b9ba"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/basecamp/activerecord-tenanted"
}, {
"type" : "WEB",
"url" : "https://github.com/basecamp/activerecord-tenanted/releases/tag/v0.7.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-07-29T17:06:00Z",
"nvd_published_at" : null
}
}