SecurityContext

CVE-2024-21896: Node.js - Path Traversal

  • Cve: CVE-2024-21896
  • Name: Node.js - Path Traversal
  • Description: 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 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.
  • Impact: Attackers can manipulate file paths to access or modify arbitrary files, potentially leading to information disclosure or system compromise.
  • Remediation: Update to the latest Node.js version where this issue is fixed or avoid monkey-patching Buffer internals in the permission model.
  • Vulnerability type: path_traversal
  • Vulnerability impact: file_system_read, file_system_write, information_disclosure
  • Requirements: Exploit requires monkey-patching Buffer internals
  • Labels source: projectdiscovery
  • Severity: critical
  • Cvss score: 9.8
  • Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Epss score: 0.01262
  • Epss percentile: 0.70248
  • Assignee: [email protected]
  • Published at: 2024-02-20T02:15:50Z
  • Age in days: 1008
  • Modified at: 2026-06-17T07:10:21Z
  • Patch available: yes
  • References total: 3
  • Products total: 1
  • Oss: yes
  • Projects total: 1
  • Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-21896
  • Nvd status: analyzed
  • Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
  • Not known: requirement type

Cwe

IdName
CWE-27Path Traversal: 'dir/../../filename'

Hackerone

  • Reports: 2
  • Rank: 3806

References

Same in every row:

  • Source: nvd
UrlTags
http://www.openwall.com/lists/oss-security/2024/03/11/1Mailing List, Third Party Advisory
https://security.netapp.com/advisory/ntap-20240329-0002/Third Party Advisory
https://hackerone.com/reports/2218653Issue Tracking

Products

ProductAffectedPlatform boundSourcesUrl
nodejs:node.js>= 21.0.0, < 21.6.2; >= 20.0.0, < 20.11.1nonvd/v1/products/nodejs/node.js

Projects

RepositoryLink kindsIndexedUrl
nodejs/nodefixyes/v1/repositories/nodejs/node

Index

  • Checked, none or zero: repositories, repositories high signal, packages

Exploitation

  • Remote: yes
  • Hackerone reports: 2
  • Exposed hosts: 3533194
  • Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
  • Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since