test: update module github.com/nats-io/nats-server/v2 to v2.11.15 [security]#76
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
Conversation
Contributor
Author
ℹ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #76 +/- ##
=======================================
Coverage 54.81% 54.81%
=======================================
Files 25 25
Lines 1609 1609
=======================================
Hits 882 882
Misses 630 630
Partials 97 97 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3cb83fd to
1dd0113
Compare
1dd0113 to
35725fc
Compare
35725fc to
69e2624
Compare
Contributor
Author
ℹ️ Artifact update noticeFile name: go.modIn order to perform the update(s) described in the table above, Renovate ran the
Details:
|
69e2624 to
2765e0c
Compare
2765e0c to
a6bcd4a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v2.10.17→v2.11.15GitHub Vulnerability Alerts
CVE-2025-30215
Advisory
The management of JetStream assets happens with messages in the
$JS.subject namespace in the system account; this is partially exposed into regular accounts to allow account holders to manage their assets.Some of the JS API requests were missing access controls, allowing any user with JS management permissions in any account to perform certain administrative actions on any JS asset in any other account. At least one of the unprotected APIs allows for data destruction. None of the affected APIs allow disclosing stream contents.
Affected versions
NATS Server:
Original Report
(Lightly edited to confirm some supposition and in the summary to use past tense)
Summary
nats-server did not include authorization checks on 4 separate admin-level JetStream APIs: account purge, server remove, account stream move, and account stream cancel-move.
In all cases, APIs are not properly restricted to system-account users. Instead, any authorized user can execute the APIs, including across account boundaries, as long as the current user merely has permission to publish on
$JS.>.Only the first seems to be of highest severity. All are included in this single report as they seem likely to have the same underlying root cause.
Reproduction of the
ACCOUNT.PURGEcase is below. The others are like it.Details & Impact
Issue 1:
$JS.API.ACCOUNT.PURGE.*Any user may perform an account purge of any other account (including their own).
Risk: total destruction of Jetstream configuration and data.
Issue 2:
$JS.API.SERVER.REMOVEAny user may remove servers from Jetstream clusters.
Risk: Loss of data redundancy, reduction of service quality.
Issue 3:
$JS.API.ACCOUNT.STREAM.MOVE.*.*andCANCEL_MOVEAny user may cause streams to be moved between servers.
Risk: loss of control of data provenance, reduced service quality during move, enumeration of account and/or stream names.
Similarly for
$JS.API.ACCOUNT.STREAM.CANCEL_MOVE.*.*Mitigations
It appears that users without permission to publish on
$JS.API.ACCOUNT.>or$JS.API.SERVER.>are unable to execute the above APIs.Unfortunately, in many configurations, an 'admin' user for a single account will be given permissions for
$JS.>(or simply>), which allows the improper access to the system APIs above.Scope of impact
Issues 1 and 3 both cross boundaries between accounts, violating promised account isolation. All 3 allow system level access to non-system account users.
While I cannot speak to what authz configurations are actually found in the wild, per the discussion in Mitigations above, it seems likely that at least some configurations are vulnerable.
Additional notes
It appears that
$JS.API.META.LEADER.STEPDOWNdoes properly restrict to system account users. As such, this may be a pattern for how to properly authorize these other APIs.PoC
Environment
Tested with:
nats-server 2.10.26 (installed via homebrew)
nats cli 0.1.6 (installed via homebrew)
macOS 13.7.4
Reproduction steps
CVE-2026-27571
Impact
The WebSockets handling of NATS messages handles compressed messages via the WebSockets negotiated compression. The implementation bound the memory size of a NATS message but did not independently bound the memory consumption of the memory stream when constructing a NATS message which might then fail validation for size reasons.
An attacker can use a compression bomb to cause excessive memory consumption, often resulting in the operating system terminating the server process.
The use of compression is negotiated before authentication, so this does not require valid NATS credentials to exploit.
The fix was to bounds the decompression to fail once the message was too large, instead of continuing on.
Patches
This was released in nats-server without being highlighted as a security issue. It should have been, this was an oversight. Per the NATS security policy, because this does not require a valid user, it is CVE-worthy.
This was fixed in the v2.11 series with v2.11.12 and in the v2.12 series with v2.12.3.
Workarounds
This only affects deployments which use WebSockets and which expose the network port to untrusted end-points.
References
This was reported to the NATS maintainers by Pavel Kohout of Aisle Research (www.aisle.com).
CVE-2026-33247
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
The nats-server provides an optional monitoring port, which provides access to sensitive data. The nats-server can take certain configuration options on the command-line instead of requiring a configuration file.
Problem Description
If a nats-server is run with static credentials for all clients provided via argv (the command-line), then those credentials are visible to any user who can see the monitoring port, if that too is enabled.
The
/debug/varsend-point contains an unredacted copy of argv.Patches
Fixed in nats-server 2.12.6 & 2.11.15
Workarounds
The NATS Maintainers are bemused at the concept of someone deploying a real configuration using
--passto avoid a config file, but also enabling monitoring.Configure credentials inside a configuration file instead of via argv.
Do not enable the monitoring port if using secrets in argv.
Best practice remains to not expose the monitoring port to the Internet, or to untrusted network sources.
CVE-2026-29785
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
When configured to accept leafnode connections (for a hub/spoke topology of multiple nats-servers), then the default configuration allows for negotiating compression; a malicious remote NATS server can trigger a server panic via that compression.
Problem Description
If the nats-server has the "leafnode" configuration enabled (not default), then anyone who can connect can crash the nats-server by triggering a panic. This happens pre-authentication and requires that compression be enabled (which it is, by default, when leafnodes are used).
Context: a NATS server can form various clustering topologies, including local clusters, and superclusters of clusters, but leafnodes allow for separate administrative domains to link together with limited data communication; eg, a server in a moving vehicle might use a local leafnode for agents to connect to, and sync up to a central service as and when available. The leafnode configuration here is where the central server allows other NATS servers to connect into it, almost like regular NATS clients. Documentation examples typically use port 7422 for leafnode communications.
Affected Versions
Version 2, prior to v2.11.14 or v2.12.5
Workarounds
Disable compression on the leafnode port:
CVE-2026-33215
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
The nats-server provides an MQTT client interface.
Problem Description
Sessions and Messages can by hijacked via MQTT Client ID malfeasance.
Affected Versions
Any version before v2.12.6 or v2.11.15
Workarounds
None.
Resources
CVE-2026-33216
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
The nats-server provides an MQTT client interface.
Problem Description
For MQTT deployments using usercodes/passwords: MQTT passwords are incorrectly classified as a non-authenticating identity statement (JWT) and exposed via monitoring endpoints.
Affected Versions
Any version before v2.12.6 or v2.11.15
Workarounds
Ensure monitoring end-points are adequately secured.
Best practice remains to not expose the monitoring endpoint to the Internet or other untrusted network users.
CVE-2026-33217
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
The nats-server provides an MQTT client interface.
Problem Description
When using ACLs on message subjects, these ACLs were not applied in the
$MQTT.>namespace, allowing MQTT clients to bypass ACL checks for MQTT subjects.Affected Versions
Any version before v2.12.6 or v2.11.15
Workarounds
None.
CVE-2026-33218
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
The nats-server allows hub/spoke topologies using "leafnode" connections by other nats-servers.
Problem Description
A client which can connect to the leafnode port can crash the nats-server with a certain malformed message pre-authentication.
Affected Versions
Any version before v2.12.6 or v2.11.15
Workarounds
References
CVE-2026-33219
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
The nats-server offers a WebSockets client service, used in deployments where browsers are the NATS clients.
Problem Description
A malicious client which can connect to the WebSockets port can cause unbounded memory use in the nats-server before authentication; this requires sending a corresponding amount of data.
This is a milder variant of NATS-advisory-ID 2026-02 (aka CVE-2026-27571; GHSA-qrvq-68c2-7grw).
That earlier issue was a compression bomb, this vulnerability is not. Attacks against this new issue thus require significant client bandwidth.
Affected Versions
Any version before v2.12.6 or v2.11.15
Workarounds
Disable websockets if not required for project deployment.
CVE-2026-33222
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
The persistent storage feature, JetStream, has a management API which has many features, amongst which are backup and restore.
Problem Description
Users with JetStream admin API access to restore one stream could restore to other stream names, impacting data which should have been protected against them.
Affected Versions
Any version before v2.12.6 or v2.11.15
Workarounds
If developers have configured users to have limited JetStream restore permissions, temporarily remove those permissions.
CVE-2026-33223
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
The nats-server offers a
Nats-Request-Info:message header, providing information about a request.Problem Description
The NATS message header
Nats-Request-Info:is supposed to be a guarantee of identity by the NATS server, but the stripping of this header from inbound messages was not fully effective.An attacker with valid credentials for any regular client interface could thus spoof their identity to services which rely upon this header.
Affected Versions
Any version before v2.12.6 or v2.11.15
Workarounds
None.
CVE-2026-33246
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
The nats-server allows hub/spoke topologies using "leafnode" connections by other nats-servers. NATS messages can have headers.
Problem Description
The nats-server offers a
Nats-Request-Info:message header, providing information about a request. This is supposed to provide enough information to allow for account/user identification, such that NATS clients could make their own decisions on how to trust a message, provided that they trust the nats-server as a broker.A leafnode connecting to a nats-server is not fully trusted unless the system account is bridged too. Thus identity claims should not have propagated unchecked.
Thus NATS clients relying upon the Nats-Request-Info: header could be spoofed.
Does not directly affect the nats-server itself, but the CVSS Confidentiality and Integrity scores are based upon what a hypothetical client might choose to do with this NATS header.
Affected Versions
Any version before v2.12.6 or v2.11.15
Workarounds
None.
CVE-2026-33248
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
One authentication model supported is mTLS, deriving the NATS client identity from properties of the TLS Client Certificate.
Problem Description
When using mTLS for client identity, with
verify_and_mapto derive a NATS identity from the client certificate's Subject DN, certain patterns of RDN would not be correctly enforced, allowing for authentication bypass.This does require a valid certificate from a CA already trusted for client certificates, and
DNnaming patterns which the NATS maintainers consider highly unlikely.So this is an unlikely attack. Nonetheless, administrators who have been very sophisticated in their
DNconstruction patterns might conceivably be impacted.Affected Versions
Fixed in nats-server 2.12.6 & 2.11.15
Workarounds
Developers should review their CA issuing practices.
CVE-2026-27889
Background
NATS.io is a high performance open source pub-sub distributed communication technology, built for the cloud, on-premise, IoT, and edge computing.
When using WebSockets, a malicious client can trigger a server crash with crafted frames, before authentication.
Problem Description
A missing sanity check on a WebSockets frame could trigger a server panic in the nats-server. This happens before authentication, and so is exposed to anyone who can connect to the websockets port.
Affected versions
Version 2 from v2.2.0 onwards, prior to v2.11.14 or v2.12.5
Workarounds
This only affects deployments which use WebSockets and which expose the network port to untrusted end-points. If able to do so, a defense in depth of restricting either of these will mitigate the attack.
Solution
Upgrade the NATS server to a fixed version.
Credits
This was reported to the NATS maintainers by GitHub user Mistz1.
Also independently reported by GitHub user jiayuqi7813.
Report by @Mistz1
Summary
An unauthenticated remote attacker can crash the entire nats-server process by sending a single malicious WebSocket frame (15 bytes after the HTTP upgrade handshake). The server fails to validate the RFC 6455 §5.2 requirement that the most significant bit of a 64-bit extended payload length must be zero. The resulting
uint64→intconversion produces a negative value, which bypasses the bounds clamp and triggers an unrecoveredpanicin the connection's goroutine — killing the entire server process and disconnecting all clients. This affects all platforms (64-bit and 32-bit).Details
Vulnerable code:
server/websocket.goline 278When a WebSocket frame uses the 64-bit extended payload length (length code 127), the server reads 8 bytes and casts the raw
uint64directly tointwith no validation. RFC 6455 §5.2 states: "the most significant bit MUST be 0" — but nats-server never checks this.Attack chain:
The attacker sends a WebSocket frame with the MSB set in the 64-bit length field (e.g.,
0x8000000000000001).At line 278,
int(0x8000000000000001)produces-9223372036854775807on 64-bit Go (two's complement reinterpretation — Go does not panic on integer conversion overflow).r.remis now negative. At line 307–311, the bounds clamp fails:The addition
pos + nwraps to a negative value (Go signed integer overflow is defined behavior — it wraps silently). Since the negative result is never greater thanmax, the clamp is skipped. The slice expression at line 311 reaches the Go runtime bounds check, which panics.There is no
defer recover()anywhere in the goroutine chain:startGoRoutine:go func() { f() }()— no recoveryreadLoop: defer only does cleanup — no recoveryThe unrecovered panic propagates to Go's runtime, which calls
os.Exit(2). The entire nats-server process terminates.The WebSocket frame is parsed in
wsRead()called fromreadLoop(), which starts immediately after the HTTP upgrade — before any NATS CONNECT authentication. No credentials are required.Why 15 bytes, not 14: The 14-byte frame header (opcode + length + mask key) exactly fills the read buffer on the first call, so
pos == maxand the payload loop at line 303 (if pos < max) is skipped. The poisonedr.rempersists in thewsReadInfostruct. One additional byte of "payload" is needed so thatpos < maxon either the same or next read, entering the panic path at line 311.PoC
Server configuration (
test-ws.conf):Start the server:
Exploit (
poc_ws_crash.go):Run:
Observed server output before termination:
Tested against: nats-server v2.14.0-dev (commit
a69f51f), Go 1.25.7, linux/amd64.Impact
Vulnerability type: Pre-authentication remote denial of service (full process crash).
Who is impacted: Any nats-server deployment with WebSocket listeners enabled (
websocket { ... }in config), including MQTT-over-WebSocket. This is an increasingly common configuration for browser-based and IoT clients. The attacker needs only TCP access to the WebSocket port — no credentials, no valid NATS client, no TLS client certificate.Severity: A single unauthenticated TCP connection sending 15 bytes crashes the entire server process. All connected clients (NATS, WebSocket, MQTT, cluster routes, gateways, leaf nodes) are immediately disconnected. JetStream in-flight acknowledgments are lost and Raft consensus is disrupted in clustered deployments. The attack is repeatable on every server restart.
Affected platforms: All — confirmed on 64-bit (linux/amd64); 32-bit platforms (linux/386, linux/arm) are also affected with additional frame-desync consequences.
( NATS retains the original external report below the cut, with exploit details.
This issue was also independently reported by GitHub user @jiayuqi7813 before publication; they provided a Python exploit.)
Release Notes
nats-io/nats-server (github.com/nats-io/nats-server/v2)
v2.11.15Compare Source
Changelog
Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.
Go Version
Dependencies
CVEs
Improved
JetStream
MQTT
Fixed
General
Nats-Trace-Destmessage header for message tracing now requires that the client have publish permissions to the specified subject, an error is returned otherwiseJetStream
Leafnodes
MQTT
$MQTT.sub.and$MQTT.deliver.pubrel.prefixes.,>,*, spaces, tabs) are no longer permitted in MQTT client IDsWebSockets
Complete Changes
v2.11.14Compare Source
Changelog
Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.
Go Version
Dependencies
CVEs
Fixed
Leafnodes
WebSockets
Originheader validation now validates the protocol scheme as well as host and portCLOSEframe lengths and status codes are now validated correctlyComplete Changes
v2.11.12Compare Source
Changelog
Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.
Go Version
Dependencies
Added
General
ping_internalin thewebsocketblock (#7614)Monitoring
tls_cert_not_afterto thevarzmonitoring endpoint for showing when TLS certificates are due to expire (#7709)Improved
JetStream
MQTT
Fixed
General
JetStream
AsyncFlushis enabled after a process pause (#7594)corrupt record stateerror (#7627)no idx presentcache errors (#7634)$JS.>namespace (#7720)cluster_trafficin config mode has been fixed (#7723)MQTT
$MQTT.subscriptions are now handled implicitly, with the exception ofdenyACLs which still permit restriction (#7637)Complete Changes
v2.11.11Compare Source
Changelog
Refer to the 2.11 Upgrade Guide for backwards compatibility notes with 2.10.x.
Go Version
Dependencies
070ab1a(#7539)Added
JetStream
meta_compactandmeta_compact_size, advanced JetStream config options to control how many log entries must be present in the metalayer log before snapshotting and compaction takes place (#7484, #7521)write_timeoutoption for clients, routes, gateways and leafnodes which controls the behaviour on reaching thewrite_deadline, values can bedefault,retryorclose(#7513)Monitoring
/jszendpoint (#7524)/jszendpoint can now show direct consumers with thedirect-consumers?trueflag (#7543)Improved
General
JetStream
max_bytesandmax_msgslimits (#7455)>for both republish source and destination (#7515)Monitoring
jszmonitoring endpoint can now report leader counts (#7429)Fixed
General
JetStream
sync_alwaysfor writing TTL and scheduling state files (#7385)Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.