Skip to main content
Menu
Advisories

undici vulnerable to Denial of Service via reachable assertion in the HTTP/1.1 response parser

GHSA-H5RF-4XRF-76MCPublished Updated GitHub

Description

Impact

undici's HTTP/1.1 client asserts that the response parser is not paused when the connection ends. The parser is paused while the application applies backpressure to a response body, so a server that sends a response large enough to fill the body buffer (64 KiB) and then closes or resets the connection triggers an AssertionError from inside a socket event listener. The error is thrown outside any promise or 'error' event the application can handle, so it becomes an uncaught exception and terminates the Node.js process.

A malicious or compromised server reached through undici, including request() and the global fetch(), can crash the client with a single response. The issue was introduced in undici 6.26.0, 7.26.0 and 8.3.0, and was fixed in 8.4.1 but not released on the 6.x and 7.x lines.

Patches

Upgrade to undici 6.29.2, 7.30.4 or 8.4.1.

Workarounds

No workaround is available. Upgrade to a patched version.

Affected versions

References

GitHub · nodejs/undici