fix: bump ws to >=8.21.0 to resolve CVE-2026-48779 (GHSA-96hv-2xvq-fx4p)#2007
Draft
mikeharder with Copilot wants to merge 2 commits into
Draft
fix: bump ws to >=8.21.0 to resolve CVE-2026-48779 (GHSA-96hv-2xvq-fx4p)#2007mikeharder with Copilot wants to merge 2 commits into
mikeharder with Copilot wants to merge 2 commits into
Conversation
Copilot
AI
changed the title
[WIP] Fix memory exhaustion DoS vulnerability in ws
fix: bump ws to >=8.21.0 to resolve CVE-2026-48779 (GHSA-96hv-2xvq-fx4p)
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ws@8.20.1(transitive via@typespec/tspd → @alloy-js/core) is vulnerable to a memory-exhaustion DoS caused by high-volume tiny WebSocket fragments (fixed inws@8.21.0).Changes
pnpm-workspace.yaml— addsws: ">=8.21.0"override; also migrates all pre-existing overrides (lodash,yaml,picomatch,brace-expansion,underscore) frompackage.jsonhere, which is the correct location for pnpm 10 (pnpm 10 emits a warning and ignorespnpm.overridesinpackage.json)package.json— removes the now-dead"pnpm": { "overrides": { … } }blockpnpm-lock.yaml— regenerated;ws@8.20.1fully replaced byws@8.21.0Reachability
Not directly reachable (high confidence).
wsis used internally by@alloy-js/corefor its dev-server channel — no code in this repo creates aWebSocketServeror importswsdirectly. The vulnerability requires an attacker-controlled WebSocket peer to send crafted frames to a listening server. Risk is limited to theregen-docsdev script; no production or CI-critical path is exposed.Original prompt
This section details the Dependabot vulnerability alert you should resolve
<alert_title>ws: Memory exhaustion DoS from tiny fragments and data chunks</alert_title>
<alert_description>### Impact
A high volume of exceptionally small fragments and data chunks can be sent by a peer, 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.
Proof of concept
Patches
The vulnerability was fixed in ws@8.21.0 (websockets/ws@bca91ad) and backported to ws@7.5.11 (websockets/ws@fd36cd8), ws@6.2.4 (websockets/ws@86d3e8a), and ws@5.2.5 (websockets/ws@b5372ac).
Workarounds
In vulnerable versions, the issue can be mitigated by lowering the value of the
maxPayloadoption if possible.Credits
The vulnerability was responsibly disclosed and fixed by Nadav Magier.</alert_description>
high
https://github.com/websockets/ws/security/advisories/GHSA-96hv-2xvq-fx4p https://github.com/websockets/ws/commit/86d3e8a5fb0246ed373860c5fbb0de88824a27f7 https://github.com/websockets/ws/commit/b5372ac67bb97a773727b8e9f5035a8123556d53 https://github.com/websockets/ws/commit/bca91adf15677e47dbe4f959653452727be28b94 https://github.com/websockets/ws/commit/fd36cd864fcdf62a08273a99e19a7d975401fee8 https://github.com/advisories/GHSA-96hv-2xvq-fx4pGHSA-96hv-2xvq-fx4p, CVE-2026-48779
ws
npm
<vulnerable_versions>8.20.1</vulnerable_versions>
<patched_version>8.21.0</patched_version>
<manifest_path>pnpm-lock.yaml</manifest_path>
<task_instructions>Resolve this alert by updating the affected package to a non-vulnerable version. Prefer the lowest non-vulnerable version (see the patched_version field above) over the latest to minimize breaking changes. Include a Reachability Assessment section in the PR description. Review the alert_description field to understand which APIs, features, or configurations are affected, then search the codebase for usage of those specific items. If the vulnerable code path is reachable, explain how (which files, APIs, or call sites use the affected functionality) and note that the codebase is actively exposed to this vulnerability. If the vulnerable code path is not reachable, explain why (e.g. the affected API is never called, the vulnerable configuration is not used) and note that the update is primarily to satisfy vulnerability scanners rather than to address an active risk. If the advisory is too vague to determine reachability (e.g. 'improper input validation' with no specific API named), state that reachability could not be determined and explain why. Include a confidence level in the reachability assessment (e.g. high confidence if the advisory names a specific API and you confirmed it is or is not called, low confidence if the usage is indirect and hard to trace). If no patched version is available, check the alert_description field for a Workarounds section — the advisory may describe configuration changes or usage patterns that mitigate the vulnerability without a version update. If a workaround is available, apply it and leave a code comment referencing the advisory identifier explaining it is a temporary mitigation. If neither a patch nor a workaround is available, explain in the PR description why the alert cannot be resolved automatically so a human reviewer can take over. Inspect the repository to determine which package manager is used (e.g. lock files, config files, build scripts) and use that tooling to perform the update — do not edit lock files directly. If the version constraint in the manifest (e.g. package.json, Gemfile, pyproject.toml) caps the version below the f...