# CVE-2026-45736: ws: Uninitialized memory disclosure

> An attacker can disclose uninitialized memory by passing a TypedArray as the reason argument to websocket.close() in the ws library.

- **Severity:** Medium 4.4 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 15 May 2026
- **Updated:** 11 Sep 2026
- **Also known as:** CLEANSTART-2026-OF42288, CLSA-2026-1784596293, CLSA-2026-1784596324, CLSA-2026-1790200934, CLSA-2026-1790202672, CLSA-2026-1790413013, DEBIAN-CVE-2026-45736, ECHO-e77b-eb12-9d68, GHSA-58qx-3vcg-4xpx, MINI-2f9f-x5g4-mfv2, MINI-2j72-jrgh-qhqr, MINI-3fr4-3289-4j8j, MINI-44j8-x7w5-x827, MINI-5226-xr6v-9c4j, MINI-55pp-xp9m-c89r, MINI-58gv-jxqg-749w, MINI-5j26-j4g3-h72j, MINI-6882-8v6h-prp4, MINI-7vcp-376h-3889, MINI-8957-7vjf-5h2c, MINI-9544-4382-gpcf, MINI-c2f9-jcxv-58gr, MINI-fgc8-rm3f-r8jm, MINI-fh47-jrrr-57m4, MINI-g94q-x7p9-6mwh, MINI-gwm7-qj9p-r3v6, MINI-hpgq-53hq-5hfx, MINI-jmw8-7qgg-xqw5, MINI-m3jf-9xfh-c35v, MINI-m4rq-q67j-j47r, MINI-m7jj-w2hg-jrrm, MINI-mppw-vrmc-3qhp, MINI-mrwr-r24p-pfj3, MINI-mx28-3424-f2qf, MINI-r5cc-46vf-626j, MINI-v5jr-h4qc-mfjc, MINI-whf9-pqm7-mjvx, MINI-x4jf-3v3g-m69g, MINI-xghv-x3mm-c66w, MINI-xq59-hvg4-pxp5, ROOT-APP-NPM-CVE-2026-45736, UBUNTU-CVE-2026-45736, openSUSE-SU-2026:11952-1

## What is CVE-2026-45736?

CVE-2026-45736 is a medium-severity vulnerability in websockets ws, published on 15 May 2026. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

ws is an open source WebSocket client and server for Node.js. Prior to 8.20.1, the websocket.close() implementation is vulnerable to uninitialized memory disclosure when a TypedArray is passed as the reason argument. This vulnerability is fixed in 8.20.1.

Weakness: CWE-824 (Access of Uninitialized Pointer), CWE-908 (Use of Uninitialized Resource)

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

2 open source packages ship an affected version, including ws. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ws` | npm | From 8.0.0 | 8.20.1 |
| `ws` | npm | From 8.0.0 | 8.20.1 |
| `zcode` | openSUSE:Tumbleweed | All versions | 3.14.3-1.1 |

Products: Ws Project Ws.

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

Upgrade ws to 8.20.1 or later.

## Is CVE-2026-45736 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45736 exists.

## Other vulnerabilities in websockets ws

- [CVE-2026-48779](https://insights.sbomify.com/CVE-2026-48779/): ws: Memory exhaustion DoS from tiny fragments and data chunks (high 7.5)
- [CVE-2016-10518](https://insights.sbomify.com/CVE-2016-10518/): Remote Memory Disclosure in ws (high 7.5)
- [CVE-2016-10542](https://insights.sbomify.com/CVE-2016-10542/): DoS due to excessively large websocket message in ws (high 7.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-45736 is a medium-severity vulnerability in websockets ws, published on 15 May 2026. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-45736 exists.

Affected packages and fixed versions:
- ws (npm): affected from 8.0.0; fixed in 8.20.1
- ws (npm): affected from 8.0.0; fixed in 8.20.1

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.
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-45736/ (Markdown: https://insights.sbomify.com/CVE-2026-45736/index.md)
```

## Sources

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

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