CVE-2021-32026 — v2
Fix: nats-io/nats-server@ffccc2eCVE-2021-32026 is a security vulnerability in github.com/nats-io/nats-server/v2. A fix is available for github.com/nats-io/nats-server/v2 — see the affected versions and patch details below.
NATS server TLS missing ciphersuite settings when CLI flags used
Real-World Exposure
github.com/nats-io/nats-server/v2Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
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 Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/nats-io/nats-server/v2 | all versions | 2.2.3go get github.com/nats-io/nats-server/v2@v2.2.3 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/nats-io/nats-server/v2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/nats-io/nats-server/v2 to 2.2.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-32026 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2021-32026 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2021-32026. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is CVE-2021-32026 in your dependencies?
O3 Security finds CVE-2021-32026 across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.