CVE-2024-21891: Node.js depends on multiple built-in utility functions to normalize paths provided to node:fs functions, which can be overwitten with user-defined implementations leading to filesystem permission...
High CVSS 8.8
- CVE id
- CVE-2024-21891
- Published
- Last modified
Affected packages
| Package | Affected versions | Fixed in |
|---|---|---|
| Node.js Runtimes and servers |
>= 20.0.0, < 20.11.1 >= 21.0.0, < 21.6.2 |
20.11.1, 21.6.2 |
How to fix it
Upgrade Node.js to the fixed release of the line you run: 20.11.1, 21.6.2.
node --version
- Install the patched Node.js release of your major line (nvm install, or the node image tag) everywhere the app runs and builds.
A free AIssue account reads the runtime versions your repositories pin (version files, Dockerfiles, build files) and tells you when one is affected.
Details
Node.js depends on multiple built-in utility functions to normalize paths provided to node:fs functions, which can be overwitten with user-defined implementations leading to filesystem permission model bypass through path traversal attack. This vulnerability affects all users using the experimental permission model in Node.js 20 and Node.js 21. Please note that at the time this CVE was issued, the permission model is an experimental feature of Node.js.
References
Am I affected?
Upload or paste your lockfile. We check every package version in it against OSV.dev, this advisory included, and email you the vulnerable ones with the version that fixes them. Free, and no account needed.
About this data
Source: National Vulnerability Database (NVD) (public domain). Severity comes from the advisory's own rating when it has one, else from its CVSS score.