Vulnerability · Published Oct 30, 2023 · Assigned by GitHub_M

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

High 7.5

In plain English

A high-severity security flaw in nkeys from nats-io. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 39% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.4%top 61.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20nats-server2.10.4-r0ALPINE-CVE-2023-46129
Alpine:v3.21nats-server2.10.4-r0ALPINE-CVE-2023-46129
Alpine:v3.22nats-server2.10.4-r0ALPINE-CVE-2023-46129
Alpine:v3.23nats-server2.10.4-r0ALPINE-CVE-2023-46129
Alpine:v3.24nats-server2.10.4-r0ALPINE-CVE-2023-46129
Debian:13golang-github-nats-io-nkeys0.4.6-1DEBIAN-CVE-2023-46129
Debian:14golang-github-nats-io-nkeys0.4.6-1DEBIAN-CVE-2023-46129
Debian:13nats-server2.10.4-1DEBIAN-CVE-2023-46129
Debian:14nats-server2.10.4-1DEBIAN-CVE-2023-46129
Gogithub.com/nats-io/nats-server/v22.10.4GHSA-mr45-rx8q-wcm9
Gogithub.com/nats-io/nkeys0.4.6GHSA-mr45-rx8q-wcm9
Gogithub.com/nats-io/nkeys0.4.6GO-2023-2163
Ubuntu:22.04:LTSgolang-github-nats-io-nkeysno fix listedUBUNTU-CVE-2023-46129

Affected products (as reported)

VendorProductVersions
nats-io nkeys >= 2.10.0, < 2.10.4>= 0.4.0, < 0.4.6

Weakness: CWE-321, CWE-325 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

References