<?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>Desynchronization — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/desynchronization/</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>Wed, 03 Jan 2024 18:22:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/desynchronization/feed.xml" rel="self" type="application/rss+xml"/><item><title>Netty HttpClientCodec Response Desynchronization Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-netty-desync/</link><pubDate>Wed, 03 Jan 2024 18:22:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-netty-desync/</guid><description>The Netty HttpClientCodec is vulnerable to response desynchronization when configured with HTTP/1.1 pipelining, HEAD requests, and the server sends 1xx responses, leading to a response body from one request being parsed as another and potentially unsafe socket reuse.</description><content:encoded><![CDATA[<p>A response desynchronization vulnerability exists in Netty&rsquo;s <code>HttpClientCodec</code> when HTTP/1.1 pipelining is enabled, HEAD requests are present in the request pipeline, and the server sends 1xx responses. This occurs because the <code>HttpClientCodec</code> incorrectly pairs inbound responses with outbound requests, specifically when a server sends a 1xx response followed by a 200 response with a body for a GET request, and then a 200 response for a subsequent HEAD request. The <code>HttpClientCodec</code> may incorrectly pair the HEAD request with the first 200 response, skipping the message body and causing subsequent responses to be parsed from the wrong offset. This can lead to data integrity issues and potentially unsafe socket reuse. The vulnerability affects Netty versions 4.2.0.Alpha1 through 4.2.12.Final and all versions up to 4.1.132.Final.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker initiates a series of HTTP/1.1 requests, including a GET request followed by a HEAD request, leveraging HTTP pipelining for efficiency.</li>
<li>The malicious client sends a GET request for a resource (e.g., <code>/1</code>) immediately followed by a HEAD request for another resource (e.g., <code>/2</code>).</li>
<li>The vulnerable Netty server processes the GET request and sends a 103 Early Hints response, followed by a 200 OK response containing the body of the GET request (e.g., &ldquo;hello&rdquo;).</li>
<li>The server then processes the HEAD request and sends a 200 OK response without a body, as is standard for HEAD requests.</li>
<li>The <code>HttpClientCodec</code> on the client side incorrectly pairs the HEAD request with the initial 200 OK response from the GET request, due to the intervening 103 response.</li>
<li>The <code>HttpClientCodec</code> skips the GET response body (&ldquo;hello&rdquo;) when processing the HEAD response, leaving those bytes unread on the input stream.</li>
<li>The subsequent HTTP response is then parsed from the wrong offset in the input stream, leading to parsing failures or incorrect data being associated with the wrong request.</li>
<li>The attacker can exploit this desynchronization to potentially inject malicious content or intercept sensitive data meant for other requests, compromising the integrity and availability of the connection.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability can lead to a loss of integrity and availability of HTTP parsing, causing incorrect or incomplete data to be processed by the client application. This can result in application errors, data corruption, or the exposure of sensitive information. Furthermore, the unsafe reuse of the socket could lead to further exploitation of the compromised connection. While the exact number of affected systems is unknown, any application relying on the vulnerable versions of Netty&rsquo;s <code>HttpClientCodec</code> and utilizing HTTP/1.1 pipelining with HEAD requests is potentially at risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to a patched version of Netty that addresses CVE-2026-42584. Specifically, upgrade beyond version 4.2.12.Final or version 4.1.132.Final.</li>
<li>If upgrading Netty is not immediately feasible, consider disabling HTTP/1.1 pipelining as a temporary mitigation. This will prevent the conditions necessary for the desynchronization to occur.</li>
<li>Deploy the Sigma rule <code>Detect Netty HttpClientCodec Response Desync Error</code> to identify potential exploitation attempts by monitoring for HTTP responses with decoder failures after a series of pipelined requests.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>netty</category><category>http</category><category>desynchronization</category><category>vulnerability</category></item></channel></rss>