Developers and site operators worldwide are being urged to update Node.js immediately after a critical vulnerability was disclosed that can cause production servers to crash, potentially leading to denial-of-service (DoS) conditions in apps large and small.
At the heart of the issue is an obscure flaw in how Node.js handles stack overflows when certain advanced internal tools are used. In a security bulletin, the Node.js project explained that the bug can cause Node.js to exit abruptly — without throwing a manageable error — if recursion in user code exhausts the call stack while the low-level async_hooks API is enabled.
What’s Happening Under the Hood
Node.js and its JavaScript engine, V8, normally try to recover cleanly when a program runs out of stack space — for example, due to unbounded recursion. Many application frameworks and performance tools rely on this graceful recovery for stability.
But in certain scenarios — specifically when async_hooks is active — the runtime fails to handle the exception properly and instead crashes with an internal error (exit code 7). This can take down an entire server process rather than just the affected request or thread.
Who Is Affected?
According to the official Node.js advisory, virtually every production Node.js application built with modern frameworks and monitoring tools could be impacted if it uses:
- React Server Components or Next.js
- Application Performance Monitoring (APM) tools such as Datadog, New Relic, Elastic APM, Dynatrace, and OpenTelemetry
Many of these depend on the AsyncLocalStorage feature (built atop async_hooks) to track asynchronous context, which is exactly where the bug manifests.
Importantly, the vulnerability affects a very wide range of Node.js versions — from the first release that supported async_hooks (Node.js v8.x) all the way through versions that were officially end-of-life long ago.
Patches and Mitigations
Node.js has published patched releases for all active branches of the platform:
- Node.js 20.20.0 (LTS)
- Node.js 22.22.0 (LTS)
- Node.js 24.13.0 (LTS)
- Node.js 25.3.0 (Current)
These updates introduce a fix that detects stack overflows during asynchronous operations and propagates the error back to application code instead of causing a hard crash.
The vulnerability is tracked as CVE-2025-59466 with a CVSS score of 7.5, reflecting its practical impact on availability and stability.
Why This Matters
While this bug doesn’t constitute a traditional security breach (i.e., it doesn’t let attackers steal data or run arbitrary code), its ability to disrupt servers at scale is a real risk — especially in environments where user input can lead to deep recursion.
Node.js maintainers note that this behavior falls outside the JavaScript specification and that the underlying JavaScript engine doesn’t classify stack exhaustion as a security flaw — which is why it’s technically treated as a mitigation rather than a full security fix. Still, the practical benefit of the update is undeniable: it makes error handling more predictable and robust for the entire Node.js ecosystem.
Recommendations for Developers
- Update Node.js to the latest patched release as soon as possible.
- Review code that uses
async_hooksor related tools like AsyncLocalStorage. - Test critical services under load to ensure stability after applying the updates.
In addition to this issue, the January Node.js security release also includes patches for other high-severity vulnerabilities that could lead to data leakage, unauthorized file access, or even further denial-of-service conditions.
