Nov 19, 2026·9 min read·5 visits
An incomplete prefix check in NATS Server's MQTT subscription handler allows authenticated MQTT clients to bypass access controls and subscribe to internal `$MQTT.deliver.pubrel.*` subjects, exposing QoS 2 delivery metadata across the account. Upgrade to NATS Server v2.12.12 or v2.14.3.
CVE-2026-58214 is an incorrect authorization vulnerability (CWE-863) in the MQTT bridge implementation of NATS Server. The vulnerability results from an incomplete fix for CVE-2026-33217 within the subscription processing routine in server/mqtt.go. Because internal delivery subscriptions bypass standard account-level allow-list validation in canSubscribe, the MQTT session manager relies on explicit prefix filtering in processSubs to prevent clients from subscribing to internal broker subjects. Affected versions fail to validate incoming MQTT subscription filters against the internal QoS 2 PubRel delivery prefix ($MQTT.deliver.pubrel.), allowing authenticated MQTT clients to subscribe to internal operational subjects and monitor QoS 2 protocol metadata across all sessions within the same NATS account.
NATS Server (nats-server) is an open-source, high-performance distributed messaging system written in Go and maintained under the Cloud Native Computing Foundation (CNCF). In addition to the native NATS protocol, NATS Server includes a built-in MQTT 3.1.1 and MQTT 5.0 protocol bridge that allows standard MQTT clients to connect, publish, and subscribe alongside native NATS clients.
To map MQTT semantics onto the native NATS architecture, the server translates slash-delimited MQTT topic hierarchies (such as sensor/temperature/+) into dot-delimited NATS subject spaces (sensor.temperature.*). Furthermore, to implement stateful MQTT features such as Quality of Service (QoS) level 1 and level 2 delivery guarantees, NATS Server relies on JetStream and a dedicated set of reserved internal NATS subjects prefixed with $MQTT..
CVE-2026-58214 (also tracked as GHSA-4g68-3pwx-5vfj and BIT-nats-2026-58214) is an Incorrect Authorization vulnerability (CWE-863) within the MQTT subscription processing pipeline. It stems from an incomplete remediation of a prior access control flaw, CVE-2026-33217. When an authenticated MQTT client requests a subscription, the broker must verify that the translated NATS subject does not collide with internal control planes.
In vulnerable versions of NATS Server prior to v2.12.12 and v2.14.3, the subscription validator checks for the internal message storage prefix ($MQTT.msgs.) but omits validation for the QoS 2 Publish Release (PUBREL) delivery prefix ($MQTT.deliver.pubrel.). Consequently, any authenticated MQTT client can subscribe to $MQTT/deliver/pubrel/+ and intercept internal QoS 2 protocol synchronization metadata belonging to other MQTT clients within the same NATS account.
Understanding the root cause of CVE-2026-58214 requires examining how NATS Server enforces subject permissions and how the MQTT bridge wires internal delivery consumers. In standard NATS operations, whenever a client issues a subscription request, the server invokes canSubscribe() to evaluate the target subject against the client's configured allow and deny access control lists (ACLs).
However, the internal MQTT engine needs to establish internal NATS subscriptions on behalf of connected MQTT sessions to route state and delivery acknowledgments. specifically, MQTT QoS 2 ("exactly-once" delivery) uses a four-part handshake consisting of PUBLISH, PUBREC (Publish Received), PUBREL (Publish Release), and PUBCOMP (Publish Complete). To track and route the PUBREL phase across the cluster, NATS Server uses subjects prefixed with mqttPubRelDeliverySubjectPrefix, which resolves to $MQTT.deliver.pubrel..
Because restrictive user-level ACL allow-lists would otherwise break the broker's internal plumbing if applied to system subjects, the canSubscribe() function intentionally bypasses allow-list verification for internal delivery prefixes, including $MQTT.deliver.pubrel.. As a consequence of this architectural bypass, canSubscribe() cannot be relied upon to block untrusted external MQTT clients from requesting subscriptions to that prefix.
Therefore, the sole security boundary preventing an external MQTT client from subscribing to internal $MQTT. namespaces is the pre-processing check inside mqttAccountSessionManager.processSubs() in server/mqtt.go. When CVE-2026-33217 was patched, the developers added a prefix check in processSubs() that rejected any translated filter starting with mqttSubPrefix ($MQTT.msgs.). Because that fix did not include mqttPubRelDeliverySubjectPrefix ($MQTT.deliver.pubrel.), filters targeting the PubRel delivery channel passed straight through processSubs() and were subsequently auto-approved by the internal bypass logic in canSubscribe().
The vulnerability resides in server/mqtt.go inside the processSubs method of the mqttAccountSessionManager struct. Prior to calling this check, NATS Server converts the incoming MQTT topic filter from slash notation ($MQTT/deliver/pubrel/+) into NATS dot notation ($MQTT.deliver.pubrel.*) and stores it in f.filter.
In the vulnerable implementation, the code iterates through the slice of requested subscription filters and evaluates whether f.filter begins with mqttSubPrefix. If it matches, the subscription is denied by setting f.qos = mqttSubAckFailure (which translates to the MQTT 0x80 SUBACK failure code) and skipping registration.
// Vulnerable code in server/mqtt.go
func (as *mqttAccountSessionManager) processSubs(sess *mqttSession, c *client, ...)
{
// ... [topic conversion and validation] ...
// Only checks mqttSubPrefix ("$MQTT.msgs.")
// Fails to check mqttPubRelDeliverySubjectPrefix ("$MQTT.deliver.pubrel.")
if strings.HasPrefix(f.filter, mqttSubPrefix) {
f.qos = mqttSubAckFailure
continue
}In commits 297b166be60fe13144084eed4b25201ead03204a and 34b09657bb596d5f850eaa5cfc97ea6b2f989a97, the condition in processSubs was expanded to explicitly check for mqttPubRelDeliverySubjectPrefix alongside mqttSubPrefix.
File: server/mqtt.go
@@ -2543,7 +2543,8 @@ func (as *mqttAccountSessionManager) processSubs(sess *mqttSession, c *client,
// TODO: (levb: not sure why since one can subscribe to `#` and it'll
// include everything; I guess this would discourage? Otherwise another
// candidate for DO NOT DELIVER prefix list).
- if strings.HasPrefix(f.filter, mqttSubPrefix) {
+ if strings.HasPrefix(f.filter, mqttSubPrefix) ||
+ strings.HasPrefix(f.filter, mqttPubRelDeliverySubjectPrefix) {
f.qos = mqttSubAckFailure
continue
}The patch also introduced a regression test in server/mqtt_test.go within TestMQTTPermissionsViolation. The test comment explicitly documents the architectural nuance: unlike $MQTT.msgs.*, canSubscribe bypasses the allow-list for $MQTT.deliver.pubrel.* so that internal subscriptions function under restricted user contexts, making processSubs the only guard capable of rejecting client requests.
// Patched unit test verification in server/mqtt_test.go
// MQTT clients should not be able to subscribe to the internal
// "$MQTT.deliver.pubrel.*" subjects either. Unlike "$MQTT.msgs.*",
// canSubscribe bypasses the allow-list for this prefix (so internal
// subscriptions work), so processSubs is the only guard that rejects it.
testMQTTSub(t, 1, mc, rc, []*mqttFilter{{
filter: strings.ReplaceAll(mqttPubRelDeliverySubjectPrefix, ".", "/") + "+",
qos: 1,
}}, []byte{mqttSubAckFailure})Regarding fix completeness, this patch specifically closes the direct subscription vector for the $MQTT.deliver.pubrel. prefix. As noted in the inline source code comment by the developers, standard MQTT top-level wildcard handling (where # does not match topics starting with $ per the MQTT specification) prevents clients from capturing $MQTT. subjects via a root # subscription, making explicit prefix blocking in processSubs effective against direct $MQTT/ filter strings.
Exploiting CVE-2026-58214 requires low privileges (PR:L) and low attack complexity (AC:L). An attacker must possess valid credentials to authenticate as an MQTT client against a NATS Server instance where the mqtt listener block is enabled (typically listening on TCP port 1883 for plaintext or 8883 for TLS). Even if the authenticated user account is configured with strict NATS subject subscribe allow-lists (for example, restricted solely to devices/telemetry/#), the exploit succeeds because canSubscribe() bypasses the allow-list for the target prefix.
To execute the attack, the adversary connects to the MQTT port using any standard MQTT client library or command-line utility (such as mosquitto_sub) and transmits a SUBSCRIBE control packet containing the topic filter $MQTT/deliver/pubrel/+ or $MQTT/deliver/pubrel/#.
# Example exploitation using mosquitto_sub with restricted user credentials
mosquitto_sub -h target-nats-broker.internal -p 1883 \
-u "restricted_mqtt_user" -P "password123" \
-t '$MQTT/deliver/pubrel/+' -q 1 -vWhen a vulnerable NATS Server receives this SUBSCRIBE packet, it translates the topic filter $MQTT/deliver/pubrel/+ into the NATS subject $MQTT.deliver.pubrel.*. In processSubs(), the filter does not match $MQTT.msgs., so it proceeds to canSubscribe(). The permission check identifies the $MQTT.deliver.pubrel. prefix as an internal delivery mechanism and grants the subscription regardless of the user's configured ACLs. The broker returns a SUBACK packet with a success return code (0x00, 0x01, or 0x02) rather than the failure code (0x80).
> [!NOTE]
> Once the subscription is active, the attacker's client passively receives internal NATS messages routed to $MQTT.deliver.pubrel.<token> whenever any other MQTT client within the same NATS account executes a QoS 2 message exchange.
CVE-2026-58214 is scored at CVSS v3.1 4.3 (Medium) with the vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N. The security impact is strictly confined to Confidentiality (C:L), with no direct impact on system Integrity (I:N) or Availability (A:N). An unauthenticated attacker cannot trigger this vulnerability unless the NATS Server is configured to allow anonymous MQTT connections.
By monitoring $MQTT.deliver.pubrel.*, an unauthorized subscriber gains visibility into internal QoS 2 protocol state messages across the entire NATS account. These messages do not carry the primary application payload of the initial PUBLISH packet, which is transmitted over $MQTT.msgs. (already blocked by the fix for CVE-2026-33217). Instead, the intercepted messages expose internal session identifiers, delivery routing tokens, packet identifiers, and message traffic patterns for in-flight QoS 2 handshakes.
In multi-tenant NATS deployments where multiple distinct devices or users share a single NATS account and rely on subject-level ACLs for logical isolation, this flaw breaks tenant isolation for protocol metadata. An attacker can observe when sibling clients are actively transmitting QoS 2 messages and extract internal session routing identifiers.
According to Exploit Prediction Scoring System (EPSS) telemetry, CVE-2026-58214 holds a score of 0.00349 (29.13th percentile), reflecting a low probability of widespread automated exploitation. The vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.
The definitive remediation for CVE-2026-58214 is to upgrade nats-server to a release containing the updated prefix validation logic in processSubs. Users operating on the 2.12.x release train must upgrade to v2.12.12 or later. Users operating on the 2.14.x release train (including any 2.14.0-RC through 2.14.2 builds) must upgrade to v2.14.3 or later.
For environments where an immediate binary upgrade or container image redeployment cannot be scheduled, administrators can apply configuration-level mitigations depending on their architecture:
mqtt { ... } configuration block is completely removed or commented out in nats-server.conf.$MQTT.deliver.pubrel.* subjects—are strictly scoped to the boundary of a NATS Account. Separating untrusted or semi-trusted MQTT clients into dedicated NATS accounts ensures that even if a client subscribes to $MQTT/deliver/pubrel/+, it cannot observe QoS 2 metadata generated by clients in other accounts.> [!IMPORTANT]
> Standard user-level subscribe deny rules or restrictive allow rules in nats-server.conf may not mitigate this vulnerability on unpatched versions because canSubscribe() explicitly bypasses permission checks for the $MQTT.deliver.pubrel. subject prefix.
Security operations teams can also monitor network traffic or MQTT proxy logs for incoming MQTT SUBSCRIBE packets containing the string $MQTT/deliver/pubrel or $MQTT.deliver.pubrel to detect potential exploitation attempts.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
nats-server nats-io / linuxfoundation | < 2.12.12 | 2.12.12 |
nats-server nats-io / linuxfoundation | >= 2.14.0-RC.1, < 2.14.3 | 2.14.3 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-863 (Incorrect Authorization) |
| CVSS v3.1 Score | 4.3 Medium (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N) |
| Attack Vector | Network (Authenticated MQTT SUBSCRIBE request) |
| Affected Component | mqttAccountSessionManager.processSubs in server/mqtt.go |
| Impact | Information disclosure of account-wide MQTT QoS 2 delivery metadata |
| EPSS Score | 0.35% (29.13th Percentile) |
| Exploit Status | Proof-of-Concept in official unit test suite |
| CISA KEV Status | Not Listed |
The software performs an authorization check when an actor attempts to access a resource or perform an action, but does not correctly perform the check, allowing the actor to access unintended internal resources.
CVE-2026-63412 is a code injection vulnerability in the Jane PHP library suite (affecting jane-php/open-api-3, jane-php/open-api-2, jane-php/open-api-31, and jane-php/json-schema) prior to version 7.12.0. The flaw occurs during the automated generation of PHP client SDKs and data models from OpenAPI specifications. While Jane uses an Abstract Syntax Tree (AST) for safe generation of standard PHP tokens, it constructs PHPDoc comments via raw string interpolation without neutralizing multi-line comment closing delimiters (*/). An attacker who provides or modifies an OpenAPI specification can inject a closing comment sequence inside a query parameter name, escaping the docblock context and writing arbitrary PHP code directly into the class body of generated endpoints or clients. When the consuming application instantiates the generated class, injected methods such as __construct() execute automatically, resulting in remote code execution.
CVE-2026-69155 (GHSA-x277-3wcg-g9r2) is a stored cross-site scripting (XSS) vulnerability in Atomic Server versions 0.30.0 prior to 0.40.3. The vulnerability resides in the HTTP file-download handler (server/src/handlers/download.rs), which serves user-uploaded files with an inline Content-Disposition and attacker-controlled MIME types such as text/html or image/svg+xml. Because the endpoint lacks X-Content-Type-Options: nosniff and Content-Security-Policy restrictions, an authenticated user with upload privileges can store malicious JavaScript that executes within a victim's browser in the primary application origin. Executing code in this context grants access to non-HttpOnly session cookies and unencrypted Ed25519 cryptographic private keys stored in IndexedDB, leading to full account takeover.
CVE-2026-69156 is an authenticated path traversal and arbitrary file read vulnerability in Ontola Atomic Server versions 0.30.0 prior to 0.40.3. The flaw arises from a failure to restrict server-managed properties during Commit ingestion in lib/src/commit.rs, combined with unsanitized filesystem path construction in the /download endpoint handler in server/src/handlers/download.rs. An authenticated Agent can assign an arbitrary relative or absolute filesystem path to the internalId property of an owned resource and retrieve the target file via the download endpoint, exposing the server configuration file (config.toml) and the root Agent ED25519 private key.
CVE-2026-69157 (GHSA-pfwx-xjp4-qxcj) is a critical missing authentication vulnerability (CWE-306) affecting Atomic Server versions 0.29.0 through 0.40.2. During initial deployment, the server exposes an unauthenticated /setup endpoint that generates an invite token granting root write permissions across the entire Drive. Because the invite redemption handler discards the redeemer identity, an unauthenticated remote attacker can intercept or request this setup invite on an unclaimed instance, register an arbitrary Agent public key, and assume full administrative control over the database.
CVE-2026-69158 is a high-severity Server-Side Request Forgery (SSRF) vulnerability in Ontola Atomic Server (atomic-server) and its underlying Rust library (atomic_lib). Prior to versions 0.40.2 and 0.40.3, the server exposed an unauthenticated HTTP GET endpoint at /bookmark (and handled user-supplied URLs via POST to /import) that fetched arbitrary caller-supplied URLs after performing only a naive string prefix check. Because endpoint routing bypassed read authorization checks and reflected the retrieved content back to the client, unauthenticated remote attackers can force the server to issue HTTP GET requests to internal network destinations, localhost services, and cloud instance metadata endpoints.
CVE-2026-71425 (GHSA-7jvc-9xq8-frff) is a Server-Side Request Forgery (SSRF) and credential exposure vulnerability in Outstatic, an open-source Next.js-based static site Content Management System (CMS). In versions prior to 2.2.1, the authenticated GitHub REST proxy (/api/outstatic/github) constructed upstream URLs via insecure string concatenation of an unvalidated endpoint parameter and merged arbitrary user-supplied HTTP headers directly into outbound requests. Because the proxy automatically attaches the active user's GitHub OAuth access token to these requests, an authenticated caller or an attacker leveraging a cross-origin request primitive can redirect the server's outbound request to an arbitrary external host and exfiltrate the OAuth bearer token.