# CVE-2026-27889: NATS: Pre-auth remote server crash via WebSocket frame length overflow in wsRead

> Unauthenticated remote attackers can crash the NATS server via a WebSocket frame length overflow, requiring WebSockets to be enabled and exposed.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 25 Mar 2026
- **Updated:** 9 Sep 2026
- **Also known as:** BIT-nats-2026-27889, DEBIAN-CVE-2026-27889, ECHO-40be-1155-f2d0, GHSA-pq2q-rcw4-3hr6, GO-2026-4841, JLSEC-2026-1121, MINI-5943-p6xj-77jv, MINI-8qg3-2mqw-gjq4, MINI-c6fg-m5vh-7g69, MINI-h5qr-qg8g-78x5, MINI-hhrv-fcp9-cjgx, MINI-mwm4-6r4m-h6fc, MINI-w46v-3jgp-86mm, ROOT-APP-GOBINARY-CVE-2026-27889, UBUNTU-CVE-2026-27889

## What is CVE-2026-27889?

CVE-2026-27889 is a high-severity vulnerability in nats-io nats-server, published on 25 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

NATS-Server is a High-Performance server for NATS.io, a cloud and edge native messaging system. Starting in version 2.2.0 and prior to versions 2.11.14 and 2.12.5, a missing sanity check on a WebSockets frame could trigger a server panic in the nats-server.  This happens before authentication, and so is exposed to anyone who can connect to the websockets port. Versions 2.11.14 and 2.12.5 contains a fix. A workaround is available. The vulnerability only affects deployments which use WebSockets and which expose the network port to untrusted end-points. If one is able to do so, a defense in depth of restricting either of these will mitigate the attack.

Weakness: CWE-1286 (Improper Validation of Syntactic Correctness of Input), CWE-190 (Integer Overflow or Wraparound)

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

9 open source packages ship an affected version, including github.com/nats-io/nats-server/v2, nats and github.com/nats-io/nats-server. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/nats-io/nats-server/v2` | Go | From 2.12.0 | 2.12.5 |
| `github.com/nats-io/nats-server/v2` | Go | From 2.12.0 | 2.12.5 |
| `github.com/nats-io/nats-server/v2` | Go | From 2.2.0 | 2.11.14, 2.12.5 |
| `github.com/nats-io/nats-server/v2` | Go | From 2.2.0 | 2.11.14 |
| `github.com/nats-io/nats-server/v2` | Go | From 2.2.0 | 2.11.14 |
| `nats` | Bitnami | From 2.2.0 | 2.11.14, 2.12.5 |
| `github.com/nats-io/nats-server` | Go | All versions | None |
| `github.com/nats-io/nats-server` | Go | All versions | None |
| `github.com/nats-io/nats-server` | Go | All versions | None |

Products: Linuxfoundation Nats-Server.

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

Upgrade github.com/nats-io/nats-server/v2 to a fixed version for your release line: 2.12.5 or 2.11.14.

## Is CVE-2026-27889 being exploited?

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

## Other vulnerabilities in nats-io nats-server

- [CVE-2022-28357](https://insights.sbomify.com/CVE-2022-28357/): NATS nats-server allows directory traversal via unintended path to a management action (critical 9.8)
- [CVE-2026-58253](https://insights.sbomify.com/CVE-2026-58253/): NATS Server: Route API Auth Bypass (high 8.8)
- [CVE-2022-24450](https://insights.sbomify.com/CVE-2022-24450/): Incorrect Authorization in NATS nats-server (high 8.8)
- [CVE-2026-33216](https://insights.sbomify.com/CVE-2026-33216/): NATS has MQTT plaintext password disclosure (high 8.6)
- [CVE-2026-58207](https://insights.sbomify.com/CVE-2026-58207/): NATS Server: Remote crash via integer overflow in Connz pagination (high 7.7)

## Fix prompt for AI coding agents

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

What it is: CVE-2026-27889 is a high-severity vulnerability in nats-io nats-server, published on 25 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-27889 exists.

Affected packages and fixed versions:
- github.com/nats-io/nats-server/v2 (Go): affected from 2.12.0; fixed in 2.12.5
- github.com/nats-io/nats-server/v2 (Go): affected from 2.12.0; fixed in 2.12.5
- github.com/nats-io/nats-server/v2 (Go): affected from 2.2.0; fixed in 2.11.14, 2.12.5
- github.com/nats-io/nats-server/v2 (Go): affected from 2.2.0; fixed in 2.11.14
- github.com/nats-io/nats-server/v2 (Go): affected from 2.2.0; fixed in 2.11.14
- nats (Bitnami): affected from 2.2.0; fixed in 2.11.14, 2.12.5
- github.com/nats-io/nats-server (Go): affected all versions; no fix listed
- github.com/nats-io/nats-server (Go): affected all versions; no fix listed
- github.com/nats-io/nats-server (Go): affected all versions; no fix listed

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

## Sources

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

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