Miggo Logo

GHSA-gwj5-3vfq-q992: Import loops in account imports, nats-server DoS

7.5

CVSS Score
3.1

Basic Information

CVE ID
-
EPSS Score
-
Published
5/21/2021
Updated
1/9/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/nats-io/nats-server/v2go< 2.2.02.2.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The core vulnerability existed in the service import logic where cyclic dependencies between accounts weren't detected. The key function AddServiceImportWithClaim was modified to add cycle checking (via importFormsCycle), proving it was previously vulnerable. This function directly handles import creation and would appear in profilers when attackers attempt to establish cyclic imports. The added error ErrServiceImportFormsCycle and new helper functions (serviceExportOverlaps, serviceImportOverlaps) in the patch further confirm the missing pre-validation was the root cause.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

(T*is **visory is **noni**lly <*ttps://**visori*s.n*ts.io/*V*/*V*-****-*****.txt>) ## Pro*l*m **s*ription *n *xport/import *y*l* **tw**n ***ounts *oul* *r*s* t** n*ts-s*rv*r, **t*r *onsumin* *PU *n* m*mory. T*is issu* w*s *ix** pu*li*ly in <*ttps:

Reasoning

T** *or* vuln*r**ility *xist** in t** s*rvi** import lo*i* w**r* *y*li* **p*n**n*i*s **tw**n ***ounts w*r*n't **t**t**. T** k*y *un*tion `***S*rvi**ImportWit**l*im` w*s mo*i*i** to *** *y*l* ****kin* (vi* `import*orms*y*l*`), provin* it w*s pr*viousl