CVE-2026-21715: Vulnerability in nodejs node
A flaw in Node.js Permission Model filesystem enforcement leaves `fs.realpathSync.native()` without the required read permission checks, while all comparable filesystem functions correctly enforce them. As a result, code running under `--permission` with restricted `--allow-fs-read` can still use `fs.realpathSync.native()` to check file existence, resolve symlink targets, and enumerate filesystem paths outside of permitted directories. This vulnerability affects **20.x, 22.x, 24.x, and 25.x** processes using the Permission Model where `--allow-fs-read` is intentionally restricted.
AI Analysis
Technical Summary
CVE-2026-21715 identifies a flaw in the Node.js Permission Model's enforcement of filesystem read permissions specifically in the fs.realpathSync.native() function. While Node.js implements a permission model that restricts filesystem read access via the --allow-fs-read flag, this particular native function bypasses these restrictions by not performing the necessary read permission checks. This inconsistency allows code running under restricted permissions to use fs.realpathSync.native() to determine if files exist, resolve symbolic links, and enumerate filesystem paths outside the permitted directories. This undermines the security model intended to sandbox filesystem access, potentially exposing sensitive directory structures or file locations. The vulnerability affects a broad range of Node.js versions, including recent major releases (20.x, 22.x, 24.x, 25.x) and earlier versions starting from 4.0 through 19.0, indicating a long-standing issue. The CVSS 3.0 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N) reflects that exploitation requires local access with low complexity, privileges, and no user interaction, resulting in limited confidentiality impact without affecting integrity or availability. No known public exploits have been reported yet, but the vulnerability poses a risk in environments relying on strict filesystem read restrictions for security.
Potential Impact
The primary impact of this vulnerability is a confidentiality breach where restricted Node.js processes can bypass intended filesystem read restrictions. This can lead to unauthorized disclosure of filesystem structure, symbolic link targets, and file existence information outside permitted directories. While it does not allow modification or deletion of files (no integrity or availability impact), the exposure of directory and file metadata can aid attackers in reconnaissance and subsequent exploitation steps. Organizations using Node.js with the Permission Model to sandbox or limit filesystem access—such as multi-tenant environments, serverless platforms, or security-sensitive applications—may find their containment controls weakened. This could facilitate lateral movement or privilege escalation if combined with other vulnerabilities. The broad range of affected Node.js versions and the common use of Node.js worldwide increases the scope of potential impact. However, the requirement for local privileges and the low severity rating limit the immediate risk to remote attackers.
Mitigation Recommendations
To mitigate this vulnerability, organizations should: 1) Upgrade Node.js to a patched version once available that enforces read permission checks on fs.realpathSync.native(). 2) Until patches are released, avoid relying solely on the Permission Model's --allow-fs-read restrictions for security-critical filesystem access control. 3) Implement additional application-level access controls and sandboxing mechanisms to restrict filesystem access beyond Node.js permissions. 4) Monitor and audit filesystem access patterns for unusual use of fs.realpathSync.native() or similar functions that could indicate attempts to bypass restrictions. 5) Limit local access to Node.js processes running with restricted permissions to trusted users only. 6) Consider using containerization or OS-level mandatory access controls (e.g., SELinux, AppArmor) to enforce filesystem restrictions independently of Node.js. 7) Review and restrict symbolic link usage in sensitive directories to reduce exposure from symlink resolution. These steps provide layered defense until an official patch is applied.
Affected Countries
United States, Germany, United Kingdom, India, China, Japan, South Korea, France, Canada, Australia
CVE-2026-21715: Vulnerability in nodejs node
Description
A flaw in Node.js Permission Model filesystem enforcement leaves `fs.realpathSync.native()` without the required read permission checks, while all comparable filesystem functions correctly enforce them. As a result, code running under `--permission` with restricted `--allow-fs-read` can still use `fs.realpathSync.native()` to check file existence, resolve symlink targets, and enumerate filesystem paths outside of permitted directories. This vulnerability affects **20.x, 22.x, 24.x, and 25.x** processes using the Permission Model where `--allow-fs-read` is intentionally restricted.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-21715 identifies a flaw in the Node.js Permission Model's enforcement of filesystem read permissions specifically in the fs.realpathSync.native() function. While Node.js implements a permission model that restricts filesystem read access via the --allow-fs-read flag, this particular native function bypasses these restrictions by not performing the necessary read permission checks. This inconsistency allows code running under restricted permissions to use fs.realpathSync.native() to determine if files exist, resolve symbolic links, and enumerate filesystem paths outside the permitted directories. This undermines the security model intended to sandbox filesystem access, potentially exposing sensitive directory structures or file locations. The vulnerability affects a broad range of Node.js versions, including recent major releases (20.x, 22.x, 24.x, 25.x) and earlier versions starting from 4.0 through 19.0, indicating a long-standing issue. The CVSS 3.0 vector (AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N) reflects that exploitation requires local access with low complexity, privileges, and no user interaction, resulting in limited confidentiality impact without affecting integrity or availability. No known public exploits have been reported yet, but the vulnerability poses a risk in environments relying on strict filesystem read restrictions for security.
Potential Impact
The primary impact of this vulnerability is a confidentiality breach where restricted Node.js processes can bypass intended filesystem read restrictions. This can lead to unauthorized disclosure of filesystem structure, symbolic link targets, and file existence information outside permitted directories. While it does not allow modification or deletion of files (no integrity or availability impact), the exposure of directory and file metadata can aid attackers in reconnaissance and subsequent exploitation steps. Organizations using Node.js with the Permission Model to sandbox or limit filesystem access—such as multi-tenant environments, serverless platforms, or security-sensitive applications—may find their containment controls weakened. This could facilitate lateral movement or privilege escalation if combined with other vulnerabilities. The broad range of affected Node.js versions and the common use of Node.js worldwide increases the scope of potential impact. However, the requirement for local privileges and the low severity rating limit the immediate risk to remote attackers.
Mitigation Recommendations
To mitigate this vulnerability, organizations should: 1) Upgrade Node.js to a patched version once available that enforces read permission checks on fs.realpathSync.native(). 2) Until patches are released, avoid relying solely on the Permission Model's --allow-fs-read restrictions for security-critical filesystem access control. 3) Implement additional application-level access controls and sandboxing mechanisms to restrict filesystem access beyond Node.js permissions. 4) Monitor and audit filesystem access patterns for unusual use of fs.realpathSync.native() or similar functions that could indicate attempts to bypass restrictions. 5) Limit local access to Node.js processes running with restricted permissions to trusted users only. 6) Consider using containerization or OS-level mandatory access controls (e.g., SELinux, AppArmor) to enforce filesystem restrictions independently of Node.js. 7) Review and restrict symbolic link usage in sensitive directories to reduce exposure from symlink resolution. These steps provide layered defense until an official patch is applied.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- hackerone
- Date Reserved
- 2026-01-04T15:00:06.574Z
- Cvss Version
- 3.0
- State
- PUBLISHED
Threat ID: 69cacda7e6bfc5ba1d6188ae
Added to database: 3/30/2026, 7:23:19 PM
Last enriched: 3/30/2026, 7:40:03 PM
Last updated: 3/30/2026, 10:25:25 PM
Views: 5
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.