nkeys: Use of Hard-coded Cryptographic Key
CVE-2023-46129 is a high-severity use of hard-coded cryptographic key vulnerability in nkeys from Nats-io, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected nkeys versions: >= 2.10.0, < 2.10.4; >= 0.4.0, < 0.4.6. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.45% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Nats-server to 2.10.4 or a later version.
- Read the advisory on github.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Nats-io | nkeys | >= 2.10.0, < 2.10.4; >= 0.4.0, < 0.4.6 | Not stated |
| Linux Foundation | Nats-server | 2.10.0 up to, but not including, 2.10.4 | 2.10.4 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- NoneNothing can be modified.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | CNA (github.com) |
| CVSS 3.1 | 7.5 | High | NVD |
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Use of Hard-coded Cryptographic Key
The product uses a hard-coded, unchangeable cryptographic key.
How developers prevent this class of flaw
- Prevention schemes mirror that of hard-coded password storage.
More Use of Hard-coded Cryptographic Key vulnerabilities (CWE-321)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Third-party and government advisories
- openwall.com/lists/oss-security/2023/10/31/1Mailing List, Third Party Advisory
Other references
Recent Use of Hard-coded Cryptographic Key vulnerabilities
- 9.8 Critical severity
- 9.8 Critical severity
- 9.8 Critical severity
- 7.5 High severity
- 9.8 Critical severity
- 9.8 Critical severity
Apache Shiro Code Execution Exploited
Spotted an error? Tell us.