Cloudanix VulnDB

CVE-2023-46129

High · 7.5

CVSS

7.5

EPSS

0.4%

Published

Oct 31, 2023

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in a widely used messaging library meant that some encrypted authentication traffic was actually sent using a blank key, allowing anyone who saw the traffic to read the contents.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Data Exposure
Component
Library
Class
Cryptographic Weakness
Remediation
Upgrade
Effort
Low
Patch risk
Low

What it actually does

The nkeys library's xkeys encryption logic passes an array by value into an internal function that mutates the buffer, causing all encryption operations to use an all-zeros key instead of the generated key material; signing remains unaffected.

Why it matters to the business

Encrypted authentication callouts and pub-sub messages between components can be decrypted by any observer, exposing credentials, tokens, or sensitive payloads and undermining confidentiality controls in distributed messaging setups.

How an attack unfolds

An attacker positioned to observe or intercept traffic between a NATS server performing auth callouts and its clients captures the ciphertext produced by the flawed xkeys implementation; because the effective key is all zeros, the attacker can trivially decrypt the data to obtain authentication material or message contents without needing the real key.

How to fix it

Upgrade the nkeys dependency to version 0.4.6 or later (corresponding to NATS Server 2.10.4) and rebuild/deploy affected applications; for the zitadel/zitadel package apply commit 762b19da06b24cae4a1a5ec73d4e3a919e4454a2.

How to confirm the fix worked

Verify the nkeys Go module version in go.mod or the compiled binary, confirm the NATS server reports version 2.10.4 or newer, and test that encryption callouts no longer produce all-zeros encrypted payloads.

Typical attack path

  1. Identify NATS deployments using nkeys versions 0.4.0-0.4.5 for auth callouts
  2. Position to intercept encrypted callout traffic or stored messages
  3. Capture ciphertext produced by the xkeys encryption path
  4. Decrypt using the known all-zeros key to recover plaintext authentication data or messages

How to detect it

Search application and NATS server logs for auth callout events occurring while running nkeys 0.4.0-0.4.5; inspect network captures or message stores for encrypted payloads that decrypt successfully under an all-zeros key.

What your security team should do

  • Immediately update zitadel/zitadel to the commit containing the nkeys fix and redeploy
  • Audit all Go applications using nkeys 0.4.0-0.4.5 for encryption usage and schedule upgrades
  • Review auth callout logs and traffic for any historical exposure of sensitive material
  • Add dependency scanning to CI pipelines to catch future cryptographic library regressions

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Go github.com/nats-io/nats-server/v2 2.10.0 2.10.4
Go github.com/nats-io/nkeys 0.4.0 0.4.6
Bitnami nats 2.10.0 2.10.4
Chainguard k3s 0 1.28.3-r1
Chainguard k3s-embedded 0 1.28.3-r1
Chainguard k3s-images 0 1.28.3-r1
Chainguard k3s-multicall 0 1.28.3-r1
Chainguard k3s-static 0 1.28.3-r1
Chainguard minio 0 0.20231101.183725-r0
Chainguard minio-bitnami-2024-compat 0 0.20231101.183725-r0
Chainguard minio-bitnami-2025-compat 0 0.20231101.183725-r0
Chainguard minio-iamguarded-2025-compat 0 0.20231101.183725-r0
Chainguard nats 0 0.1.1-r5
Chainguard nats-server 0 2.10.4-r0
Chainguard nats-server-compat 0 2.10.4-r0
Chainguard telegraf-1.26 0 1.26.3-r6
Debian:13 golang-github-nats-io-nkeys 0 0.4.6-1
Debian:13 nats-server 0 2.10.4-1
Ubuntu:20.04:LTS golang-github-nats-io-nkeys 0 No fix
Ubuntu:22.04:LTS golang-github-nats-io-nkeys 0 No fix
Ubuntu:24.04:LTS golang-github-nats-io-nkeys 0 No fix
Ubuntu:24.04:LTS nats-server 0 No fix
Ubuntu:24.10 golang-github-nats-io-nkeys 0 No fix
Ubuntu:24.10 nats-server 0 No fix
Ubuntu:Pro:20.04:LTS golang-github-nats-io-nkeys 0 No fix
Wolfi k3s 0 1.28.3-r1
Wolfi k3s-embedded 0 1.28.3-r1
Wolfi k3s-images 0 1.28.3-r1
Wolfi k3s-multicall 0 1.28.3-r1
Wolfi k3s-static 0 1.28.3-r1
Wolfi minio 0 0.20231101.183725-r0
Wolfi minio-bitnami-2024-compat 0 0.20231101.183725-r0
Wolfi minio-bitnami-2025-compat 0 0.20231101.183725-r0
Wolfi minio-iamguarded-2025-compat 0 0.20231101.183725-r0
Wolfi nats 0 0.1.1-r5
Wolfi nats-server 0 2.10.4-r0
Wolfi nats-server-compat 0 2.10.4-r0
Wolfi telegraf-1.26 0 1.26.3-r6
go github.com/nats-io/nats-server/v2 2.10.0 No fix
go github.com/nats-io/nkeys v0.4.0 v0.4.6

Related vulnerabilities