CVE-2026-48779: ws Package Memory Exhaustion DoS from Tiny Fragments and Data Chunks
Summary
CVE-2026-48779: ws: Memory exhaustion DoS from tiny fragments and data chunks. Affects ws across 4 version ranges.
>= 1.1.0, < 5.2.5
>= 6.0.0, < 6.2.4
>= 7.0.0, < 7.5.11
>= 8.0.0, < 8.21.0
Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓
Also tracked for
- ws · ghsa
The same CVE-2026-48779 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
Background
The 'ws' package is a popular WebSocket implementation for Node.js, enabling real-time communication between clients and servers. It is widely used for building interactive applications, such as chat apps and live notifications. However, the package is vulnerable to a memory exhaustion denial-of-service (DoS) attack when handling a high volume of exceptionally small data fragments, which can lead to significant memory consumption and potential process termination.
Vulnerability Detail
The vulnerability arises from the ability of a malicious peer to send a large number of tiny fragments and data chunks, which causes the 'ws' server to allocate and hold excessive memory. This behavior can lead to an out-of-memory (OOM) condition, resulting in the termination of the process. The issue is particularly concerning as it can be triggered with modest network traffic, making it a stealthy attack vector.
How To Fix
Latest published version: 8.22.0 as of 22 Oct 2026
npm install ws@8.22.0
Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.
If you can't move to the latest
The minimum fixed version depends on the release line you run.
-
>= 1.1.0, < 5.2.55.2.5npm install ws@5.2.5 -
>= 6.0.0, < 6.2.46.2.4npm install ws@6.2.4 -
>= 7.0.0, < 7.5.117.5.11npm install ws@7.5.11 -
>= 8.0.0, < 8.21.08.21.0npm install ws@8.21.0
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
In vulnerable versions, you can mitigate the issue by lowering the value of the 'maxPayload' option in your WebSocket server configuration. This can help limit the amount of memory allocated for incoming messages. Example code to set this option is as follows:
const wss = new WebSocketServer({ port: 0, maxPayload: 1024 }); // Set maxPayload to 1KB
Conclusion
The 'ws' package vulnerability CVE-2026-48779 poses a significant risk due to its potential for memory exhaustion attacks. It is crucial for developers using this package to update to the latest patched versions or implement workarounds to mitigate the risk. Regular monitoring for vulnerabilities using tools like Vulert can help maintain application security.
See every vulnerability recorded for ws →
FAQ
CVE-2026-48779 is a vulnerability in the 'ws' package that allows for memory exhaustion denial-of-service attacks through the sending of tiny data fragments.
You can check if your application is affected by using Vulert, which monitors open-source vulnerabilities in your software. Visit Vulert Scanner to use the playground without signup.
The vulnerability can lead to significant memory consumption, causing the application to crash or become unresponsive due to out-of-memory conditions.
You can update the 'ws' package by running the command 'npm install ws@latest' in your project directory.
The CVSS score for this vulnerability is 7.5, indicating a high severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for ws.