CVE-2019-5444: Serve here.js Path Traversal Vulnerability
MODERATECVE-2019-5444 is a MODERATE (CVSS 5.3) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Serve here.js libraries in the npm ecosystem. The issue involves path traversal in serve-here.js. Remediation is available by upgrading affected packages to version 1.2.0.
CVE-2019-5444 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2019-5444
To remediate this vulnerability, upgrade all affected Serve here.js 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 serve-here.js@1.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls serve-here.js
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2019-5444, inspect your project dependencies using npm:
npm ls serve-here.js
Analyze the terminal output to locate any version of Serve here.js in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2.0), your application is affected.
Note: The npm ls serve-here.js 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-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 Serve here.js, 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-2019-5444 Affected Serve here.js Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
serve-here.js
|
npm |
< 1.2.0
|
1.2.0
|
References
Frequently Asked Questions
What is CVE-2019-5444?
Which Serve here.js versions are affected?
What version fixes CVE-2019-5444?
Is serve-here.js affected?
What is the CVSS score of CVE-2019-5444?
What CWE is associated with CVE-2019-5444?
How can I check npm dependencies for CVE-2019-5444?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4448-rc82-fcr7",
"modified" : "2022-12-03T04:01:44Z",
"published" : "2021-09-22T18:40:57Z",
"aliases" : [ "CVE-2019-5444" ],
"summary" : "Path Traversal in serve-here.js",
"details" : "Versions of serve-here.js prior to 1.2.0 are vulnerable to path traversal. The package fails to sanitize URLs, allowing attackers to access server files outside of the served folder using relative paths.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "serve-here.js"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-5444"
}, {
"type" : "WEB",
"url" : "https://hackerone.com/reports/569966"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ChristoPy/serve-here.js"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1019"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-09-22T18:40:39Z",
"nvd_published_at" : "2019-07-10T20:15:00Z"
}
}