CVE-2026-123828
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.
A denial of service vulnerability (CVE-2026-123828) has been identified in the Node.js HTTP/2 module, which allows remote, unauthenticated attackers to crash a server that passes a request-controlled origin, such as the :authority header, to session.altsvc(). The one-byte out-of-bounds heap write behind the crash can also serve as a heap-corruption primitive.
Per OWASP: The Denial of Service (DoS) attack is focused on making a resource (site, application, server) unavailable for the purpose it was designed.
This issue affects multiple versions of Node.js.
Details
Module Info
- Product: Node.js
- Affected packages:
node(built-in http2 module; src/node_http2.cc) - Affected versions: >=24.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/v24.22.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 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 Medium-severity vulnerability is found in the node package in multiple versions of Node.js. An HTTP/2 server sends an ALTSVC frame with ServerHttp2Session.altsvc(alt, originOrStream). When originOrStream is a string, the JavaScript layer reduces it to its URL origin, checks the characters of alt and that the origin and the alt value together stay within the 16,382-byte ALTSVC limit, but puts no smaller bound on either string, and hands both strings to the native Http2Session::AltSvc in src/node_http2.cc.
The native method allocates each buffer at exactly the string's length and then asks V8 to copy the string with a trailing null terminator:
MaybeStackBuffer<uint8_t> origin(origin_len);
MaybeStackBuffer<uint8_t> value(value_len);
origin_str->WriteOneByteV2(env->isolate(),
0,
origin_len,
*origin,
String::WriteFlags::kNullTerminate);
value_str->WriteOneByteV2(
env->isolate(), 0, value_len, *value, String::WriteFlags::kNullTerminate);
The terminator lands at buffer[len], one byte past the end of the buffer. MaybeStackBuffer keeps up to 1024 bytes inline and allocates exactly len bytes on the heap for anything longer, so an origin or value over 1024 characters turns the extra byte into a heap buffer overflow. The terminator is not even needed, because the session passes explicit lengths to nghttp2.
The End-of-Life 12.x, 14.x, 16.x, 18.x and 20.x release lines contain the same allocation and copy the strings with the older V8 call:
MaybeStackBuffer<uint8_t> origin(origin_len);
MaybeStackBuffer<uint8_t> value(value_len);
origin_str->WriteOneByte(env->isolate(), *origin);
value_str->WriteOneByte(env->isolate(), *value);
With its default arguments (length -1, no NO_NULL_TERMINATION flag), WriteOneByte also writes a null terminator after the last character, producing the same one-byte overflow.
An application that passes an attacker-controlled value, such as a request's :authority header, to session.altsvc() lets a single request with a long but syntactically valid :authority trigger the out-of-bounds write. That aborts the process, and the write corrupts heap memory next to the allocation.
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 Node.js 25.x release line is also End-of-Life.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a supported Node.js release that carries the fix (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
- zonduu (finder)