Time-of-check Time-of-use (TOCTOU) Race Condition Affecting undici package, versions <6.27.0>=7.0.0 <7.28.0>=8.0.0 <8.5.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.22% (13th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-UNDICI-17372752
  • published18 Jun 2026
  • disclosed17 Jun 2026
  • creditUnknown

Introduced: 17 Jun 2026

CVE-2026-6733  (opens in a new tab)
CWE-367  (opens in a new tab)

How to fix?

Upgrade undici to version 6.27.0, 7.28.0, 8.5.0 or higher.

Overview

undici is an An HTTP/1.1 client, written from scratch for Node.js

Affected versions of this package are vulnerable to Time-of-check Time-of-use (TOCTOU) Race Condition in the HTTP/1.1 client when an attacker-controlled upstream server injects an unsolicited response onto an idle keep-alive socket after a request completes. An attacker can cause responses to be delivered to the wrong requests by sending crafted HTTP responses through a compromised or malicious upstream server.

Note: This is only exploitable if the upstream HTTP/1.1 server is attacker-controlled or compromised and keep-alive connection reuse is enabled.

Workaround

This vulnerability can be mitigated by disabling keep-alive connection reuse by setting keepAliveTimeout: 0 on the Client or Pool.

CVSS Base Scores

version 4.0
version 3.1