{"id":"CVE-2026-12151","kind":"vulnerability","aliases":["CVE-2026-12151","GHSA-vxpw-j846-p89q"],"related":[],"title":"undici WebSocket client vulnerable to denial of service via fragment count bypass","description":"## Impact\n\nThe undici WebSocket client enforces `maxPayloadSize` on the cumulative byte count of fragments in a message but does not enforce a limit on the number of fragments. A malicious WebSocket server can stream many small or empty continuation frames that each pass per-frame and cumulative-size validation, collectively causing unbounded memory growth in the client process. The result is memory exhaustion and a denial of service.\n\nAffected applications are those using the undici WebSocket client (`new WebSocket(...)`) or the `WebSocketStream` API that can be induced to connect to an attacker-controlled or compromised WebSocket endpoint.\n\nAll releases starting at undici 6.17.0 are affected.\n\n## Patches\n\nUpgrade to undici v6.27.0, v7.28.0 or v8.5.0.\n\n## Workarounds\n\nNo workaround is available. The fix must be applied through an upgrade.","summary":"The undici WebSocket client caps the total byte size of a message but not the number of fragments, so a malicious server can stream many tiny continuation frames. The client's memory grows without bound and the process can be exhausted into a denial of service.","severity":"high","cvss":7.5,"epss":0.00789,"exploited":false,"exploited_at":null,"products":[{"name":"undici","fixed":["6.27.0"],"affected":"< 6.27.0","ecosystem":"npm"},{"name":"undici","fixed":["7.28.0"],"affected":">= 7.0.0, < 7.28.0","ecosystem":"npm"},{"name":"undici","fixed":["8.5.0"],"affected":">= 8.0.0, < 8.5.0","ecosystem":"npm"},{"name":"nodejs undici","fixed":["6.27.0"],"affected":">= 6.17.0, < 6.27.0","ecosystem":"vendor"},{"name":"nodejs undici","fixed":["7.28.0"],"affected":">= 7.0.0, < 7.28.0","ecosystem":"vendor"},{"name":"nodejs undici","fixed":["8.5.0"],"affected":">= 8.0.0, < 8.5.0","ecosystem":"vendor"}],"ecosystems":["npm","vendor"],"tags":["cwe-400","cwe-770","node.js","npm","package","undici","websocket"],"not_affected_if":["no-websocket-client-use","trusted-endpoints-only"],"how_to_check":"- Run `npm ls undici` in the project and check whether any resolved version falls in the affected ranges below.\n- Check whether the app uses `new WebSocket(...)` or `WebSocketStream` from undici to connect to endpoints it does not fully control.","fix":"- Upgrade undici to `6.27.0` on the 6.x line.\n- Upgrade undici to `7.28.0` on the 7.x line.\n- Upgrade undici to `8.5.0` on the 8.x line.","status":"open","published_at":"2026-06-17T17:16:42+00:00","first_seen_at":"2026-11-04T03:41:23+00:00","triaged_at":"2026-11-04T03:43:05+00:00","updated_at":"2026-11-04T03:46:40+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-04T03:43:05Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade undici to `6.27.0` on the 6.x line.\n- Upgrade undici to `7.28.0` on the 7.x line.\n- Upgrade undici to `8.5.0` on the 8.x line.","reach":"internet","title":"undici: WebSocket client memory exhaustion from unlimited continuation fragments","impact":"medium","summary":"The undici WebSocket client caps the total byte size of a message but not the number of fragments, so a malicious server can stream many tiny continuation frames. The client's memory grows without bound and the process can be exhausted into a denial of service.","audience":"developers","category":"package","nicknames":[],"who_cares":["node.js","undici","websocket","npm"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"Client process memory exhausted, causing denial of service","analyst_note":"","how_to_check":"- Run `npm ls undici` in the project and check whether any resolved version falls in the affected ranges below.\n- Check whether the app uses `new WebSocket(...)` or `WebSocketStream` from undici to connect to endpoints it does not fully control.","plain_action":"","needs_analyst":false,"not_affected_if":["no-websocket-client-use","trusted-endpoints-only"],"who_is_affected":"Applications that use the undici WebSocket client or WebSocketStream to connect to a WebSocket server that could be attacker-controlled or compromised. The sources say all releases from 6.17.0 onward are affected. No workaround is given, so the fix is an upgrade.","user_interaction":"no","needs_special_setup":"no","severity_if_unknown":"high"},"cost_usd":0.000746,"input_tokens":4580,"output_tokens":575,"severity_before":"high"},"analyst_status":null,"analyst_note":null,"search":"'-12151':15A,23A '-2026':14A,22A '-400':34B '-770':36B '6.17.0':193C 'affect':158C,195C 'api':172C 'appli':213C 'applic':159C 'attack':182C 'attacker-control':181C 'avail':208C 'bound':76B 'bypass':12A 'byte':49B,98C 'cap':46B 'caus':140C 'client':3A,45B,71B,92C,146C,166C 'collect':139C 'compromis':185C 'connect':178C 'continu':68B,126C 'control':183C 'count':11A,99C 'cumul':97C,136C 'cumulative-s':135C 'cve':13A,21A 'cwe':33B,35B 'denial':6A,85B,155C 'empti':125C 'endpoint':187C 'enforc':93C,108C 'exhaust':82B,152C 'fix':210C 'fragment':10A,59B,101C,115C 'frame':69B,127C,133C 'ghsa':17A 'ghsa-vxpw-j846-p89q':16A 'grow':74B 'growth':143C 'impact':88C 'induc':176C 'j846':19A 'limit':110C 'malici':62B,117C 'mani':66B,122C 'maxpayloads':94C 'memori':73B,142C,151C 'messag':53B,104C 'must':211C 'new':167C 'node.js':37B 'nodejs':27A,29A,31A 'npm':38B 'number':57B,113C 'p89q':20A 'packag':39B 'pass':130C 'patch':196C 'per':132C 'per-fram':131C 'process':79B,147C 'releas':189C 'result':149C 'server':63B,119C 'servic':8A,87B,157C 'size':50B,137C 'small':123C 'start':190C 'stream':65B,121C 'tini':67B 'total':48B 'unbound':141C 'undici':1A,24A,25A,26A,28A,30A,32A,40B,43B,90C,164C,192C,199C 'upgrad':197C,216C 'use':162C 'v6.27.0':200C 'v7.28.0':201C 'v8.5.0':203C 'valid':138C 'via':9A 'vulner':4A 'vxpw':18A 'websocket':2A,41B,44B,91C,118C,165C,168C,186C 'websocketstream':171C 'without':75B 'workaround':204C,206C","nicknames":[],"mitigations":[],"who_affected":"Applications that use the undici WebSocket client or WebSocketStream to connect to a WebSocket server that could be attacker-controlled or compromised. The sources say all releases from 6.17.0 onward are affected. No workaround is given, so the fix is an upgrade.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["nodejsundici","undici"],"ptokens":["nodejs","undici"],"labels":["cwe400","cwe770","high","nodejs","npm","package","undici","vendor","websocket"],"campaign_type":null,"first_public_at":"2026-06-17T12:37:40+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-vxpw-j846-p89q","url":"https://github.com/advisories/GHSA-vxpw-j846-p89q","severity":"high","published_at":"2026-06-19T14:22:01+00:00","modified_at":"2026-11-04T03:37:10+00:00","first_seen_at":"2026-11-04T03:41:23+00:00","fetched_at":"2026-11-04T03:46:30+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-12151","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-12151","severity":null,"published_at":"2026-06-17T17:16:42+00:00","modified_at":"2026-09-11T13:17:05+00:00","first_seen_at":"2026-11-04T03:46:40+00:00","fetched_at":"2026-11-04T03:46:40+00:00","note":null}],"documents":[{"id":58431,"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-121513","title":"NVD CVE-2026-121513","kind":"advisory","source":"analyst","publisher":null,"text":null,"published_at":null,"relation":"advisory","confidence":null,"note":null},{"id":58433,"url":"https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-121511","title":"NVD record CVE-2026-121511 (CNA: GitLab, affected <0.15.2)","kind":"advisory","source":"analyst","publisher":null,"text":null,"published_at":null,"relation":"advisory","confidence":null,"note":null},{"id":63632,"url":"https://api.github.com/repos/nodejs/undici/security-advisories/GHSA-vxpw-j846-p89q","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"},{"id":63633,"url":"https://github.com/nodejs/undici/security/advisories/GHSA-vxpw-j846-p89q","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2026-06-17T12:37:40+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":63634,"url":"https://github.com/nodejs/undici/commit/32dbf0b3dd93daf6d87badf506d52e89f2e20e78","title":"Patch: github.com","kind":"other","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":63635,"url":"https://github.com/nodejs/undici/releases/tag/v6.27.0","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"},{"id":63636,"url":"https://github.com/nodejs/undici/releases/tag/v7.28.0","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"},{"id":63637,"url":"https://github.com/nodejs/undici/releases/tag/v8.5.0","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"},{"id":43381,"url":"https://cna.openjsf.org/security-advisories.html","title":"Vendor advisory: cna.openjsf.org","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Vendor advisory: cna.openjsf.org"}],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}