NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2026-109924: undici vulnerable to Denial of Service via unbounded memory in the EventSource parser

mediumCVSS 3.1 5.9GHSA-4qv8-2p9j-2685

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 undici

undici

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

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 entries