MEDIUM 4.3

CVE-2026-58209: NATS Server MQTT Authorization Bypass via Retained Message Delivery

NATS Server has a flaw in how it enforces message access controls when delivering retained messages and replaying durable messages over MQTT. Specifically, the server fails to consistently verify that a subscriber's deny rules should block a message before delivering it. An authenticated attacker with subscriber access could receive messages they should not have access to because the server bypasses access checks during certain message delivery scenarios. This affects versions before 2.14.3 and 2.12.12.

Source data · NVD / CISA · public domain

CVSS
3.1 · 4.3 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
Weaknesses (CWE)
CWE-863
Affected products
1 configuration(s)
Published / Modified
2026-07-08 / 2026-07-13

NVD description (verbatim)

NATS Server is a high-performance server for NATS.io, the cloud and edge native messaging system. Prior to 2.14.3 and 2.12.12, MQTT retained message delivery and QoS1+ durable replay could deliver messages whose original topics matched a subscriber configured subscribe deny rule because these delivery paths did not consistently recheck the concrete original topic before sending the MQTT PUBLISH to the subscriber. This issue is fixed in versions 2.14.3 and 2.12.12.

5 reference(s) · View on NVD →

SEC.co analysis · AI-assisted, reviewed against source

Technical summary

CVE-2026-58209 is an authorization bypass in NATS Server's MQTT message delivery paths. The vulnerability exists in the handling of retained message delivery and QoS1+ durable replay mechanisms. When NATS redelivers these messages to subscribers, the system does not consistently re-validate the original topic against the subscriber's configured deny rules before sending the MQTT PUBLISH frame. This allows messages whose original topics should trigger a deny rule to be delivered anyway, violating the intended access control policy. The flaw stems from incomplete topic verification in specific code paths (retained and durable replay) that were not subjected to the same deny-rule rechecking performed in normal message flows.

Business impact

For organizations relying on NATS Server's access controls to enforce topic-level message isolation—such as multi-tenant deployments or systems segregating sensitive topics by subscriber role—this vulnerability represents a confidentiality risk. An authenticated user could access information they are not authorized to see through retained messages or durably replayed queues, potentially exposing proprietary data, PII, or system secrets. In cloud and edge environments where NATS is commonly used, this could impact data governance and compliance posture if sensitive topics are supposed to be restricted by role.

Affected systems

NATS Server versions prior to 2.14.3 (all 2.14.x releases before 2.14.3) and prior to 2.12.12 (all 2.12.x releases before 2.12.12) are affected. This includes earlier 2.x release lines. The vulnerability specifically impacts deployments that use MQTT protocol integration with NATS Server and rely on subscribe deny rules to enforce access control. Organizations using only the native NATS protocol without MQTT may have reduced exposure, though the underlying access-check logic may also be present in other code paths.

Exploitability

The vulnerability requires an attacker to be an authenticated subscriber with valid credentials to the NATS Server. This is a low-privilege but authenticated attack. Exploitation does not require user interaction, special network conditions, or interaction with another user. An authenticated subscriber simply needs to receive a retained message or subscribe to a durable queue where messages matching a deny-rule topic are replayed. The attack surface is internal to organizations using NATS, assuming network access controls prevent unauthenticated connections. CVSS 4.3 (Medium) reflects the authenticated requirement and limited impact (confidentiality only, no integrity or availability impact).

Remediation

Upgrade NATS Server to version 2.14.3 or later (for 2.14.x branch) or 2.12.12 or later (for 2.12.x branch). Organizations on earlier 2.x release lines should verify the latest stable version available and upgrade accordingly. Before upgrading, test in a non-production environment to ensure compatibility with existing MQTT client configurations and access control policies. After patching, validate that deny rules are being enforced correctly by conducting targeted testing or reviewing access logs.

Patch guidance

1. Identify all NATS Server instances in your environment and their current versions. 2. Prioritize instances exposed to untrusted or semi-trusted internal users, or those handling sensitive multi-tenant data. 3. Plan a maintenance window and upgrade affected servers to the patched versions (2.14.3+ or 2.12.12+). 4. Review the NATS release notes for any breaking changes or configuration adjustments needed. 5. After patching, restart NATS servers and verify that MQTT client connections re-establish and reconnect successfully. 6. Confirm that deny rules are applied by testing subscriber access to restricted topics using a test MQTT client.

Detection guidance

Monitor NATS Server logs for unusual subscription patterns or deny-rule violations. Configure audit logging if available to track which subscribers receive messages from which topics. Use NATS monitoring endpoints (if exposed only to trusted networks) to inspect subscriber metadata and topic filters. In a multi-tenant scenario, establish baseline metrics of normal retained message and durable queue replay activity, then alert on anomalies. If you suspect exploitation, review historical message delivery logs to identify if any subscriber received messages matching a deny-rule topic. Network-level detection is difficult without inline MQTT inspection; focus on NATS-level logging and access auditing.

Why prioritize this

Although the CVSS score is Medium (4.3), this vulnerability should be prioritized for patching in the near term because: (1) it directly undermines access control enforcement, which is a foundational security control in multi-tenant or role-based environments; (2) exploitation is straightforward for an authenticated insider; (3) the impact is confidentiality loss without warning; and (4) many organizations deploying NATS in cloud or edge scenarios depend on topic-level access control. Do not deprioritize simply because the CVSS is not Critical; the control-plane nature of the flaw warrants timely remediation.

Risk score, explained

CVSS 4.3 Medium is assigned because the vulnerability requires authentication (reducing exploitability), has low complexity, affects only confidentiality (not integrity or availability), and is scoped to the subscriber's view of a single NATS instance. However, the underlying issue—authorization bypass—is more severe in practice than the numeric score suggests, particularly in regulated industries or sensitive deployments. Organizations should assess their own risk based on (1) whether they rely on deny rules to enforce data segregation, (2) the sensitivity of their topics, and (3) whether they have untrusted insiders or external contractors with valid subscriber credentials.

Frequently asked questions

Does this affect native NATS protocol clients, or only MQTT?

The vulnerability is documented in the MQTT message delivery and QoS1+ durable replay paths. However, the underlying access-check logic may be shared with other code paths. Organizations using only native NATS protocol should still verify their NATS version and apply patches, as a similar authorization bypass could theoretically exist elsewhere. Upgrade to the patched versions as a precaution.

If we don't use retained messages or durable queues, are we unaffected?

Retained messages and durable QoS1+ replay are the two documented vulnerable paths. If your deployment does not use these features, your risk is lower, but we recommend upgrading anyway. Deny rules are a security boundary; it is important to ensure all code paths respect them. Verify your NATS configuration and client usage to confirm these features are not in use.

How can we test whether our deny rules are being bypassed?

Set up a test subscriber with a deny rule for a specific topic (e.g., deny on 'secret.*'). Publish a retained message to 'secret.data', then subscribe with a test client that should be denied access. If the message is delivered, the deny rule was bypassed. Perform the same test with a durable queue. After patching, repeat the test to confirm the deny rule is now enforced.

What if we can't patch immediately? Are there any mitigations?

Temporary mitigations are limited because the flaw is in the NATS Server code itself. Consider: (1) Restricting subscriber credentials to users who should have broad topic access, reducing the attack surface. (2) Implementing network-level topic encryption if sensitive data is in retained messages. (3) Disabling MQTT support if it is not required. (4) Auditing access logs and subscriber activity closely. However, these do not eliminate the risk; patching is the definitive remedy.

This vulnerability intelligence is based on the published CVE record and vendor advisory as of the modification date (2026-07-13). Verify all patch versions and affected product ranges against the official NATS release notes and Linux Foundation security advisories. No exploit code is provided. Organizations should conduct their own risk assessment and testing before deploying patches in production. SEC.co does not warrant the completeness or accuracy of this analysis; use it as one input to your vulnerability management process, not as your sole source of truth. Source: NVD (public-domain), retrieved 2026-08-17. Analysis generated by SEC.co (claude-haiku-4-5).