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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | nats-server | 2.10.4-r0 | ALPINE-CVE-2023-46129 |
| Alpine:v3.21 | nats-server | 2.10.4-r0 | ALPINE-CVE-2023-46129 |
| Alpine:v3.22 | nats-server | 2.10.4-r0 | ALPINE-CVE-2023-46129 |
| Alpine:v3.23 | nats-server | 2.10.4-r0 | ALPINE-CVE-2023-46129 |
| Alpine:v3.24 | nats-server | 2.10.4-r0 | ALPINE-CVE-2023-46129 |
| Debian:13 | golang-github-nats-io-nkeys | 0.4.6-1 | DEBIAN-CVE-2023-46129 |
| Debian:14 | golang-github-nats-io-nkeys | 0.4.6-1 | DEBIAN-CVE-2023-46129 |
| Debian:13 | nats-server | 2.10.4-1 | DEBIAN-CVE-2023-46129 |
| Debian:14 | nats-server | 2.10.4-1 | DEBIAN-CVE-2023-46129 |
| Go | github.com/nats-io/nats-server/v2 | 2.10.4 | GHSA-mr45-rx8q-wcm9 |
| Go | github.com/nats-io/nkeys | 0.4.6 | GHSA-mr45-rx8q-wcm9 |
| Go | github.com/nats-io/nkeys | 0.4.6 | GO-2023-2163 |
| Ubuntu:22.04:LTS | golang-github-nats-io-nkeys | no fix listed | UBUNTU-CVE-2023-46129 |
Affected products (as reported)
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
- https://github.com/nats-io/nkeys/security/advisories/GHSA-mr45-rx8q-wcm9 x_refsource_CONFIRM
- 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/