CVE-2021-32026
NATS server TLS missing ciphersuite settings when CLI flags used
Also known as GHSA-jj54-5q2m-q7pj, GO-2024-2850
Mitigation
- Upgrade github.com/nats-io/nats-server/v2 to 2.2.3 or later.
Who should check
- Projects that depend on Go package github.com/nats-io/nats-server/v2 (< 2.2.3)
- Projects that depend on Go package github.com/nats-io/nats-server
Vulnerability facts
- Affected
- github.com/nats-io/nats-server/v2 < 2.2.3; github.com/nats-io/nats-server
- Fixed in
- 2.2.3
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Unknown
- CVSS
- Not scored yet
- Modified
Description
(This advisory is canonically <https://advisories.nats.io/CVE/CVE-2021-32026.txt>) ### Problem Description The NATS server by default uses a restricted set of modern ciphersuites for TLS. This selection can be overridden through configuration. The defaults include just RSA and ECDSA with either AES/GCM with a SHA2 digest or ChaCha20/Poly1305. The configuration system allows for extensive use of CLI options to override configuration settings. When using these to set a key/cert for TLS, the restricted ciphersuite settings were lost, enabling all ciphersuites supported by Go by default. None of these additional ciphersuites are broken, so the NATS maintainers have fixed this in public git and the next release is not being hurried, nor is this security advisory embargoed. ### Affected versions NATS Server: * All versions prior to 2.2.3 * fixed with nats-io/nats-server commit ffccc2e1bd (2021-04-29) ### Impact If a server administrator chooses to start the nats-server with TLS configuration parameters provided on the command-line, then clients can negotiate TLS ciphersuites which were not expected. ### Workaround Use a configuration file to set the TLS parameters instead of command-line options. ### Solution Upgrade the NATS server. ### Credits This issue was identified and reported by SimCorp.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/nats-io/nats-server/v2 | < 2.2.3 | 2.2.3 | osv |
| Go github.com/nats-io/nats-server | — | — | osv |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2021-32026. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2021-32026.md Affected: github.com/nats-io/nats-server/v2 < 2.2.3; github.com/nats-io/nats-server Fixed in: 2.2.3 Steps: 1. Search this machine and project for github.com/nats-io/nats-server/v2 (Go), github.com/nats-io/nats-server (Go): dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
FAQ
Is CVE-2021-32026 being exploited?
There is no confirmed exploitation: CVE-2021-32026 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is CVE-2021-32026?
It has no CVSS score yet. Unknown.
Which versions are affected by CVE-2021-32026?
github.com/nats-io/nats-server/v2 < 2.2.3; github.com/nats-io/nats-server.
Is there a fix for CVE-2021-32026?
Yes. Fixed in 2.2.3. Upgrade github.com/nats-io/nats-server/v2 to 2.2.3 or later.
How do I check if I'm affected by CVE-2021-32026?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.