/

CVE-2026-33217

Severity:

HIGH RISK

(7.1)

Improper Authorization in NATS Server MQTT Subject ACLs

CVE-2026-33217

Modified

Vulnerability type

Category:

Improper Authorization

CWE:

CWE-863, CWE-425

Impact:

Unauthorized Access to Messaging Subjects and Data Exposure

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

NATS Server contained an authorization flaw where access control lists (ACLs) on message subjects were not enforced for subjects in the $MQTT.> namespace.

This gap allowed MQTT clients to bypass configured ACL checks for MQTT subjects, potentially publishing or subscribing to messages they were intended to be denied from accessing in environments relying on subject-based ACLs.

Affected context

The vulnerability appears in NATS Server deployments that:

  • Use subject-based ACLs for access control, and
  • Enable and accept MQTT client connections, and
  • Rely on subject ACLs to protect sensitive MQTT message subjects.

It specifically affects message subjects under the $MQTT.> namespace, where ACL rules that apply elsewhere in the system are not consistently enforced for MQTT clients.

Exploit preconditions

  • Attack surface: NATS Server's MQTT interface and subject routing logic.
  • Required access: Ability to connect as an MQTT client to the affected NATS Server (with any level of valid credentials or in deployments allowing unauthenticated MQTT access).
  • Trigger point: Publishing or subscribing to MQTT subjects that map into the $MQTT.> namespace where ACLs should be applied but are not.
  • Why exploitation is possible: The authorization layer fails to evaluate or enforce configured ACL rules on the $MQTT.> subject hierarchy, creating a discrepancy between expected and actual access control behavior.

Why this happens

This issue stems from inconsistent authorization enforcement in the subject routing and ACL evaluation logic for MQTT-derived subjects.

While ACLs are defined to restrict access to message subjects, the $MQTT.> namespace was effectively treated as an exception path where these checks were not applied or were bypassed.

Conceptually, this maps to CWE-863: Incorrect Authorization, where logic that should enforce permissions on a resource (here, MQTT subjects mapped into $MQTT.>) is incomplete or missing, allowing users to perform operations beyond their intended authorization.

Potential impact

  • MQTT clients may publish messages to subjects they should not be allowed to write to.
  • MQTT clients may subscribe to subjects and receive messages that should be restricted, leading to data exposure.
  • Security assumptions based on subject ACLs can be invalidated, undermining multi-tenant isolation or internal segmentation.
  • Misuse of unauthorized messaging channels could facilitate abuse workflows, such as spoofed events or unauthorized control messages within message-driven systems.

General mitigation guidance

Mitigations generally focus on tightening and validating authorization boundaries between protocol frontends and internal subject namespaces:

  • Ensure that all protocol entry points (including MQTT) consistently pass through the same ACL evaluation pipeline and that there are no special namespaces exempt from checks.
  • Favor secure-by-default configurations where newly introduced subject hierarchies or protocol mappings inherit existing ACL policies rather than requiring separate, opt-in rules.
  • Minimize implicit trust in protocol-specific namespaces by designing ACLs and routing rules that treat them as first-class resources subject to explicit authorization.
  • Apply the principle of least privilege to client credentials, limiting the subjects that MQTT clients can reach and avoiding overly broad wildcard permissions.
  • Implement configuration review practices that consider cross-protocol behavior (NATS native, MQTT, WebSockets, etc.) to prevent gaps in effective access control.

How teams detect issues like this

Detection typically involves validating that subject ACLs behave consistently across all protocol entry points:

  • Configuration analysis: Review NATS account and permission configurations to identify assumptions that all subject hierarchies are equally protected, especially around $MQTT.> and other special namespaces.
  • Authorization testing: Use integration tests or security tests to verify that MQTT clients cannot publish/subscribe to subjects that are denied to equivalent NATS-native clients, watching for discrepancies.
  • Logging and monitoring: Enable detailed authorization and access logs for subject operations, and alert on MQTT clients accessing subjects that appear outside their intended ACL scope.
  • Code and policy review: In custom deployments or forks, inspect protocol gateway implementations to ensure subject mappings and ACL enforcement paths are unified, and use security linters or policy-as-code tools to validate authorization rules.

Sources

SourceLink
advisories.nats.ioadvisories.nats.io/CVE/secnote-2026-07.txt
github.comgithub.com/nats-io/nats-server/security/advisories/GHSA-jxxm-27vp-c3m5
access.redhat.comaccess.redhat.com/errata/RHSA-2026:21769
access.redhat.comaccess.redhat.com/errata/RHSA-2026:22347
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23345
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-33217
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2451446
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-33217.json

Frequently asked

questions

Yes, in typical deployments it is remotely exploitable by any MQTT client that can connect to the affected NATS Server instance. The client can attempt to publish or subscribe to subjects in the $MQTT.> namespace that should have been restricted by ACLs.

The attacker needs network-level access to the NATS Server's MQTT endpoint and whatever baseline credentials or connection permissions are required by that deployment. If the MQTT interface is exposed broadly or has weak authentication, the effective access requirement is low.

The safest pattern is to ensure that all subject operations—regardless of protocol (MQTT, native NATS, etc.) or namespace—flow through a single, consistent authorization mechanism. Any new namespaces or protocol mappings should inherit existing ACL rules and be explicitly covered by tests that validate expected deny and allow behavior.

To prevent similar authorization gaps, treat access control as a central service rather than embedding protocol-specific exceptions, require cross-protocol security tests for new features, and maintain clear documentation of special namespaces or routing rules. Regularly perform security-focused code reviews and integration testing to catch cases where new entry points bypass established ACL enforcement paths.

Find out what's already
exploitable in your codebase.