CVE-2021-3223: Node red dashboard Path Traversal Vulnerability
HIGHCVE-2021-3223 is a HIGH path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Node red dashboard libraries in the npm ecosystem. The issue involves path traversal in node-red-dashboard. Remediation is available by upgrading affected packages to version 2.26.2.
CVE-2021-3223 at a Glance
How to Fix CVE-2021-3223
To remediate this vulnerability, upgrade all affected Node red dashboard 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 node-red-dashboard@2.26.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls node-red-dashboard
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-3223, inspect your project dependencies using npm:
npm ls node-red-dashboard
Analyze the terminal output to locate any version of Node red dashboard in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.26.2), your application is affected.
Note: The npm ls node-red-dashboard 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 Node red dashboard, 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-2021-3223 Affected Node red dashboard Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
node-red-dashboard
|
npm |
< 2.26.2
|
2.26.2
|
References
Frequently Asked Questions
What is CVE-2021-3223?
Which Node red dashboard versions are affected?
What version fixes CVE-2021-3223?
Is node-red-dashboard affected?
What CWE is associated with CVE-2021-3223?
How can I check npm dependencies for CVE-2021-3223?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2hw7-mxvj-m455",
"modified" : "2021-01-27T23:26:39Z",
"published" : "2021-01-29T18:13:52Z",
"aliases" : [ "CVE-2021-3223" ],
"summary" : "Path traversal in Node-RED-Dashboard",
"details" : "In Node-RED-Dashboard before 2.26.2 there is a path traversal vulnerability. It allows ui_base/js/..%2f directory traversal to read files.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "node-red-dashboard"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.26.2"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-3223"
}, {
"type" : "WEB",
"url" : "https://github.com/node-red/node-red-dashboard/issues/669"
}, {
"type" : "WEB",
"url" : "https://github.com/node-red/node-red-dashboard/commit/f48f356df966f607ba3d09c27396074b81f2ae97"
}, {
"type" : "WEB",
"url" : "https://github.com/node-red/node-red-dashboard/releases/tag/2.26.2"
}, {
"type" : "WEB",
"url" : "https://www.npmjs.com/package/node-red-dashboard"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2021-01-27T23:26:39Z",
"nvd_published_at" : "2021-01-26T18:16:00Z"
}
}