GHSA-w6rc-q387-vpgq CVE-2013-4136
insecure temporary directory usage in passenger
- Severity
- Medium
- The publisher's own rating, not a CVSS score
- Exploit chance (EPSS)
- 0.33%
- Chance of exploitation in the next 30 days. Higher than 25.76% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-59 Improper Link Resolution Before File Access ('Link Following')
- Fix
4.0.6- Upgrade passenger to this version or later
Description
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/.
Affected versions
RubyGems
| Package | Vulnerable | Fixed in |
|---|---|---|
| passenger | < 4.0.6 |
4.0.6 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
passenger RubyGems → 4.0.6
- bundler
bundle update passenger # Gemfile: gem "passenger", ">= 4.0.6"
Weakness
CWE-59: Improper Link Resolution Before File Access ('Link Following')
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.
How to prevent it
- Architecture and Design: Follow the principle of least privilege when assigning access rights to entities in a software system. Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.
References
Advisories
Packages
Other links
- github.com/phusion/passenger/commit/5483b3292cc2af1c83033eaaadec20dba4dcfd9b
- code.google.com/p/phusion-passenger/issues/detail
- github.com/phusion/passenger/blob/release-4.0.6/NEWS
- github.com/rubysec/ruby-advisory-db/blob/master/gems/passenger/CVE-2013-4136.yml
- rhn.redhat.com/errata/RHSA-2013-1136.html
- openwall.com/lists/oss-security/2013/07/16/6
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-2cj2-qqxj-5m3r Phusion Passenger denial of service | High | Also affects passenger |
| GHSA-jjcj-fgfm-9g9r Phusion Passenger Race Condition Allows Privilege Escalation | High | Also affects passenger |
| GHSA-7cv3-gvmc-8mq5 Phusion Passenger SpawningKit Contains Arbitrary Read/Write Vulnerability | Critical | Also affects passenger |
| GHSA-4284-jfhc-f854 Phusion Passenger incorrect permission assignment | Medium | Also affects passenger |
| GHSA-whfx-877c-5p28 Insecure Permissions in Phusion Passenger | High | Also affects passenger |
| GHSA-jjhj-8gx7-x836 Incorrect Access Control in Phusion Passenger | High | Also affects passenger |
| GHSA-cv3f-px9r-54hm Phusion Passenger information disclosure | Medium | Also affects passenger |
| GHSA-8mw8-j583-vqfg RubyGems passenger gem allows remote attackers to delete files | High | Also affects passenger |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor