CVE-2026-105481: Node.js keep-alive socket processes a response that was written before the request was sent
CVE-2026-105481 is a medium-severity Node.js HTTP client flaw. The http.Agent reuses idle keep-alive sockets, and it could give a new request a socket on which the server had already sent bytes. Node.js then treated those early bytes as the response to the new request. A malicious or compromised server can use this to answer requests it has not seen yet. Update to Node.js 22.23.4, 24.22.1 or 26.12.1.
Published Oct 21, 2026 · Analysis Oct 21, 2026
What an attacker can do
Keep-alive lets an HTTP client send several requests over one TCP or TLS connection. Between requests the socket sits in the agent's free pool. The data guard that should catch unexpected bytes on an idle socket relied on I/O happening first, so data the server wrote while the socket was idle could stay unnoticed. When the next request took that socket, Node.js parsed the waiting bytes as its response.
The effect is response desynchronization from the client's point of view. A server that the client talks to, or anything able to write into that connection, can pre-load a response and have it attached to whatever request comes next, which may be a different user's request in a shared service or a call to a different path on the same host. Results range from wrong data and cache poisoning in proxies to leaking one caller's response to another. Exploitation needs a hostile or compromised upstream, or a proxy in the path; ordinary trusted backends do not send unsolicited bytes. The fix checks with the operating system whether anything is waiting to be read, without consuming it, and discards such sockets.
Who is affected
Affected: Node.js 22.x before 22.23.4, 24.x before 24.22.1 and 26.x before 26.12.1. Keep-alive is on by default for http.globalAgent in current Node.js lines, so most HTTP clients built on the http and https modules use socket reuse. Check versions with:
node -v
npx --yes envinfo --binaries 2>/dev/null | grep -i node
docker run --rm <your-image> node -vServices most at risk call upstreams they do not fully trust, or act as proxies or gateways for many users.
How to fix it
Upgrade to Node.js 22.23.4, 24.22.1 or 26.12.1 and restart the services. The fixed agent destroys a socket with pending data and opens a new connection, so expect slightly more connection churn against servers that misbehave.
If you cannot upgrade, disable keep-alive for agents that talk to untrusted upstreams, for example new http.Agent({ keepAlive: false }), at the cost of more connections.
How to tell if you were hit
Signs are responses that do not match their requests: wrong content types, bodies for a different path, or one user seeing another user's data from a shared backend client. Compare upstream access logs with client logs; a response delivered to the client for a request that never reached the upstream log points at a pre-sent response.
Original advisory
From the National Vulnerability Database. This product uses the NVD API but is not endorsed or certified by the NVD.
The Node.js HTTP Agent could hand a kept-alive socket to a new request even though the server had already written data on it, so that data was read as the response to the new request. The fix asks the operating system whether bytes are waiting on the socket before reuse and, if so, destroys it and uses another connection. Affected: Node.js 22.x before 22.23.4, 24.x before 24.22.1 and 26.x before 26.12.1. Fixed in Node.js 22.23.4, 24.22.1 and 26.12.1, released October 21, 2026.
Credited to hasanfleyah.
Questions
- Does CVE-2026-105481 affect fetch() in Node.js?
The advisory and fix are in the http module's Agent (lib/_http_agent.js). Node.js fetch is built on undici, which has its own connection pool and was updated separately in this release. Upgrade Node.js either way to get both.
- Can a normal trusted API exploit this Node.js bug?
Only if it misbehaves or is compromised. The bug needs bytes written on an idle connection before the next request, which well-behaved servers do not send. The risk is highest when calling third-party or user-chosen upstreams, or when a proxy sits in the path.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology
Coverage on the Beam blog
More Node.js vulnerabilities
All Node.js entriesCVE-2026-105482
Node.js dns.resolve truncates names containing NUL char
highOct 21, 2026CVE-2026-105483
Node.js TLS certificate hostname bypass when the IP is written fullwidth digits
highOct 21, 2026CVE-2026-106069
Node.js TLS certificate hostname bypass when the host loosely resolves to an IP address
highOct 21, 2026CVE-2026-106070
Node.js ZipFile returns attacker-controlled prefix bytes after failed ZIP header validation
lowOct 21, 2026CVE-2026-106071
Node.js Permission Model filesystem over-grant via wildcard radix lookup
lowOct 21, 2026CVE-2026-106072
Node.js improper certificate validation for non-canonical IPv4 hostnames allows DNS SANs to authenticate IP endpoints
mediumOct 21, 2026
