CVE-2013-4116: Npm Local Privilege Escalation Vulnerability
LOWCVE-2013-4116 is a LOW local privilege escalation vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Npm libraries in the npm ecosystem. The issue involves local privilege escalation in npm. Remediation is available by upgrading affected packages to version 1.3.3.
CVE-2013-4116 at a Glance
How to Fix CVE-2013-4116
To remediate this vulnerability, upgrade all affected Npm dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install npm@1.3.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls npm
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2013-4116, inspect your project dependencies using npm:
npm ls npm
Analyze the terminal output to locate any version of Npm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.3), your application is affected.
Note: The npm ls npm command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
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 Npm, 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-4116 Affected Npm Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
npm
|
npm |
< 1.3.3
|
1.3.3
|
References
Frequently Asked Questions
What is CVE-2013-4116?
Which Npm versions are affected?
What version fixes CVE-2013-4116?
Is npm affected?
What CWE is associated with CVE-2013-4116?
How can I check npm dependencies for CVE-2013-4116?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-v3jv-wrf4-5845",
"modified" : "2021-09-23T21:38:18Z",
"published" : "2020-09-01T16:03:34Z",
"aliases" : [ "CVE-2013-4116" ],
"summary" : "Local Privilege Escalation in npm",
"details" : "Affected versions of `npm` use predictable temporary file names during archive unpacking. If an attacker can create a symbolic link at the location of one of these temporary file names, the attacker can arbitrarily write to any file that the user which owns the `npm` process has permission to write to, potentially resulting in local privilege escalation.\n\n\n\n## Recommendation\n\nUpdate to version 1.3.3 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "npm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.3.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-4116"
}, {
"type" : "WEB",
"url" : "https://github.com/npm/npm/issues/3635"
}, {
"type" : "WEB",
"url" : "https://github.com/npm/npm/commit/f4d31693"
}, {
"type" : "WEB",
"url" : "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=715325"
}, {
"type" : "WEB",
"url" : "https://bugzilla.redhat.com/show_bug.cgi?id=983917"
}, {
"type" : "WEB",
"url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/87141"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/npm/npm"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/152"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2013/07/10/17"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2013/07/11/9"
}, {
"type" : "WEB",
"url" : "http://www.securityfocus.com/bid/61083"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-59" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2020-08-31T18:12:39Z",
"nvd_published_at" : null
}
}