CVE-2026-48779: ws WebSocket Memory Exhaustion DoS – Patch Guidance
The ws library, a widely-used WebSocket implementation for Node.js, contains a denial-of-service vulnerability that allows a remote attacker to crash an application by sending a carefully crafted stream of tiny data fragments. Despite the small individual packets, the server allocates internal memory structures for each fragment that far exceed the advertised message-size limits, eventually exhausting available memory and terminating the process. No authentication is required, and the attack traffic is modest, making this a practical threat for exposed WebSocket services.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 7.5 HIGH · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-1050, CWE-400, CWE-770
- Affected products
- 1 configuration(s)
- Published / Modified
- 2026-06-17 / 2026-07-21
NVD description (verbatim)
ws is an open source WebSocket client and server for Node.js. All versions from 1.1.0 up to (but not including) 5.2.5, from 6.0.0 up to 6.2.4, from 7.0.0 up to 7.5.11, and from 8.0.0 up to 8.21.0 are affected by a memory exhaustion DoS vulnerability. A peer can send a high volume of exceptionally small fragments and data chunks, with modest network traffic, to force the remote peer into allocating and holding structural wrappers that consume far more memory than the default documented message-size limit, leading to process termination due to OOM. This issue has been fixed in versions 5.2.5, 6.2.4, 7.5.11, and 8.21.0.
24 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
CVE-2026-48779 is a memory exhaustion denial-of-service flaw in the ws WebSocket library (Node.js). Affected versions include 1.1.0–5.2.4, 6.0.0–6.2.3, 7.0.0–7.5.10, and 8.0.0–8.20.0. The vulnerability stems from insufficient bounds checking on fragmented WebSocket frames. When a peer transmits a high volume of small frame fragments, the server allocates structural wrapper objects (headers, metadata, state containers) for each fragment independent of the actual payload size. This circumvents the library's message-size limit check, which typically validates only the final assembled message. An attacker can trigger rapid out-of-memory (OOM) conditions with modest bandwidth consumption. The issue has been patched in versions 5.2.5, 6.2.4, 7.5.11, and 8.21.0.
Business impact
Applications relying on ws for WebSocket communication—including real-time chat, collaboration platforms, financial feeds, and IoT command channels—face service unavailability from a single unauthenticated attacker. The low barrier to exploitation (no credentials, modest traffic footprint) and high reliability of the attack make this a practical threat for public-facing WebSocket endpoints. Incident response costs, reputation damage, and lost revenue from extended downtime can be significant, especially if the vulnerable service is mission-critical or customer-facing.
Affected systems
Any Node.js application using ws versions 1.1.0 through 8.20.0 (with the exception of patched releases 5.2.5, 6.2.4, 7.5.11, and 8.21.0 or later) is at risk. Applications importing ws directly, or indirectly through frameworks and packages that bundle it, should be inventoried. Long-term support (LTS) Node.js distributions may still carry vulnerable versions in their package trees. Check your npm lockfile or package-lock.json to confirm the exact version in use.
Exploitability
Exploitability is high. The attack requires only network access to the WebSocket endpoint and no authentication or user interaction. An attacker can craft a simple script to flood the server with fragmented frames, reliably forcing memory exhaustion within seconds to minutes depending on available RAM. Public-facing WebSocket services are directly exposed; internal services are at risk if the attacker has network visibility to the service port. The attack leaves minimal forensic artifacts and can be launched from a single machine or distributed across multiple sources.
Remediation
Upgrade ws to version 5.2.5, 6.2.4, 7.5.11, or 8.21.0 or later, depending on your current version branch. If your application pins a specific major version, upgrade to the next patched minor release in that series. After patching, restart affected Node.js processes. No configuration changes or code modifications are required. For applications unable to patch immediately, consider rate-limiting or network-level filtering of WebSocket connections to reduce exposure.
Patch guidance
Identify your current ws version by running 'npm list ws' in your project directory or checking package.json and package-lock.json. If you are on version 1.x–5.x, upgrade to 5.2.5 or later. If on 6.x, upgrade to 6.2.4 or later. If on 7.x, upgrade to 7.5.11 or later. If on 8.x, upgrade to 8.21.0 or later. Run 'npm update ws' or manually edit package.json and run 'npm install'. Test the upgrade in a staging environment, especially if ws is transitive dependency, to ensure compatibility with other packages. Verify against the official ws GitHub releases and npm package page to confirm the patch version number matches your expectations.
Detection guidance
Monitor Node.js process resource usage (memory) in real time. Alert on rapid memory growth followed by process crashes or OOM killer invocations. Enable WebSocket frame logging (if your application or reverse proxy supports it) to detect unusually high fragmentation rates or frames from a single source. Look for spikes in frame count relative to payload size. Network-level inspection of WebSocket traffic may reveal repetitive, small-payload frames as a precursor to DoS. Correlate process crashes with incoming WebSocket activity using application logs and system metrics.
Why prioritize this
This vulnerability merits immediate patching because of its high CVSS score (7.5), ease of exploitation, and broad applicability across Node.js deployments. The low attack complexity and lack of authentication requirements mean that even small, opportunistic actors can weaponize it. Any publicly accessible Node.js WebSocket service is an immediate target; even internal services are at risk in segmented networks. The patch is straightforward and low-risk, making delay unjustifiable.
Risk score, explained
CVSS 3.1 score of 7.5 (HIGH) reflects a network-accessible, unauthenticated, low-complexity attack vector with a guaranteed impact on availability (process termination). There is no confidentiality or integrity impact, but the denial of service is complete and reliable. The score does not account for widespread deployment of ws or real-world attack prevalence, but the ease of exploitation and direct denial-of-service effect justify the HIGH severity rating.
Frequently asked questions
How do I know if my Node.js application is vulnerable?
Check your package.json and package-lock.json for the ws dependency and its version number. Run 'npm list ws' to confirm. If ws is not listed but your application uses WebSocket functionality, it may be a transitive dependency—check the full output of 'npm list ws' or search your node_modules directory. Compare your version against the affected ranges: 1.1.0–5.2.4, 6.0.0–6.2.3, 7.0.0–7.5.10, or 8.0.0–8.20.0. If your version falls in these ranges, you are vulnerable.
Does this vulnerability require the attacker to know the WebSocket endpoint URL or any application secrets?
No. The attack is completely unauthenticated and requires only network access to the WebSocket server port and the URL or path of any WebSocket endpoint. If the endpoint is publicly accessible (e.g., behind a web server), an attacker can discover or guess the URL and begin sending crafted frames immediately.
Can a web application firewall (WAF) or rate-limiting middleware protect me before I patch?
Partial mitigation is possible. Network-level rate-limiting or WAF rules that drop connections sending excessive small frames in rapid succession may slow or block the attack. However, these measures are not a substitute for patching and may not eliminate the vulnerability entirely, especially if the attacker throttles the frame rate. Upgrade ws as soon as feasible.
Does the patch require any application code changes or configuration updates?
No. The patch fixes the vulnerability at the library level. Simply upgrade ws to the patched version and restart your Node.js process. No application code, configuration, or behavioral changes are necessary.
This analysis is provided for informational purposes and is based on publicly available vulnerability data as of the publication date. Security teams must verify all patch version numbers, affected product versions, and supported upgrade paths against the official ws project documentation and vendor advisories before deploying patches to production. Testing in a non-production environment is strongly recommended. SEC.co makes no warranty regarding the completeness or accuracy of this information and assumes no liability for decisions made based on this analysis. Source: NVD (public-domain), retrieved 2026-07-26. Analysis generated by SEC.co (claude-haiku-4-5).
Related vulnerabilities
- CVE-2026-40983HIGHMicrometer gRPC Denial-of-Service Vulnerability
- CVE-2026-40984HIGHMicrometer Denial-of-Service Vulnerability – HTTP Request Handling Flaw
- CVE-2026-44250HIGHNetty Redis Codec Denial-of-Service via Nested Array Memory Exhaustion
- CVE-2026-44890HIGHNetty Redis Codec Memory Exhaustion Denial of Service
- CVE-2026-45591HIGHASP.NET Core Remote Denial-of-Service Vulnerability – Patch Guidance
- CVE-2026-49361HIGHApache Fluss Remote Denial of Service via Oversized Frame
- CVE-2026-50011HIGHNetty Redis Memory Exhaustion Denial of Service
- CVE-2026-5497HIGHvLLM Out-of-Memory DoS Vulnerability in Video Frame Processing