CVE-2026-123864
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Node.js is a JavaScript runtime built on Chrome's V8 JavaScript engine. It uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, and it is widely used for web applications and server-side development.
An information exposure vulnerability (CVE-2026-123864) has been identified in the Node.js HTTPS server, which allows unauthenticated clients to read server heap memory belonging to other connections, including TLS private keys and other users' requests. The same flaw can also cause the server process to abort.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
This issue affects all versions of Node.js prior to 22.23.5, 24.22.3 and 26.13.1.
Details
Module Info
- Product: Node.js
- Affected packages:
node - Affected versions: <22.23.5, >=23.0.0 <24.22.3, >=25.0.0 <26.13.1
- GitHub repository: https://github.com/nodejs/node
- Published packages: https://github.com/nodejs/node/releases/tag/v20.20.2
- Package manager: Not applicable. Node.js is distributed as runtime builds from nodejs.org rather than as a published npm package.
- Fixed in:
- OSS Node.js 22.23.5, 24.22.3, 26.13.1
- NES for Node.js v12.22.22, v14.21.15, v16.20.17, v18.20.21, v20.20.6
Vulnerability Info
This High-severity vulnerability is found in the node package in all versions of Node.js prior to 22.23.5, 24.22.3 and 26.13.1. It sits where the TLS socket wrapper meets the HTTP parser: TLSWrap in src/crypto/crypto_tls.cc and the Parser class in src/node_http_parser.cc.
When TLSWrap::DoWrite() is asked to write zero bytes, it calls ClearOut() directly to flush any pending TLS output:
if (length == 0) {
Debug(this, "Empty write");
ClearOut();
if (BIO_pending(enc_out_) == 0) {
Debug(this, "No pending encrypted output, writing to underlying stream");
CHECK(!current_empty_write_);
current_empty_write_.reset(w->GetAsyncWrap());ClearOut() decrypts the next TLS record that has already arrived and hands it to the socket's stream listener. Nothing checks whether the write was issued from JavaScript that is already running inside Cycle(), the loop that delivers decrypted data to that same listener. On an HTTPS server the listener is the HTTP parser. If a request handler has called res.flushHeaders() before the request body ends and later calls res.end() with a non-empty chunk, the resulting zero-length socket write can run from the parser's on_body callback. ClearOut() then feeds the next record to the parser while it is still in the middle of the current body, and llhttp_execute() runs re-entrantly inside itself.
The parser does not protect its buffer against this nesting. Parser::Execute() records the buffer it is parsing and simply clears it on return instead of restoring the caller's buffer:
Local<Value> Execute(const char* data, size_t len) {
EscapableHandleScope scope(env()->isolate());
current_buffer_len_ = len;
current_buffer_data_ = data;
got_exception_ = false;
// ...
current_buffer_len_ = 0;
current_buffer_data_ = nullptr;The data callbacks (on_body and the other span callbacks) accept whatever at and length llhttp passes them, without checking that the span lies inside the buffer currently being executed. The nested llhttp_execute() call can stop in the middle of a body chunk and leave the parser's open span pointing into its own buffer, which is freed when the nested call returns. The outer call then reports that span against its own buffer, a use-after-free and out-of-bounds heap read. The server copies the freed or unrelated heap memory into the request body that the application sees. Any route that echoes or stores a request body then returns that memory to the client, which can include data from other connections such as TLS private keys and other users' requests. In other cases the process aborts. Cleartext node:http servers are not affected.
Mitigation
Node.js release lines prior to v22 are End-of-Life and will not receive any upstream updates to address this issue. For more information see here. The odd-numbered v23 and v25 release lines are End-of-Life as well.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a supported Node.js release that carries the fix (v22.23.5, v24.22.3 or v26.13.1 or later).
- Migrate affected applications away from the End-of-Life Node.js release lines.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
- Chris Rohlf in collaboration with Claude and Anthropic Research (finder)