# CVE-2026-123874: Node.js is vulnerable to an HTTP/2 use-after-free via respondWithFile() stream reset during a pending write

> Unauthenticated HTTP/2 clients can trigger a use-after-free in Node.js servers serving files with stream.respondWithFile, corrupting memory.

- **Severity:** High 7.5 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Harmful if only installed:** No
- **Needs a specific call:** Yes (`respondWithFile()`, `respondWithFD()`)
- **Fix available:** Yes
- **Published:** 11 Nov 2026
- **Updated:** 11 Nov 2026
- **Also known as:** ALPINE-CVE-2026-123874, BELL-CVE-2026-123874, DEBIAN-CVE-2026-123874, GHSA-vgqh-cxw6-x64x, UBUNTU-CVE-2026-123874

## What is CVE-2026-123874?

CVE-2026-123874 is a high-severity use after free vulnerability in nodejs node, published on 11 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

A use-after-free in Node.js HTTP/2 lets an unauthenticated client corrupt server memory, over both TLS and cleartext, when the server serves files with respondWithFile() or respondWithFD(). A client can make the server free an Http2Stream while a write request that points to it is still queued on the socket; when that write completes, the code dereferences and makes a virtual call through the freed object. The only precondition is that the application serves a file with stream.respondWithFile() or stream.respondWithFD(), with default settings otherwise. This vulnerability affects Node.js 26.x (since 26.9.0) and 24.x (since 24.22.0).

Weakness: CWE-416 (Use After Free)

## Which versions are affected by CVE-2026-123874?

An affected version is only exploitable if your software calls respondWithFile() or respondWithFD(). Many projects that include it are not exposed.


## How do I fix CVE-2026-123874?

Upgrade to a fixed version.

## Is CVE-2026-123874 being exploited?

There is no known exploitation of CVE-2026-123874 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-123874 and fix it if it is affected.

What it is: CVE-2026-123874 is a high-severity use after free vulnerability in nodejs node, published on 11 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-123874 in the wild and no public exploit code.
Exposure: An affected version is only exploitable if your software calls respondWithFile() or respondWithFD(). Many projects that include it are not exposed.

Affected product: nodejs node. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
   If an affected version is present, also search the code for calls to respondWithFile() or respondWithFD() and report whether any exist.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-123874/ (Markdown: https://insights.sbomify.com/CVE-2026-123874/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-123874
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-123874
- OSV: https://osv.dev/vulnerability/CVE-2026-123874

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-123874/
Summaries are generated and may contain mistakes; the official description above is the record.
