Miggo Logo

CVE-2023-47090: NATS.io: Adding accounts for just the system account adds auth bypass

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.49121%
Published
10/19/2023
Updated
10/31/2023
KEV Status
No
Technology
TechnologyGo

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
github.com/nats-io/nats-server/v2go>= 2.2.0, < 2.9.232.9.23
github.com/nats-io/nats-server/v2go>= 2.10.0, < 2.10.22.10.2

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the conditional logic in server/server.go's configureAccounts function. Before the fix, it allowed auto-creation of a no_auth_user in the $G account when only the $SYS account existed, without checking if an authorization block was defined. The commit diff shows the fix added '&& !opts.authBlockDefined' to this check, confirming this was the vulnerable path. The authBlockDefined flag is set in opts.go when processing authorization blocks, making this the root cause of the auth bypass.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

## ***k*roun* N*TS.io is * *i** p*r*orm*n** op*n sour** pu*-su* *istri*ut** *ommuni**tion t***nolo*y, *uilt *or t** *lou*, on-pr*mis*, IoT, *n* **** *omputin*. N*TS us*rs *xist wit*in ***ounts, *n* on** usin* ***ounts, t** ol* *ut*oriz*tion *lo*k i

Reasoning

T** vuln*r**ility st*ms *rom t** *on*ition*l lo*i* in s*rv*r/s*rv*r.*o's *on*i*ur****ounts *un*tion. ***or* t** *ix, it *llow** *uto-*r**tion o* * no_*ut*_us*r in t** $* ***ount w**n only t** $SYS ***ount *xist**, wit*out ****kin* i* *n *ut*oriz*tion