CVE-2018-16493: Static resource server Path Traversal Vulnerability
HIGHCVE-2018-16493 is a HIGH path traversal vulnerability (CWE-548: Exposure of Information Through Directory Listing) affecting Static resource server libraries in the npm ecosystem. The issue involves path traversal in simplehttpserver. Remediation is available in the latest vendor maintenance releases.
CVE-2018-16493 at a Glance
How to Fix CVE-2018-16493
To remediate this vulnerability, upgrade all affected Static resource server 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 static-resource-server@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls static-resource-server
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2018-16493, inspect your project dependencies using npm:
npm ls static-resource-server
Analyze the terminal output to locate any version of Static resource server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls static-resource-server 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-548: Exposure of Information Through Directory Listing, where the product inappropriately exposes a directory listing with an index of all the resources located inside of the directory. In Static resource server, 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-2018-16493 Affected Static resource server Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
static-resource-server
|
npm |
≤ 1.7.2
|
|
References
Frequently Asked Questions
What is CVE-2018-16493?
Which Static resource server versions are affected?
What version fixes CVE-2018-16493?
Is static-resource-server affected?
What CWE is associated with CVE-2018-16493?
How can I check npm dependencies for CVE-2018-16493?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-45j8-pm75-5v8x",
"modified" : "2020-08-31T18:42:22Z",
"published" : "2019-02-07T18:18:04Z",
"aliases" : [ "CVE-2018-16493" ],
"summary" : "Path Traversal in simplehttpserver",
"details" : "Versions of `simplehttpserver` prior to 0.2.1 are vulnerable to Path Traversal. Due to insufficient input sanitization, attackers can access server files by using relative paths. \n\n\n## Recommendation\n\nUpgrade to version 0.2.1 or later.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "static-resource-server"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.7.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-16493"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/357109"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/432600"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-45j8-pm75-5v8x"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/967"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/968"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-548" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T20:57:24Z",
"nvd_published_at" : null
}
}