CVE-2023-46129xkeys Seal encryption used fixed key for all encryption
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.
What to do
Fixed builds are available from Alpine, Debian, Go: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | golang-github-nats-io-nkeys | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | golang-github-nats-io-nkeys | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | nats-server | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | golang-github-nats-io-nkeys | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | nats-server | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | golang-github-nats-io-nkeys | Fix pending | UBUNTU-CVE-2023-46129 | |
| Ubuntu 20.04 | golang-github-nats-io-nkeys | Fix pending | UBUNTU-CVE-2023-46129 | |
| Debian 14 | golang-github-nats-io-nkeys | Fixed | 0.4.6-1 | DEBIAN-CVE-2023-46129 |
| Debian 14 | nats-server | Fixed | 2.10.4-1 | DEBIAN-CVE-2023-46129 |
| Debian 13 | golang-github-nats-io-nkeys | Fixed | 0.4.6-1 | DEBIAN-CVE-2023-46129 |
| Debian 13 | nats-server | Fixed | 2.10.4-1 | DEBIAN-CVE-2023-46129 |
| Alpine Linux 3.24 | nats-server | Fixed | 2.10.4-r0 | ALPINE-CVE-2023-46129 |
| Alpine Linux 3.23 | nats-server | Fixed | 2.10.4-r0 | ALPINE-CVE-2023-46129 |
| Alpine Linux 3.22 | nats-server | Fixed | 2.10.4-r0 | ALPINE-CVE-2023-46129 |
| Alpine Linux 3.21 | nats-server | Fixed | 2.10.4-r0 | ALPINE-CVE-2023-46129 |
| Alpine Linux 3.20 | nats-server | Fixed | 2.10.4-r0 | ALPINE-CVE-2023-46129 |
| Alpine Linux 3.19 | nats-server | Fixed | 2.10.4-r0 | ALPINE-CVE-2023-46129 |
| Go library | github.com/nats-io/nats-server/v2 | Fixed | 2.10.4 | GHSA-mr45-rx8q-wcm9 |
| Go library | github.com/nats-io/nkeys | Fixed | 0.4.6 | GO-2023-2163 |
What the vendor says
As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- nats-io nkeys: affected: >= 2.10.0, < 2.10.4, >= 0.4.0, < 0.4.6
References
- https://github.com/nats-io/nkeys/security/advisories/GHSA-mr45-rx8q-wcm9
- 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/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.