CVE-2021-32026: Github.com/nats io/nats server/v2 NATS Server TLS Missing Ciphersuite Vulnerability

LOW
Advisory Identifier: GHSA-jj54-5q2m-q7pj
Published
Advisory Summary

CVE-2021-32026 is a LOW nats server tls missing ciphersuite vulnerability (General Security Weakness) affecting Github.com/nats io/nats server/v2 libraries in the Go ecosystem. The issue involves nats server tls missing ciphersuite settings when cli flags used. Remediation is available by upgrading affected packages to version 2.2.3.

CVE-2021-32026 at a Glance

CVE Identifier CVE-2021-32026
GHSA Identifier GHSA-jj54-5q2m-q7pj
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Github.com/nats io/nats server/v2
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2021-32026

To remediate this vulnerability, upgrade all affected Github.com/nats io/nats server/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/nats-io/nats-server/v2 fixed: 2.2.3
Upgrade github.com/nats-io/nats-server/v2 to 2.2.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/nats-io/nats-server/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2021-32026, inspect your project dependencies for Github.com/nats io/nats server/v2:

inspect dependencies for github.com/nats-io/nats-server/v2

Analyze the terminal output to locate any version of Github.com/nats io/nats server/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.3), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Github.com/nats io/nats server/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

CVE-2021-32026 Affected Github.com/nats io/nats server/v2 Versions

1 component(s)
Fixed Versions:
2.2.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/nats-io/nats-server/v2
Go
< 2.2.3
2.2.3

References

Frequently Asked Questions

What is CVE-2021-32026?
CVE-2021-32026 is a security vulnerability in Github.com/nats io/nats server/v2 involving NATS server TLS missing ciphersuite settings when CLI flags used under General Security Weakness.
Which Github.com/nats io/nats server/v2 versions are affected?
Affected versions include releases prior to 2.2.3 across affected packages: github.com/nats-io/nats-server/v2.
What version fixes CVE-2021-32026?
Upgrading to 2.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/nats-io/nats-server/v2 affected?
Yes, github.com/nats-io/nats-server/v2 is affected in releases prior to 2.2.3. Upgrade your dependency to 2.2.3 or later.
What CWE is associated with CVE-2021-32026?
CVE-2021-32026 is classified under General Security Weakness.
How can I check Go dependencies for CVE-2021-32026?
Run the dependency tree command: 'inspect dependencies for github.com/nats-io/nats-server/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jj54-5q2m-q7pj",
  "modified" : "2024-05-21T20:34:18Z",
  "published" : "2024-05-14T22:03:51Z",
  "aliases" : [ "CVE-2021-32026" ],
  "summary" : "NATS server TLS missing ciphersuite settings when CLI flags used",
  "details" : "(This advisory is canonically <https://advisories.nats.io/CVE/CVE-2021-32026.txt>)\n\n### Problem Description\n\nThe 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.\n\nThe 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.\n\nNone 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.\n\n\n### Affected versions\n\nNATS Server:\n * All versions prior to 2.2.3\n * fixed with nats-io/nats-server commit ffccc2e1bd (2021-04-29)\n\n\n### Impact\n\nIf 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.\n\n\n### Workaround\n\nUse a configuration file to set the TLS parameters instead of command-line options.\n\n\n### Solution\n\nUpgrade the NATS server.\n\n\n### Credits\n\nThis issue was identified and reported by SimCorp.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/nats-io/nats-server/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/security/advisories/GHSA-jj54-5q2m-q7pj"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/commit/ffccc2e1bd7aa2466bd9e631e976bfd7ca46f225"
  }, {
    "type" : "WEB",
    "url" : "https://advisories.nats.io"
  }, {
    "type" : "WEB",
    "url" : "https://advisories.nats.io/CVE/CVE-2021-32026.txt"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/nats-io/nats-server"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-14T22:03:51Z",
    "nvd_published_at" : null
  }
}