Junglewise Threat Intelligence

CVE-2026-85008: undici cache interceptor unsafe HTTP method caching

CVE-2026-85008 · Severity: low · CVSS 3.7 · Published 2026-09-04

Executive brief

undici is a popular Node.js HTTP client library. Its cache interceptor is documented to cache only safe HTTP methods (GET, HEAD), but due to a logic error, it also inadvertently caches responses to state-changing requests (POST, PUT, DELETE). A malicious web server can send cacheable response headers that cause undici to store and replay responses to these unsafe requests, preventing state-changing operations from reaching the origin and causing potential data integrity issues.

Technical details

The vulnerability is a logic error in undici's cache interceptor (CWE-345: Insufficient Verification of Data Authenticity). The skip-list for methods to exclude from caching is built by subtracting configured methods from the set of safe methods; since unsafe methods (POST, PUT, PATCH, DELETE) are not in the safe set, they are never added to the skip-list and fall through to the cache-read path. Additionally, the response-storage gate (canCacheResponse) lacked a method check, allowing responses to unsafe requests to be cached if they have heuristically-cacheable status codes (e.g., 404) or explicit Cache-Control directives. An untrusted origin can trigger this by responding with appropriate Cache-Control headers, causing subsequent identical requests to be served from cache without contacting the origin. The attack requires no privileges or user interaction and occurs at the network level. Patches are available in undici versions 7.29.1 and 8.10.2.

Affected products

  • OpenJS Foundation undici 7.0.0 to 7.29.0, 8.0.0 to 8.10.1

Timeline

  • 2026-09-04: disclosed

References