# CVE-2024-21891: Node.js 20 and 1 other: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

CVE-2024-21891 is fixed in 20 products on 2 platforms, first by Node.js 20 20.11.1, released February 13, 2024. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2024-21891
- Priority: High
- CVSS: 8.8 (Important)
- EPSS: 0.0125
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: Feb 20, 2024
- Weakness: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
- Vendor advisory: https://nvd.nist.gov/vuln/detail/CVE-2024-21891

## Description

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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Windows apps | Node.js 20 | 20.11.1 | [Node.js 20 20.11.1](https://patchblox.com/security/data/fix/windows-app/openjs.nodejs.20-20.11.1.md) | Feb 13, 2024 |
| Windows apps | Node.js 21 | 21.6.2 | [Node.js 21 21.6.2](https://patchblox.com/security/data/fix/windows-app/openjs.nodejs.21-21.6.2.md) | Feb 13, 2024 |
| Linux | nodejs RHEL 8 | 1:20.11.1-1.module+el8.9.0+21380+12032667 | [RHSA-2024:1687](https://patchblox.com/security/data/fix/linux/rhsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs RHEL 9 | 1:20.11.1-1.module+el9.3.0+21385+bac43d5a | [RHSA-2024:1688](https://patchblox.com/security/data/fix/linux/rhsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs almalinux 8 | 1:20.11.1-1.module_el8.9.0+3775+d8460d35 | [ALSA-2024:1687](https://patchblox.com/security/data/fix/linux/alsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs almalinux 9 | 1:20.11.1-1.module_el9.3.0+88+29afeaa2 | [ALSA-2024:1688](https://patchblox.com/security/data/fix/linux/alsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs ol 8 | 1:20.11.1-1.module+el8.9.0+90250+089ba5e1 | [ELSA-2024-1687](https://patchblox.com/security/data/fix/linux/elsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs ol 9 | 1:20.11.1-1.module+el9.3.0+90254+3f4d3ee1 | [ELSA-2024-1688](https://patchblox.com/security/data/fix/linux/elsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs rocky 8 | 1:20.11.1-1.module+el8.9.0+1776+addd4aec | [RLSA-2024:1687](https://patchblox.com/security/data/fix/linux/rlsa-2024-1687.md) | May 6, 2024 |
| Linux | nodejs-devel RHEL 8 | 1:20.11.1-1.module+el8.9.0+21380+12032667 | [RHSA-2024:1687](https://patchblox.com/security/data/fix/linux/rhsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-devel RHEL 9 | 1:20.11.1-1.module+el9.3.0+21385+bac43d5a | [RHSA-2024:1688](https://patchblox.com/security/data/fix/linux/rhsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-devel almalinux 8 | 1:20.11.1-1.module_el8.9.0+3775+d8460d35 | [ALSA-2024:1687](https://patchblox.com/security/data/fix/linux/alsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-devel almalinux 9 | 1:20.11.1-1.module_el9.3.0+88+29afeaa2 | [ALSA-2024:1688](https://patchblox.com/security/data/fix/linux/alsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-devel ol 8 | 1:20.11.1-1.module+el8.9.0+90250+089ba5e1 | [ELSA-2024-1687](https://patchblox.com/security/data/fix/linux/elsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-devel ol 9 | 1:20.11.1-1.module+el9.3.0+90254+3f4d3ee1 | [ELSA-2024-1688](https://patchblox.com/security/data/fix/linux/elsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-docs RHEL 8 | 1:20.11.1-1.module+el8.9.0+21380+12032667 | [RHSA-2024:1687](https://patchblox.com/security/data/fix/linux/rhsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-docs RHEL 9 | 1:20.11.1-1.module+el9.3.0+21385+bac43d5a | [RHSA-2024:1688](https://patchblox.com/security/data/fix/linux/rhsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-docs almalinux 8 | 1:20.11.1-1.module_el8.9.0+3775+d8460d35 | [ALSA-2024:1687](https://patchblox.com/security/data/fix/linux/alsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-docs almalinux 9 | 1:20.11.1-1.module_el9.3.0+88+29afeaa2 | [ALSA-2024:1688](https://patchblox.com/security/data/fix/linux/alsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-docs ol 8 | 1:20.11.1-1.module+el8.9.0+90250+089ba5e1 | [ELSA-2024-1687](https://patchblox.com/security/data/fix/linux/elsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-docs ol 9 | 1:20.11.1-1.module+el9.3.0+90254+3f4d3ee1 | [ELSA-2024-1688](https://patchblox.com/security/data/fix/linux/elsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-full-i18n RHEL 8 | 1:20.11.1-1.module+el8.9.0+21380+12032667 | [RHSA-2024:1687](https://patchblox.com/security/data/fix/linux/rhsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-full-i18n RHEL 9 | 1:20.11.1-1.module+el9.3.0+21385+bac43d5a | [RHSA-2024:1688](https://patchblox.com/security/data/fix/linux/rhsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-full-i18n almalinux 8 | 1:20.11.1-1.module_el8.9.0+3775+d8460d35 | [ALSA-2024:1687](https://patchblox.com/security/data/fix/linux/alsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-full-i18n almalinux 9 | 1:20.11.1-1.module_el9.3.0+88+29afeaa2 | [ALSA-2024:1688](https://patchblox.com/security/data/fix/linux/alsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-full-i18n ol 8 | 1:20.11.1-1.module+el8.9.0+90250+089ba5e1 | [ELSA-2024-1687](https://patchblox.com/security/data/fix/linux/elsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-full-i18n ol 9 | 1:20.11.1-1.module+el9.3.0+90254+3f4d3ee1 | [ELSA-2024-1688](https://patchblox.com/security/data/fix/linux/elsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-nodemon RHEL 8 | 0:3.0.1-1.module+el8.9.0+20473+c4e3d824 | [RHSA-2024:1687](https://patchblox.com/security/data/fix/linux/rhsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-nodemon RHEL 9 | 0:3.0.1-1.module+el9.3.0.z+20478+84a9f781 | [RHSA-2024:1688](https://patchblox.com/security/data/fix/linux/rhsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-nodemon almalinux 8 | 3.0.1-1.module_el8.9.0+3731+490e3ce5 | [ALSA-2024:1687](https://patchblox.com/security/data/fix/linux/alsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-nodemon almalinux 9 | 3.0.1-1.module_el9.3.0+47+c33bc288 | [ALSA-2024:1688](https://patchblox.com/security/data/fix/linux/alsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-nodemon ol 8 | 0:3.0.1-1.module+el8.9.0+90082+b6a613a6 | [ELSA-2024-1687](https://patchblox.com/security/data/fix/linux/elsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-nodemon ol 9 | 0:3.0.1-1.module+el9.3.0+90066+12d4a8d7 | [ELSA-2024-1688](https://patchblox.com/security/data/fix/linux/elsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-nodemon rocky 8 | 0:3.0.1-1.module+el8.8.0+1459+02651ab6 | [RLSA-2024:1687](https://patchblox.com/security/data/fix/linux/rlsa-2024-1687.md) | May 6, 2024 |
| Linux | nodejs-nodemon rocky 9 | 0:3.0.1-1.module+el9.6.0+32322+a8b1fd01 | [RLSA-2024:1688](https://patchblox.com/security/data/fix/linux/rlsa-2024-1688.md) | May 6, 2024 |
| Linux | nodejs-packaging RHEL 8 | 0:2021.06-4.module+el8.9.0+19519+e25b965a | [RHSA-2024:1687](https://patchblox.com/security/data/fix/linux/rhsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-packaging RHEL 9 | 0:2021.06-4.module+el9.3.0+19518+63aad52d | [RHSA-2024:1688](https://patchblox.com/security/data/fix/linux/rhsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-packaging almalinux 8 | 2021.06-4.module_el8.9.0+3684+11b9e959 | [ALSA-2024:1687](https://patchblox.com/security/data/fix/linux/alsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-packaging almalinux 9 | 2021.06-4.module_el9.3.0+48+1cf146a1 | [ALSA-2024:1688](https://patchblox.com/security/data/fix/linux/alsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-packaging ol 8 | 0:2021.06-4.module+el8.9.0+90082+b6a613a6 | [ELSA-2024-1687](https://patchblox.com/security/data/fix/linux/elsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-packaging ol 9 | 0:2021.06-4.module+el9.3.0+90066+12d4a8d7 | [ELSA-2024-1688](https://patchblox.com/security/data/fix/linux/elsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-packaging rocky 8 | 0:2021.06-4.module+el8.7.0+1072+5b168780 | [RLSA-2024:1687](https://patchblox.com/security/data/fix/linux/rlsa-2024-1687.md) | May 6, 2024 |
| Linux | nodejs-packaging rocky 9 | 0:2021.06-4.module+el9.5.0+31770+0da7192d | [RLSA-2024:1688](https://patchblox.com/security/data/fix/linux/rlsa-2024-1688.md) | May 6, 2024 |
| Linux | nodejs-packaging-bundler RHEL 8 | 0:2021.06-4.module+el8.9.0+19519+e25b965a | [RHSA-2024:1687](https://patchblox.com/security/data/fix/linux/rhsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-packaging-bundler RHEL 9 | 0:2021.06-4.module+el9.3.0+19518+63aad52d | [RHSA-2024:1688](https://patchblox.com/security/data/fix/linux/rhsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-packaging-bundler almalinux 8 | 2021.06-4.module_el8.9.0+3684+11b9e959 | [ALSA-2024:1687](https://patchblox.com/security/data/fix/linux/alsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-packaging-bundler almalinux 9 | 2021.06-4.module_el9.3.0+48+1cf146a1 | [ALSA-2024:1688](https://patchblox.com/security/data/fix/linux/alsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs-packaging-bundler ol 8 | 0:2021.06-4.module+el8.9.0+90082+b6a613a6 | [ELSA-2024-1687](https://patchblox.com/security/data/fix/linux/elsa-2024-1687.md) | Apr 8, 2024 |
| Linux | nodejs-packaging-bundler ol 9 | 0:2021.06-4.module+el9.3.0+90066+12d4a8d7 | [ELSA-2024-1688](https://patchblox.com/security/data/fix/linux/elsa-2024-1688.md) | Apr 8, 2024 |
| Linux | nodejs20 amzn 2023 | 1:20.11.1-1.amzn2023.0.1 | [ALAS2023-2024-544](https://patchblox.com/security/data/fix/linux/alas2023-2024-544.md) | Feb 29, 2024 |
| Linux | nodejs20-debuginfo amzn 2023 | 1:20.11.1-1.amzn2023.0.1 | [ALAS2023-2024-544](https://patchblox.com/security/data/fix/linux/alas2023-2024-544.md) | Feb 29, 2024 |
| Linux | nodejs20-debugsource amzn 2023 | 1:20.11.1-1.amzn2023.0.1 | [ALAS2023-2024-544](https://patchblox.com/security/data/fix/linux/alas2023-2024-544.md) | Feb 29, 2024 |
| Linux | nodejs20-devel amzn 2023 | 1:20.11.1-1.amzn2023.0.1 | [ALAS2023-2024-544](https://patchblox.com/security/data/fix/linux/alas2023-2024-544.md) | Feb 29, 2024 |
| Linux | nodejs20-docs amzn 2023 | 1:20.11.1-1.amzn2023.0.1 | [ALAS2023-2024-544](https://patchblox.com/security/data/fix/linux/alas2023-2024-544.md) | Feb 29, 2024 |
| Linux | nodejs20-full-i18n amzn 2023 | 1:20.11.1-1.amzn2023.0.1 | [ALAS2023-2024-544](https://patchblox.com/security/data/fix/linux/alas2023-2024-544.md) | Feb 29, 2024 |
| Linux | nodejs20-libs amzn 2023 | 1:20.11.1-1.amzn2023.0.1 | [ALAS2023-2024-544](https://patchblox.com/security/data/fix/linux/alas2023-2024-544.md) | Feb 29, 2024 |
| Linux | nodejs20-libs-debuginfo amzn 2023 | 1:20.11.1-1.amzn2023.0.1 | [ALAS2023-2024-544](https://patchblox.com/security/data/fix/linux/alas2023-2024-544.md) | Feb 29, 2024 |
| Linux | nodejs20-npm amzn 2023 | 1:10.2.4-1.20.11.1.1.amzn2023.0.1 | [ALAS2023-2024-544](https://patchblox.com/security/data/fix/linux/alas2023-2024-544.md) | Feb 29, 2024 |
| Linux | npm RHEL 8 | 1:10.2.4-1.20.11.1.1.module+el8.9.0+21380+12032667 | [RHSA-2024:1687](https://patchblox.com/security/data/fix/linux/rhsa-2024-1687.md) | Apr 8, 2024 |
| Linux | npm RHEL 9 | 1:10.2.4-1.20.11.1.1.module+el9.3.0+21385+bac43d5a | [RHSA-2024:1688](https://patchblox.com/security/data/fix/linux/rhsa-2024-1688.md) | Apr 8, 2024 |
| Linux | npm almalinux 8 | 1:10.2.4-1.20.11.1.1.module_el8.9.0+3775+d8460d35 | [ALSA-2024:1687](https://patchblox.com/security/data/fix/linux/alsa-2024-1687.md) | Apr 8, 2024 |
| Linux | npm almalinux 9 | 1:10.2.4-1.20.11.1.1.module_el9.3.0+88+29afeaa2 | [ALSA-2024:1688](https://patchblox.com/security/data/fix/linux/alsa-2024-1688.md) | Apr 8, 2024 |
| Linux | npm ol 8 | 1:10.2.4-1.20.11.1.1.module+el8.9.0+90250+089ba5e1 | [ELSA-2024-1687](https://patchblox.com/security/data/fix/linux/elsa-2024-1687.md) | Apr 8, 2024 |
| Linux | npm ol 9 | 1:10.2.4-1.20.11.1.1.module+el9.3.0+90254+3f4d3ee1 | [ELSA-2024-1688](https://patchblox.com/security/data/fix/linux/elsa-2024-1688.md) | Apr 8, 2024 |
| Linux | v8-11.3-devel amzn 2023 | 3:11.3.244.8-1.20.11.1.1.amzn2023.0.1 | [ALAS2023-2024-544](https://patchblox.com/security/data/fix/linux/alas2023-2024-544.md) | Feb 29, 2024 |

---

Data as of 2026-11-08T13:06:02Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
