CVE-2026-109924: undici vulnerable to Denial of Service via unbounded memory in the EventSource parser
undici's EventSource client can be driven to exhaust process memory by a malicious or compromised Server-Sent Events server. The parser keeps growing state that the size limits do not bound. Affects undici 6.5.0 up to 6.29.0, 7.x before 7.30.1 and 8.x before 8.12.2. There is no workaround.
Published Oct 23, 2026 · Analysis Nov 2, 2026
What an attacker can do
A hostile SSE server can send millions of tiny, complete data: fields with no blank line to end the event. It can also send one unfinished line split across many chunks. In both cases the parser retains state per field or per chunk, and that state grows without a limit.
The existing byte-based maxEventSize and maxResponseSize settings do not bound this retained state. maxResponseSize is also enforced on the compressed body before decompression, so a small compressed response can expand into enough retained memory to kill the process.
The victim only has to keep an EventSource connection open to the attacker's server. The attacker controls only the response. Typical cases are an app or agent that subscribes to a third-party event stream, or one that follows a user-supplied URL. The only effect is on availability: the Node.js process runs out of memory and ends. The CVSS vector rates attack complexity as high.
Who is affected
undici >= 6.5.0 and < 6.29.1, >= 7.0.0 and < 7.30.1, and >= 8.0.0 and < 8.12.2, in code that uses undici's EventSource against peers you do not control. Node.js ships its own copy of undici, so also review how your runtime handles EventSource.
npm ls undiciundici
- Ecosystem
- npm
- Affected
- >= 6.5.0, < 6.29.1
- Fixed in
- 6.29.1
- Check
npm ls undici
undici
- Ecosystem
- npm
- Affected
- >= 7.0.0, < 7.30.1
- Fixed in
- 7.30.1
- Check
npm ls undici
undici
- Ecosystem
- npm
- Affected
- >= 8.0.0, < 8.12.2
- Fixed in
- 8.12.2
- Check
npm ls undici
How to fix it
Upgrade to undici 6.29.1, 7.30.1 or 8.12.2, whichever matches your major version:
npm install [email protected]The patched releases cap the number of data fields and buffered chunks, the length of an unfinished line, and the per-field byte totals, independently of the byte limits. The advisory states there is no workaround. Until you upgrade, connect EventSource only to servers you trust.
How to tell if you were hit
Look for Node.js processes that grow in memory while an EventSource connection to a third-party host is open, followed by an out-of-memory crash or a restart by your supervisor. Review logs and metrics for the heap-limit fatal error near the time of a stream connection. Search your code for new EventSource calls and note which URLs they reach, and whether users can set them.
Original advisory
From the GitHub Advisory Database (CC BY 4.0).
Impact
undici's EventSource client can be driven to exhaust process memory by a malicious or compromised Server-Sent Events peer. By sending millions of tiny completed data: fields with no blank event separator, or a single unfinished line split across many chunks, the parser retains a growing amount of per-field and per-chunk state. The byte-based maxEventSize and maxResponseSize limits do not bound that retained state, and maxResponseSize is enforced on the compressed body before decompression, so a small compressed response can expand into enough retained memory to terminate the process. The application only needs to maintain an EventSource connection to an untrusted peer, which controls only the response. Availability is the only impact.
Patches
Upgrade to 6.29.1, 7.30.1, or 8.12.2, which bound the retained EventSource parser state (the number of data fields and buffered chunks, the unfinished-line length, and per-field byte totals) independently of the byte limits.
Workarounds
None.
Credited to iamibi, mcollina, UlisesGascon.
Questions
- Do the maxEventSize and maxResponseSize settings protect me?
No. They are byte-based and do not bound the retained parser state. maxResponseSize is also checked on the compressed body before decompression.
- Is there a workaround?
The advisory says none. Upgrade to 6.29.1, 7.30.1 or 8.12.2, or avoid connecting EventSource to untrusted peers.
- Can this run code or leak data?
No. Availability is the only impact, per the advisory. The attacker crashes the process by exhausting its memory.
References
Read for this analysis:
- https://github.com/nodejs/undici/security/advisories/GHSA-4qv8-2p9j-2685
- https://github.com/nodejs/undici/releases/tag/v7.30.1
- https://nvd.nist.gov/vuln/detail/CVE-2026-109924
- https://github.com/nodejs/undici/commit/299162740d5f39120092277e70efacb4d151c1c6
- https://github.com/nodejs/undici/commit/789ef26461c648480433846607154f52d74ec9ab
- https://github.com/nodejs/undici/commit/c43b23fdc6b37e1283d4347408bb16800f867d9e
- https://cna.openjsf.org/security-advisories.html
- https://github.com/nodejs/undici/releases/tag/v6.29.1
- https://github.com/nodejs/undici/releases/tag/v8.12.2
- https://github.com/advisories/GHSA-4qv8-2p9j-2685
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
More npm vulnerabilities
All npm entriesCVE-2026-109383
undici vulnerable to TLS certificate validation bypass via dropped tls options in Agent
high7.4Oct 27, 2026CVE-2026-109829
undici vulnerable to cache poisoning and cross-user disclosure via cross-origin redirects
high7.4Oct 27, 2026CVE-2026-109855
undici WebSocket client vulnerable to Denial of Service via failed HTTP/2 handshake
high7.5Oct 27, 2026CVE-2026-109932
undici WebSocket client vulnerable to Denial of Service via unbounded automatic PONG buffering
medium5.9Oct 27, 2026CVE-2026-87018
undici vulnerable to Denial of Service via TLS 1.2 certificate-changing renegotiation
high7.5Oct 27, 2026CVE-2026-87029
undici vulnerable to Denial of Service via unhandled exception in the decompress interceptor
medium5.9Oct 27, 2026
