Cloudanix VulnDB

CVE-2022-29946

Medium · 6.3

CVSS

6.3

EPSS

0.5%

Published

Jul 11, 2024

CISA due date

—

Cloudanix analysis

Schedule a fix SSVC: Track

A bug in the messaging server let some users receive information they were supposed to be blocked from seeing.

Exploitation
Remote Authenticated
Attacker needs
Low Privilege
Complexity
Low
Impact
Data Exposure
Component
Network Service
Class
Authorization Bypass
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The vulnerability stems from incomplete enforcement of negative permissions on queue subscriptions using wildcards, allowing a user to receive messages on subjects they were explicitly denied.

Why it matters to the business

Attackers with limited messaging access can read or interact with restricted data flows, potentially exposing sensitive operational information or enabling unauthorized control actions in connected systems.

How an attack unfolds

An authenticated user creates a queue subscription against a broad wildcard subject that overlaps with explicitly denied subjects; the server fails to apply the negative permission check in this scenario and delivers messages the user should not receive.

How to fix it

Upgrade NATS Server to version 2.8.2 or later and NATS Streaming Server to version 0.24.6 or later. Review and test all negative permission rules after the upgrade.

How to confirm the fix worked

Confirm the server reports version 2.8.2+ (or 0.24.6+ for streaming) and test that queue subscriptions on wildcards no longer deliver messages from explicitly denied subjects.

Typical attack path

  1. Obtain valid low-privilege credentials for the NATS cluster
  2. Issue a queue subscription using a wildcard that matches denied subjects
  3. Receive messages containing data from the restricted subjects
  4. Use the obtained information to advance further attacks or exfiltrate data

How to detect it

Review NATS server logs for queue subscription requests using wildcards that overlap with subjects covered by negative permissions; correlate with authentication events for the creating user.

What your security team should do

  • Prioritize upgrade of all NATS Server and Streaming Server instances to the fixed releases
  • Audit existing permission configurations for negative rules and wildcard subscriptions
  • Monitor subscription creation logs for unexpected wildcard patterns

The record

NATS.io NATS Server before 2.8.2 and Streaming Server before 0.24.6 could allow a remote attacker to bypass security restrictions, caused by the failure to enforce negative user permissions in one scenario. By using a queue subscription on the wildcard, an attacker could exploit this vulnerability to allow denied subjects.

Affected packages

Ecosystem Package Introduced Fixed
Go github.com/nats-io/nats-server 0 No fix
Go github.com/nats-io/nats-server/v2 0 2.8.2
Go github.com/nats-io/nats-streaming-server 0 0.24.6
Debian:12 nats-server 0 2.9.8-1
Debian:13 nats-server 0 2.9.8-1
Ubuntu:24.04:LTS nats-server 0 2.10.7-1
go github.com/nats-io/nats-server 0 No fix

Related vulnerabilities