CVE-2020-28466: Github.com/nats io/nats server Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-m4jx-6526-vvhm
CVSS 7.5
CWE-400
Published
Advisory Summary

CVE-2020-28466 is a HIGH (CVSS 7.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Github.com/nats io/nats server libraries in the Go ecosystem. The issue involves denial of service in github.com/nats-io/nats-server/server. Remediation is available by upgrading affected packages to version 2.2.0.

CVE-2020-28466 at a Glance

CVE Identifier CVE-2020-28466
GHSA Identifier GHSA-m4jx-6526-vvhm
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Github.com/nats io/nats server
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2020-28466

To remediate this vulnerability, upgrade all affected Github.com/nats io/nats server 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 fixed: 2.2.0
Upgrade github.com/nats-io/nats-server to 2.2.0
github.com/nats-io/nats-server/v2 fixed: 2.2.0
Upgrade github.com/nats-io/nats-server/v2 to 2.2.0
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

How to Check if You Are Affected

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

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

Analyze the terminal output to locate any version of Github.com/nats io/nats server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.2.0), 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 CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Github.com/nats io/nats server, 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 affects all versions of package github.com/nats-io/nats-server/server. Untrusted accounts are able to crash the server using configs that represent a service export/import cycles. Disclaimer from the maintainers - Running a NATS service which is exposed to untrusted users presents a heightened risk. Any remote execution flaw or equivalent seriousness, or denial-of-service by unauthenticated users, will lead to prompt releases by the NATS maintainers. Fixes for denial of service issues with no threat of remote execution, when limited to account holders, are likely to just be committed to the main development branch with no special attention. Those who are running such services are encouraged to build regularly from git.

CVE-2020-28466 Affected Github.com/nats io/nats server Versions

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

References

Frequently Asked Questions

What is CVE-2020-28466?
CVE-2020-28466 is a security vulnerability in Github.com/nats io/nats server involving Denial of service in github.com/nats-io/nats-server/server under CWE-400: Uncontrolled Resource Consumption.
Which Github.com/nats io/nats server versions are affected?
Affected versions include releases prior to 2.2.0 across affected packages: github.com/nats-io/nats-server, github.com/nats-io/nats-server/v2.
What version fixes CVE-2020-28466?
Upgrading to 2.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/nats-io/nats-server affected?
Yes, github.com/nats-io/nats-server is affected in releases prior to 2.2.0. Upgrade your dependency to 2.2.0 or later.
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.0. Upgrade your dependency to 2.2.0 or later.
What is the CVSS score of CVE-2020-28466?
CVE-2020-28466 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2020-28466?
CVE-2020-28466 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Go dependencies for CVE-2020-28466?
Run the dependency tree command: 'inspect dependencies for github.com/nats-io/nats-server'. 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-m4jx-6526-vvhm",
  "modified" : "2026-03-30T20:36:42Z",
  "published" : "2022-02-15T01:57:18Z",
  "aliases" : [ "CVE-2020-28466" ],
  "summary" : "Denial of service in github.com/nats-io/nats-server/server",
  "details" : "This affects all versions of package github.com/nats-io/nats-server/server. Untrusted accounts are able to crash the server using configs that represent a service export/import cycles. Disclaimer from the maintainers - Running a NATS service which is exposed to untrusted users presents a heightened risk. Any remote execution flaw or equivalent seriousness, or denial-of-service by unauthenticated users, will lead to prompt releases by the NATS maintainers. Fixes for denial of service issues with no threat of remote execution, when limited to account holders, are likely to just be committed to the main development branch with no special attention. Those who are running such services are encouraged to build regularly from git.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/nats-io/nats-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/nats-io/nats-server/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-28466"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/pull/1731"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/nats-io/nats-server/pull/1731/commits/2e3c22672936f4980d343fb1d328b38919e74796"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2022-0855"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-GOLANG-GITHUBCOMNATSIONATSSERVERSERVER-1042967"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2021/03/16/1"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2021/03/16/2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-12T20:38:22Z",
    "nvd_published_at" : "2021-03-07T10:15:12Z"
  }
}