CVE-2026-45736
ADVISORY - githubSummary
Impact
The websocket.close() implementation is vulnerable to uninitialized memory disclosure when a TypedArray is passed as the reason argument.
Proof of concept
import { deepStrictEqual } from 'node:assert';
import { WebSocket, WebSocketServer } from 'ws';
const wss = new WebSocketServer(
{ port: 0, skipUTF8Validation: true },
function () {
const { port } = wss.address();
const ws = new WebSocket(`ws://localhost:${port}`, {
skipUTF8Validation: true
});
ws.on('close', function (code, reason) {
deepStrictEqual(reason, Buffer.alloc(80));
});
}
);
wss.on('connection', function (ws) {
ws.close(1000, new Float32Array(20));
});
Patches
The vulnerability was fixed in ws@8.20.1 (https://github.com/websockets/ws/commit/c0327ec15a54d701eb6ccefaa8bef328cfc03086).
Credits
Credit for the private and responsible disclosure of this issue goes to Nikita Skovoroda.
Remarks
Although the calculated CVSS severity is medium, the actual severity is believed to be low, as the flaw is only exploitable through misuse that is unlikely in practice.
Resources
Common Weakness Enumeration (CWE)
Use of Uninitialized Resource
Use of Uninitialized Resource
GitHub
0.7
CVSS SCORE
4.4medium| Package | Type | OS Name | OS Version | Affected Ranges | Fix Versions |
|---|---|---|---|---|---|
| ws | npm | - | - | >=8.0.0,<8.20.1 | 8.20.1 |
CVSS:3 Severity and metrics
The CVSS metrics represent different qualitative aspects of a vulnerability that impact the overall score, as defined by the CVSS Specification.
The vulnerable component is bound to the network stack, but the attack is limited at the protocol level to a logically adjacent topology. This can mean an attack must be launched from the same shared physical (e.g., Bluetooth or IEEE 802.11) or logical (e.g., local IP subnet) network, or from within a secure or otherwise limited administrative domain (e.g., MPLS, secure VPN to an administrative network zone). One example of an Adjacent attack would be an ARP (IPv4) or neighbor discovery (IPv6) flood leading to a denial of service on the local LAN segment (e.g., CVE-2013-6014).
A successful attack depends on conditions beyond the attacker's control, requiring investing a measurable amount of effort in research, preparation, or execution against the vulnerable component before a successful attack.
The attacker requires privileges that provide significant (e.g., administrative) control over the vulnerable component allowing access to component-wide settings and files.
The vulnerable system can be exploited without interaction from any user.
An exploited vulnerability can only affect resources managed by the same security authority. In this case, the vulnerable component and the impacted component are either the same, or both are managed by the same security authority.
There is a total loss of confidentiality, resulting in all resources within the impacted component being divulged to the attacker. Alternatively, access to only some restricted information is obtained, but the disclosed information presents a direct, serious impact. For example, an attacker steals the administrator's password, or private encryption keys of a web server.
There is no loss of trust or accuracy within the impacted component.
There is no impact to availability within the impacted component.
NIST
0.7
CVSS SCORE
4.4mediumDebian
-
Chainguard
CGA-342g-4fmm-4xmf
-
minimos
MINI-2f9f-x5g4-mfv2
-
minimos
MINI-55pp-xp9m-c89r
-
minimos
MINI-58gv-jxqg-749w
-
minimos
MINI-6882-8v6h-prp4
-
minimos
MINI-7vcp-376h-3889
-
minimos
MINI-8957-7vjf-5h2c
-
minimos
MINI-9544-4382-gpcf
-
minimos
MINI-jmw8-7qgg-xqw5
-
minimos
MINI-m3jf-9xfh-c35v
-
minimos
MINI-m4rq-q67j-j47r
-
minimos
MINI-v5jr-h4qc-mfjc
-