Memory Leak Vulnerability in Node.js HTTP/2 Server

nodejs Updated 02 Oct 2025

Summary

07/02/2025
N/A
Yes i
Unrated
Not published

CVE-2025-23085: A memory leak could occur when a remote peer abruptly closes the socket without sending a GOAWAY notification. Affects nodejs versions < 22.13.1-r0. Fixed in 22.13.1-r0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Node.js is a popular open-source runtime environment that allows developers to execute JavaScript code server-side. It is widely used for building scalable network applications. The HTTP/2 Server module in Node.js enhances performance and efficiency for web applications by allowing multiplexing of requests. However, it is susceptible to a memory leak vulnerability when remote peers close sockets unexpectedly.

Vulnerability Detail

CVE-2025-23085 describes a memory leak that occurs when a remote peer abruptly closes the socket without sending a GOAWAY notification. This issue can also be triggered if nghttp2 detects an invalid header, leading to connection termination by the peer. The memory leak can result in increased memory consumption, potentially leading to denial of service under certain conditions. This vulnerability affects users of the HTTP/2 Server on Node.js versions 18.x, 20.x, 22.x, and 23.x.

How To Fix

Minimum fixed version

22.13.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade nodejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can implement connection handling logic to gracefully manage socket closures and avoid abrupt terminations. This may involve adding checks for socket states and ensuring proper cleanup of resources.

Conclusion

CVE-2025-23085 is a significant vulnerability affecting the HTTP/2 Server in Node.js, leading to potential memory leaks and denial of service. It is crucial for users to update their Node.js installations to the patched versions to ensure the security and stability of their applications.

See every vulnerability recorded for nodejs →

Share this vulnerability

FAQ

CVE-2025-23085 is a vulnerability in Node.js that can cause a memory leak when a remote peer closes a socket unexpectedly.

The vulnerability affects Node.js versions 18.x, 20.x, 22.x, and 23.x.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected by this vulnerability.

The memory leak can lead to increased memory consumption, which may result in a denial of service if not addressed.

Yes, a patch is available. Update to Node.js version 22.13.1-r0 or later to mitigate the vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for nodejs.

How To Fix

Minimum fixed version

22.13.1-r0

This is the first release that contains the fix.

sudo apk add --upgrade nodejs

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback