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

Published Oct 30, 2023
·
Updated

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

Other sources

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.

NVD

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.

Within the nats-server, the encryption is used for the Auth Callouts feature, introduced with 2.10.0 (September 2023). The Auth Callout request includes the supplied user password. These messages are sent within NATS, and should typically be in a dedicated NATS Account used for callouts, but this is not required. Thus in scenarios where the Callouts are in an account shared with untrusted users or where the callout responders connect without TLS, this may lead to user credential exposure.

https://advisories.nats.io/CVE/secnote-2023-02.txt https://security-tracker.debian.org/tracker/CVE-2023-46129

Red Hat

xkeys Seal encryption used fixed key for all encryption

Microsoft

Affected Software

12 affected componentsFixes available
go/github.com/nats-io/nats-server/v2>=2.10.0<=2.10.3
2.10.4
go/github.com/nats-io/nkeys>=0.4.0<=0.4.5
0.4.6
NATS NATS Server>=2.10.0<2.10.4
NATS nkeys>=0.4.0<0.4.6
Microsoft cbl2 telegraf 1.27.4-1
Microsoft azl3 telegraf 1.29.4-1
Microsoft azl3 telegraf 1.27.3-4
redhat/nats-server<2.10.4
2.10.4
redhat/nkeys<0.4.6
0.4.6
linuxfoundation Nats-server>=2.10.0<2.10.4
debian/golang-github-nats-io-nkeys
0.0~git20181103.f9a6cff-1.10.3.0-20.4.10-10.4.16-1
debian/nats-server
2.9.10-12.10.27-12.14.3-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/nats-io/nats-server/v2 to a version that resolves this vulnerability.

    Fixed in 2.10.4
  2. Upgrade

    Upgrade go/github.com/nats-io/nkeys to a version that resolves this vulnerability.

    Fixed in 0.4.6
  3. Upgrade

    Upgrade redhat/nats-server to a version that resolves this vulnerability.

    Fixed in 2.10.4
  4. Upgrade

    Upgrade redhat/nkeys to a version that resolves this vulnerability.

    Fixed in 0.4.6
  5. Upgrade

    Upgrade debian/golang-github-nats-io-nkeys to a version that resolves this vulnerability.

    Fixed in 0.0~git20181103.f9a6cff-1.1Fixed in 0.3.0-2Fixed in 0.4.10-1Fixed in 0.4.16-1
  6. Upgrade

    Upgrade debian/nats-server to a version that resolves this vulnerability.

    Fixed in 2.9.10-1Fixed in 2.10.27-1Fixed in 2.14.3-1
  7. Upgrade

    Upgrade nats-io/nats-server to a version that resolves this vulnerability.

    Fixed in 2.10.4
  8. Upgrade

    Upgrade nats-io/nkeys to a version that resolves this vulnerability.

    Fixed in 0.4.6
  9. Compensating control

    For application handling auth callouts in Go, update the nkeys dependency and redeploy that change in lockstep with the updated nats-server, since the issue affects the Auth Callouts encryption path.

Event History

Oct 30, 2023
Data Sourced
via Red Hat·10:28 AM
DescriptionSeverityAffected Software
CVE Published
via MITRE·11:47 PM
Data Sourced
via MITRE·11:47 PM
DescriptionSeverityWeakness
Oct 31, 2023
Data Sourced
via NVD·12:15 AM
DescriptionSeverityWeaknessAffected Software
Advisory Published
09:19 PM
Nov 7, 2023
Data Sourced
via Microsoft·08:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·08:00 AM
Affected Software
Updated
via Microsoft·08:00 AM
Affected Software
Updated
via Microsoft·08:00 AM
DescriptionSeverity
Jul 7, 2026
Data Sourced
via Debian·02:09 AM
DescriptionAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2023-46129?

The severity of CVE-2023-46129 is high.

2

What is the affected software for CVE-2023-46129?

The affected software for CVE-2023-46129 is go/github.com/nats-io/nats-server/v2 (version 2.10.0 to 2.10.3) and go/github.com/nats-io/nkeys (version 0.4.0 to 0.4.5).

3

How can I fix CVE-2023-46129?

To fix CVE-2023-46129, update your software to nats-server/v2 version 2.10.4, and nkeys version 0.4.6.

4

What is the Common Weakness Enumeration (CWE) ID for CVE-2023-46129?

The Common Weakness Enumeration (CWE) ID for CVE-2023-46129 is CWE-321 and CWE-325.

5

Where can I find more information about CVE-2023-46129?

You can find more information about CVE-2023-46129 at the following references: [GitHub Advisory](https://github.com/nats-io/nkeys/security/advisories/GHSA-mr45-rx8q-wcm9), [NVD](https://nvd.nist.gov/vuln/detail/CVE-2023-46129), [Openwall](http://www.openwall.com/lists/oss-security/2023/10/31/1).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203