GHSA-gwj5-3vfq-q992
HIGHGHSA-gwj5-3vfq-q992 is a high-severity (CVSS 7.5) vulnerability in github.com/nats-io/nats-server/v2. O3 Security confirms whether GHSA-gwj5-3vfq-q992 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Import loops in account imports, nats-server DoS
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-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
Impact
The nats-server could be killed, after consuming resources.
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.
Solution
Upgrade the nats-server.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/nats-io/nats-server/v2 | all versions | 2.2.0 |
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. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update github.com/nats-io/nats-server/v2 to 2.2.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-gwj5-3vfq-q992 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 pinpoints whether GHSA-gwj5-3vfq-q992 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-gwj5-3vfq-q992. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-gwj5-3vfq-q992 in your dependencies?
O3 detects GHSA-gwj5-3vfq-q992 across Go dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.