Paper/Archive/CVE-2024-21896

CVE-2024-21896

NodeJS Node — The permission model protects itself against path traversal attacks by calling path.resolve() on any paths given by the user.

Description · from the CVE record

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.

Affected

ProductAffectedFixed inSource
Node4.0 – < 4.*4.*CNA
Node5.0 – < 5.*5.*CNA
Node6.0 – < 6.*6.*CNA
Node7.0 – < 7.*7.*CNA
Node8.0 – < 8.*8.*CNA
Node9.0 – < 9.*9.*CNA
Node10.0 – < 10.*10.*CNA
Node11.0 – < 11.*11.*CNA
Node12.0 – < 12.*12.*CNA
Node13.0 – < 13.*13.*CNA
Node14.0 – < 14.*14.*CNA
Node15.0 – < 15.*15.*CNA

Scores by source

NVD9.8CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
hackerone (CNA)7.9CVSS:3.0/AV:L/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N/CR:M/IR:M/AR:M
CISA ADPSSVCExploitation: none · Automatable: no · Technical impact: total

References

refhackerone.com/reports/2218653refsecurity.netapp.com/advisory/ntap-20240329-0002refopenwall.com/lists/oss-security/2024/03/11/1