---
id: "CVE-2026-120222"
page: "https://infrastack.ai/live/CVE-2026-120222"
kind: "vulnerability"
aliases: ["CVE-2026-120222"]
title: "undici: a malicious server can crash Node.js clients via cache replay"
severity: "medium"
cvss: 5.9
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["node.js", "npm", "package", "undici"]
not_affected_if: ["default-config", "no-cache-interceptor"]
published_at: "2026-11-06T10:16:36+00:00"
first_seen_at: "2026-11-06T10:40:56+00:00"
updated_at: "2026-11-06T10:41:21+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-120222", "first_seen_at": "2026-11-06T10:40:56+00:00"}]
exploit_sources: []
---

# undici: a malicious server can crash Node.js clients via cache replay

Link for people: https://infrastack.ai/live/CVE-2026-120222 (this .md is for agents)

undici, the HTTP client library for Node.js, crashes the whole process when the cache interceptor is combined with a handler that throws during response processing and a cached response is replayed. A malicious or compromised HTTP server can trigger this by serving a cacheable response, causing a denial of service with no code execution.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed undici version with `npm ls undici` in the project.
- Look for use of the cache interceptor combined with the dump or decompress interceptors in the client setup.

## Fix

- Upgrade undici to `7.30.2` for the 7.x line.
- Upgrade undici to `8.12.4` for the 8.x line.

## Timeline

- 2026-11-06T10:40:56+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-120222

## Documents

- [advisory] Vendor advisory: github.com https://github.com/nodejs/undici/security/advisories/GHSA-3g9m-rv3r-w5w2

## From the sources

undici is an HTTP client for Node.js. In versions 7.0.0 through 7.30.1 and 8.0.0 through 8.12.3, when the cache interceptor is composed with a downstream handler that throws during response processing (such as the built-in dump interceptor exceeding its maxSize, or the decompress interceptor rejecting more than five Content-Encoding values), a throw raised asynchronously while a cached response is replayed escapes as an uncaught exception or unhandled promise rejection and terminates the Node.js process. A malicious or compromised HTTP server can crash any such client by serving a cacheable response that triggers the throw on replay, including on a 304 revalidation of a stale entry, so the impact is availability only. The issue is fixed in undici 7.30.2 and 8.12.4, and users should upgrade to one of those versions or later. As a workaround, avoid composing the cache interceptor with a response handler that throws during response processing until upgrading.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
