github.com/nats-io/nkeys
Affected
- introduced
0.4.0, fixed0.4.6(semver)
Fixed versions
0.4.6
Fix
- Fixed version
0.4.6go get github.com/nats-io/[email protected]
Advisory
Also known as: BIT-nats-2023-46129, CVE-2023-46129, GO-2023-2163
xkeys seal encryption used fixed key for all encryption
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:
NATS Server:
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).
High Basis: The source's own band: HIGH
0.4.0, fixed 0.4.6 (semver)0.4.6
0.4.6go get github.com/nats-io/[email protected]2.10.0, fixed 2.10.4 (semver)2.10.4
2.10.4go get github.com/nats-io/nats-server/[email protected]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
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0