logo

GHSA-hmm9-r2m2-qg9w github.com/nats-io/nats-server/v2

Package

Manager: go
Name: github.com/nats-io/nats-server/v2
Vulnerable Version: >=0 <2.1.9

Severity

Level: High

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

EPSS: N/A pctlN/A

Details

Nil dereference in NATS JWT causing DoS of nats-server (This advisory is canonically <https://advisories.nats.io/CVE/CVE-2020-26521.txt>) ## Problem Description The NATS account system has an Operator trusted by the servers, which signs Accounts, and each Account can then create and sign Users within their account. The Operator should be able to safely issue Accounts to other entities which it does not fully trust. A malicious Account could create and sign a User JWT with a state not created by the normal tooling, such that decoding by the NATS JWT library (written in Go) would attempt a nil dereference, aborting execution. The NATS Server is known to be impacted by this. ## Affected versions #### JWT library * all versions prior to 1.1.0 #### NATS Server * Version 2 prior to 2.1.9 ## Impact #### JWT library * Programs would nil dereference and panic, aborting execution by default. #### NATS server * Denial of Service caused by process termination ## Workaround If your NATS servers do not trust any accounts which are managed by untrusted entities, then malformed User credentials are unlikely to be encountered. ## Solution Upgrade the JWT dependency in any application using it. Upgrade the NATS server if using NATS Accounts.

Metadata

Created: 2021-05-21T16:22:10Z
Modified: 2023-08-30T18:06:49Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2021/05/GHSA-hmm9-r2m2-qg9w/GHSA-hmm9-r2m2-qg9w.json
CWE IDs: ["CWE-476"]
Alternative ID: N/A
Finding: F002
Auto approve: 1