CVE-2024-21896
Nodejs Node.Js 20.0.0 – 20.11.1
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HSummary
CVE-2024-21896 is a critical-severity Path Traversal: 'dir/../../filename' (CWE-27) vulnerability in Nodejs Node.Js. Its CVSS base score is 9.8 (Critical).
Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked in the top 33% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
The strongest mitigations our analysis identified map to SI-10 (Information Input Validation) — see the control section below for these in your framework.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2024-19507
Vulnerability Data
The permission model protects itself against path traversal attacks by calling path.resolve() on any paths given by the user. If the path is to be treated as a Buffer, the implementation uses Buffer.from() to obtain a Buffer from the result…
more
of path.resolve(). By monkey-patching Buffer internals, namely, Buffer.prototype.utf8Write, the application can modify the result of path.resolve(), which leads to a path traversal vulnerability. 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.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Mitigating Controls (NIST 800-53 r5) AI
Input validation directly stops untrusted pathnames containing ../ sequences from being used to construct traversals outside the intended directory.
Mitigating Controls (NIST CSF 2.0) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.
Secure SDLC practices directly require input validation and path sanitization that prevent directory traversal flaws.
Vulnerability identification processes will discover path traversal weaknesses during code or configuration review.
Least-privilege file permissions and access enforcement can limit the damage from a successful traversal.
Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI
Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.
Secure coding standards require neutralizing '../' sequences and using safe file APIs, eliminating this exact weakness.
Security testing in development catches path-traversal flaws before release but does not itself implement the control.
Secure development lifecycle mandates input validation and path sanitization that directly prevents directory traversal.
Application security requirements include explicit rules for safe file-path handling and canonicalization.
Secure architecture principles discourage unsafe path construction but do not prescribe the specific coding fix.
Information access restriction can limit which files are reachable, reducing impact but not preventing the traversal vector.