CVE-2013-4136: Passenger Insecure Temporary Directory Usage Vulnerability
MODERATECVE-2013-4136 is a MODERATE insecure temporary directory usage vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Passenger libraries in the RubyGems ecosystem. The issue involves insecure temporary directory usage in passenger. Remediation is available by upgrading affected packages to version 4.0.6.
CVE-2013-4136 at a Glance
How to Fix CVE-2013-4136
To remediate this vulnerability, upgrade all affected Passenger 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 passenger to 4.0.6
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for passenger
How to Check if You Are Affected
To determine whether your application is affected by CVE-2013-4136, inspect your project dependencies for Passenger:
inspect dependencies for passenger
Analyze the terminal output to locate any version of Passenger in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.0.6), 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-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Passenger, 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-4136 Affected Passenger Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
passenger
|
RubyGems |
< 4.0.6
|
4.0.6
|
References
Frequently Asked Questions
What is CVE-2013-4136?
Which Passenger versions are affected?
What version fixes CVE-2013-4136?
Is passenger affected?
What CWE is associated with CVE-2013-4136?
How can I check RubyGems dependencies for CVE-2013-4136?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w6rc-q387-vpgq",
"modified" : "2023-06-09T20:17:24Z",
"published" : "2017-10-24T18:33:37Z",
"aliases" : [ "CVE-2013-4136" ],
"summary" : "insecure temporary directory usage in passenger",
"details" : "ext/common/ServerInstanceDir.h in Phusion Passenger gem before 4.0.6 for Ruby allows local users to gain privileges or possibly change the ownership of arbitrary directories via a symlink attack on a directory with a predictable name in /tmp/.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "passenger"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.0.6"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-4136"
}, {
"type" : "WEB",
"url" : "https://github.com/phusion/passenger/commit/5483b3292cc2af1c83033eaaadec20dba4dcfd9b"
}, {
"type" : "WEB",
"url" : "https://code.google.com/p/phusion-passenger/issues/detail?id=910"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-w6rc-q387-vpgq"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/phusion/passenger"
}, {
"type" : "WEB",
"url" : "https://github.com/phusion/passenger/blob/release-4.0.6/NEWS"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/passenger/CVE-2013-4136.yml"
}, {
"type" : "WEB",
"url" : "http://rhn.redhat.com/errata/RHSA-2013-1136.html"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2013/07/16/6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-59" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T20:49:27Z",
"nvd_published_at" : null
}
}