<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Nats — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/nats/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Thu, 26 Mar 2026 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/nats/feed.xml" rel="self" type="application/rss+xml"/><item><title>NATS Server WebSocket Frame Length Overflow Denial of Service</title><link>https://feed.craftedsignal.io/briefs/2026-03-nats-websocket-dos/</link><pubDate>Thu, 26 Mar 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-03-nats-websocket-dos/</guid><description>A vulnerability in NATS server allows a remote, unauthenticated attacker to cause a denial of service by sending a crafted WebSocket frame, leading to a server crash due to missing validation on WebSocket frame length.</description><content:encoded><![CDATA[<p>A critical vulnerability exists in NATS server versions 2.2.0 through 2.11.13 and 2.12.0 through 2.12.4, enabling unauthenticated remote attackers to trigger a denial-of-service (DoS) condition. The vulnerability stems from a missing sanity check on WebSocket frame lengths, allowing malicious clients to send crafted frames that cause a server panic and crash. This issue impacts deployments that utilize WebSockets and expose the network port to untrusted endpoints. The attack requires no authentication or credentials and can be executed with a single TCP connection sending a malicious WebSocket frame. This vulnerability was reported by GitHub users Mistz1 and jiayuqi7813.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker establishes a TCP connection to the NATS server&rsquo;s WebSocket port.</li>
<li>The attacker sends a WebSocket upgrade request to initiate the WebSocket handshake.</li>
<li>The NATS server completes the WebSocket handshake, establishing a WebSocket connection.</li>
<li>The attacker sends a crafted WebSocket frame with a 64-bit extended payload length field where the most significant bit (MSB) is set (e.g., <code>0x8000000000000001</code>).</li>
<li>The server reads the 8-byte payload length but fails to validate that the MSB is zero, resulting in a negative integer value.</li>
<li>The negative value bypasses the bounds clamp in the <code>wsRead</code> function.</li>
<li>A slice operation with the negative length triggers a runtime panic due to out-of-bounds access.</li>
<li>The unrecovered panic propagates to the Go runtime, causing the entire NATS server process to terminate, disconnecting all clients.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability results in a complete denial of service, crashing the entire NATS server process. All connected clients, including NATS, WebSocket, MQTT, cluster routes, gateways, and 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, causing significant disruption to services relying on the NATS server. Any NATS server deployment with WebSocket listeners enabled is vulnerable.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the NATS server to version 2.11.14, 2.12.5, or later to patch CVE-2026-27889.</li>
<li>If upgrading is not immediately feasible, restrict access to the WebSocket port to trusted endpoints as a defense-in-depth measure, as mentioned in the overview.</li>
<li>Deploy the Sigma rule to detect connections with crafted websocket frame to your SIEM and tune for your environment.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>nats</category><category>websocket</category><category>denial-of-service</category><category>CVE-2026-27889</category><category>server-crash</category></item></channel></rss>