CVE-2019-8903: Total.js Path Traversal Vulnerability
HIGHCVE-2019-8903 is a HIGH (CVSS 7.5) path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Total.js libraries in the npm ecosystem. The issue involves path traversal in total.js. Remediation is available by upgrading affected packages to version 3.2.3.
CVE-2019-8903 at a Glance
Security Impact
CVSS: 7.5
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:H/I:N/A:N).
How to Fix CVE-2019-8903
To remediate this vulnerability, upgrade all affected Total.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 total.js@3.2.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls total.js
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2019-8903, inspect your project dependencies using npm:
npm ls total.js
Analyze the terminal output to locate any version of Total.js in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2.3), your application is affected.
Note: The npm ls total.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 Total.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-8903 Affected Total.js Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
total.js
|
npm |
< 3.2.3
|
3.2.3
|
References
Frequently Asked Questions
What is CVE-2019-8903?
Which Total.js versions are affected?
What version fixes CVE-2019-8903?
Is total.js affected?
What is the CVSS score of CVE-2019-8903?
What CWE is associated with CVE-2019-8903?
How can I check npm dependencies for CVE-2019-8903?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-3q32-j57w-q4w7",
"modified" : "2021-08-31T21:22:06Z",
"published" : "2019-02-20T15:40:13Z",
"aliases" : [ "CVE-2019-8903" ],
"summary" : "Path Traversal in total.js",
"details" : "Affected versions of `total.js` are vulnerable to Path Traversal. Due to insufficient input sanitization in URLs, attackers can access server files outside the `/public` folder by using relative paths. \nThe files served are limited to these file types: `flac`, `jpg`, `jpeg`, `png`, `gif`, `ico`, `js`, `css`, `txt`, `xml`, `woff`, `woff2`, `otf`, `ttf`, `eot`, `svg`, `zip`, `rar`, `pdf`, `docx`, `xlsx`, `doc`, `xls`, `html`, `htm`, `appcache`, `manifest`, `map`, `ogv`, `ogg`, `mp4`, `mp3`, `webp`, `webm`, `swf`, `package`, `json`, `md`, `m4v`, `jsx`, `heif`, `heic`.\n\n\n## Recommendation\n\n- If you are using version 2.1.x, upgrade to 2.1.1 or later.\n- If you are using version 2.2.x, upgrade to 2.2.1 or later.\n- If you are using version 2.3.x, upgrade to 2.3.1 or later.\n- If you are using version 2.4.x, upgrade to 2.4.1 or later.\n- If you are using version 2.5.x, upgrade to 2.5.1 or later.\n- If you are using version 2.6.x, upgrade to 2.6.3 or later.\n- If you are using version 2.7.x, upgrade to 2.7.1 or later.\n- If you are using version 2.8.x, upgrade to 2.8.1 or later.\n- If you are using version 2.9.x, upgrade to 2.9.5 or later.\n- If you are using version 3.0.x, upgrade to 3.0.1 or later.\n- If you are using version 3.1.x, upgrade to 3.1.1 or later.\n- If you are using version 3.2.x, upgrade to 3.2.4 or later.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "total.js"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.2.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2019-8903"
}, {
"type" : "WEB",
"url" : "https://github.com/totaljs/framework/commit/c37cafbf3e379a98db71c1125533d1e8d5b5aef7"
}, {
"type" : "WEB",
"url" : "https://github.com/totaljs/framework/commit/de16238d13848149f5d1dae51f54e397a525932b"
}, {
"type" : "WEB",
"url" : "https://blog.certimetergroup.com/it/articolo/security/total.js-directory-traversal-cve-2019-8903"
}, {
"type" : "ADVISORY",
"url" : "https://github.com/advisories/GHSA-3q32-j57w-q4w7"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/totaljs/framework"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/advisories/1026"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2020-06-16T20:55:54Z",
"nvd_published_at" : null
}
}