Improper Authentication Affecting github.com/nats-io/nats-server/v2/server package, versions >=2.2.0 <2.9.23 >=2.10.0 <2.10.2


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team

    Threat Intelligence

    EPSS
    0.16% (54th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-GOLANG-GITHUBCOMNATSIONATSSERVERV2SERVER-6039778
  • published 31 Oct 2023
  • disclosed 30 Oct 2023
  • credit Alex Herrington

How to fix?

Upgrade github.com/nats-io/nats-server/v2/server to version 2.9.23, 2.10.2 or higher.

Overview

github.com/nats-io/nats-server/v2/server is an A simple, secure and performant communications system for digital systems, services and devices.

Affected versions of this package are vulnerable to Improper Authentication due to an implicit $G user in an authorization block. An attacker can gain unauthenticated access, even when the configuration was intended for each user to have an account.

Note: Without proper access permission users can't access sensitive data.

Workaround

In the "accounts" block, define a second non-system account and leave it empty.

accounts {
    SYS: {
        users: [
            { user: sysuser, password: makemeasandwich }
        ]
    }
    DUMMY: {}  # for security, before 2.10.2
}
system_account: SYS

CVSS Scores

version 3.1
Expand this section

Snyk

Recommended
6.5 medium
  • Attack Vector (AV)
    Network
  • Attack Complexity (AC)
    Low
  • Privileges Required (PR)
    None
  • User Interaction (UI)
    None
  • Scope (S)
    Unchanged
  • Confidentiality (C)
    Low
  • Integrity (I)
    Low
  • Availability (A)
    None
Expand this section

NVD

6.5 medium