Advisory

GHSA-mr45-rx8q-wcm9

Also known as: BIT-nats-2023-46129, CVE-2023-46129, GO-2023-2163

Summary

xkeys seal encryption used fixed key for all encryption

Details

Background

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.

Problem Description

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.

Affected versions

nkeys Go library:

  • 0.4.0 up to and including 0.4.5
  • Fixed with nats-io/nkeys: 0.4.6

NATS Server:

  • 2.10.0 up to and including 2.10.3
  • Fixed with nats-io/nats-server: 2.10.4

Solution

Upgrade the nats-server.
For any application handling auth callouts in Go, if using the nkeys library, update the dependency, recompile and deploy that in lockstep.

Credits

Problem reported by Quentin Matillat (GitHub @tinou98).

Severity

High Basis: The source's own band: HIGH

Dates

Published
2023-10-31 21:19 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

github.com/nats-io/nkeys

Go · All systems

Affected

  • introduced 0.4.0, fixed 0.4.6 (semver)

Fixed versions

0.4.6

Fix

github.com/nats-io/nats-server/v2

Go · All systems

Affected

  • introduced 2.10.0, fixed 2.10.4 (semver)

Fixed versions

2.10.4

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences