Summary
(This advisory is canonically https://advisories.nats.io/CVE/CVE-2020-28466.txt)
Problem Description
An export/import cycle between accounts could crash the nats-server, after consuming CPU and memory.
This issue was fixed publicly in https://github.com/nats-io/nats-server/pull/1731 in November 2020.
The need to call this out as a security issue was highlighted by snyk.io and we are grateful for their assistance in doing so.
Organizations which run a NATS service providing access to accounts run by untrusted third parties are affected.
See below for an important caveat if running such a service.
Affected versions
NATS Server
- Version 2 prior to 2.2.0
- 2.0.0 through and including 2.1.9 are vulnerable.
- fixed with nats-io/nats-server PR 1731, commit 2e3c226729
Workaround
The import cycle requires at least two accounts to work; if you have open account sign-up, then restricting new account sign-up might hinder an attacker.
Caveat on NATS with untrusted users
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.
Impact
The nats-server could be killed, after consuming resources.
Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service. Typical impact: denial of service.
GHSA-GWJ5-3VFQ-Q992 has a CVSS score of 7.5 (Low). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (2.2.0); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
Upgrade the nats-server.
Frequently Asked Questions
- What is GHSA-GWJ5-3VFQ-Q992? GHSA-GWJ5-3VFQ-Q992 is a low-severity uncontrolled resource consumption vulnerability in github.com/nats-io/nats-server/v2 (go), affecting versions < 2.2.0. It is fixed in 2.2.0. Crafted input forces the application to consume excessive CPU, memory, or other resources, degrading or denying service.
- How severe is GHSA-GWJ5-3VFQ-Q992? GHSA-GWJ5-3VFQ-Q992 has a CVSS score of 7.5 (Low). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of github.com/nats-io/nats-server/v2 are affected by GHSA-GWJ5-3VFQ-Q992? github.com/nats-io/nats-server/v2 (go) versions < 2.2.0 is affected.
- Is there a fix for GHSA-GWJ5-3VFQ-Q992? Yes. GHSA-GWJ5-3VFQ-Q992 is fixed in 2.2.0. Upgrade to this version or later.
- Is GHSA-GWJ5-3VFQ-Q992 exploitable, and should I be worried? Whether GHSA-GWJ5-3VFQ-Q992 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-GWJ5-3VFQ-Q992 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-GWJ5-3VFQ-Q992? Upgrade
github.com/nats-io/nats-server/v2to 2.2.0 or later.