<?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>Microservices — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/microservices/</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>Tue, 14 Apr 2026 00:15:09 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/microservices/feed.xml" rel="self" type="application/rss+xml"/><item><title>NestJS Microservices Denial-of-Service via Recursive handleData</title><link>https://feed.craftedsignal.io/briefs/2026-04-nestjs-dos/</link><pubDate>Tue, 14 Apr 2026 00:15:09 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-nestjs-dos/</guid><description>A denial-of-service vulnerability exists in NestJS's @nestjs/microservices package, affecting versions 11.1.18 and earlier, where an attacker can send multiple small, valid JSON messages within a single TCP frame, causing a stack overflow.</description><content:encoded><![CDATA[<p>A denial-of-service vulnerability has been identified in the <code>@nestjs/microservices</code> package, specifically impacting versions up to and including 11.1.18. This vulnerability arises from the recursive nature of the <code>handleData()</code> function when processing JSON messages over TCP. An attacker can exploit this by sending a single TCP frame containing numerous small, valid JSON messages. This triggers excessive recursion, rapidly consuming stack space and ultimately leading to a stack overflow. A relatively small payload of approximately 47 KB is sufficient to trigger the <code>RangeError</code> and cause the application to crash, effectively denying service to legitimate users. The vulnerability was discovered by <a href="https://github.com/hwpark6804-gif">https://github.com/hwpark6804-gif</a> and has been addressed in version 11.1.19 of the <code>@nestjs/microservices</code> package.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker establishes a TCP connection to the NestJS microservice endpoint.</li>
<li>The attacker crafts a TCP frame containing multiple small, valid JSON messages.</li>
<li>The attacker sends the crafted TCP frame to the microservice.</li>
<li>The <code>handleData()</code> function in <code>@nestjs/microservices</code> receives the TCP frame.</li>
<li>For each JSON message in the frame, <code>handleData()</code> recursively calls itself.</li>
<li>With each recursive call, the buffer size shrinks, preventing the <code>maxBufferSize</code> from being reached.</li>
<li>The call stack overflows due to the excessive recursion.</li>
<li>A <code>RangeError</code> is triggered, crashing the NestJS microservice and causing a denial of service.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability results in a denial-of-service condition, rendering the affected NestJS microservice unavailable. This can disrupt critical application functionality that relies on the microservice. While the specific number of victims or sectors targeted is unknown, any application using a vulnerable version of <code>@nestjs/microservices</code> is susceptible. A successful attack leads to application downtime and potential data loss or corruption if the microservice is responsible for data persistence.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>@nestjs/microservices</code> package to version 11.1.19 or later to remediate the vulnerability (reference: <code>@nestjs/microservices@11.1.19</code>).</li>
<li>Deploy the Sigma rule &ldquo;Detect Excessive TCP Data&rdquo; to identify potential exploitation attempts by monitoring for unusually large TCP packets (reference: rule &ldquo;Detect Excessive TCP Data&rdquo;).</li>
<li>Monitor network traffic for connections sending abnormally large amounts of data to NestJS microservice endpoints.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>nestjs</category><category>denial-of-service</category><category>microservices</category></item></channel></rss>