CVE-2013-0262: Rack Path Traversal Vulnerability
MODERATECVE-2013-0262 is a MODERATE path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Rack libraries in the RubyGems ecosystem. The issue involves rack vulnerable to path traversal. Remediation is available by upgrading affected packages to version 1.5.2, 1.4.5.
CVE-2013-0262 at a Glance
How to Fix CVE-2013-0262
To remediate this vulnerability, upgrade all affected Rack 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 rack to 1.5.2
Upgrade rack to 1.4.5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rack
How to Check if You Are Affected
To determine whether your application is affected by CVE-2013-0262, inspect your project dependencies for Rack:
inspect dependencies for rack
Analyze the terminal output to locate any version of Rack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.2), 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 Rack, 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
CVE-2013-0262 Affected Rack Versions
2 component(s)References
Frequently Asked Questions
What is CVE-2013-0262?
Which Rack versions are affected?
What version fixes CVE-2013-0262?
Is rack affected?
What CWE is associated with CVE-2013-0262?
How can I check RubyGems dependencies for CVE-2013-0262?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-85r7-w5mv-c849",
"modified" : "2023-08-25T23:30:15Z",
"published" : "2017-10-24T18:33:37Z",
"aliases" : [ "CVE-2013-0262" ],
"summary" : "Rack Vulnerable to Path Traversal",
"details" : "`rack/file.rb` (`Rack::File`) in Rack 1.5.x before 1.5.2 and 1.4.x before 1.4.5 allows attackers to access arbitrary files outside the intended root directory via a crafted `PATH_INFO` environment variable, probably a directory traversal vulnerability that is remotely exploitable, aka \"symlink path traversals.\"",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.5.0"
}, {
"fixed" : "1.5.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "RubyGems",
"name" : "rack"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.4.0"
}, {
"fixed" : "1.4.5"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-0262"
}, {
"type" : "WEB",
"url" : "https://github.com/rack/rack/commit/6f237e4c9fab649d3750482514f0fde76c56ab30"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=909071"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=909072"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/rentzsch/4736940"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rack/rack"
}, {
"type" : "WEB",
"url" : "https://github.com/rack/rack/blob/master/lib/rack/file.rb#L56"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/rack/CVE-2013-0262.yml"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#!msg/rack-devel/bf937jPZxJM/1s6x95vIhmAJ"
}, {
"type" : "WEB",
"url" : "https://groups.google.com/forum/#!msg/rack-devel/mZsuRonD7G8/DpZIOmMLbOgJ"
}, {
"type" : "WEB",
"url" : "http://lists.opensuse.org/opensuse-updates/2013-03/msg00048.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T21:24:29Z",
"nvd_published_at" : "2013-02-08T20:55:00Z"
}
}