<?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>Heap-Corruption - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/heap-corruption/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Fri, 24 Jul 2026 17:20:23 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/heap-corruption/feed.xml" rel="self" type="application/rss+xml"/><item><title>CVE-2026-66032 - libssh2 SFTP Double-Free Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2026-07-libssh2-double-free/</link><pubDate>Fri, 24 Jul 2026 17:20:23 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-07-libssh2-double-free/</guid><description>A double-free vulnerability, CVE-2026-66032, in libssh2 versions through 1.11.1 allows a malicious SSH server to corrupt the heap of an authenticated client opening an SFTP session, potentially leading to arbitrary code execution.</description><content:encoded><![CDATA[<p>A critical double-free vulnerability, identified as CVE-2026-66032, exists in libssh2 versions up to and including 1.11.1. This flaw resides within the <code>sftp_open()</code> function in <code>src/sftp.c</code> and can be exploited by a malicious SSH server. When an authenticated client attempts to open an SFTP session to such a server, the server can trigger a heap corruption on the client side. This occurs if the server responds to an <code>SSH_FXP_OPEN</code> request with an <code>SSH_FXP_STATUS</code> containing <code>FX_OK</code>, causing the response data buffer to be freed. If a subsequent <code>sftp_packet_require()</code> call then returns a specific error like <code>LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED</code>, the same pointer is freed a second time. On glibc systems, this double-free condition can lead to tcache dup, enabling overlapping memory allocations and ultimately function pointer overwrites, which could result in arbitrary code execution on the vulnerable client system.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>A malicious SSH server is configured to exploit the libssh2 vulnerability.</li>
<li>An authenticated client using a vulnerable version of libssh2 attempts to connect to the malicious SSH server and initiates an SFTP session via the <code>sftp_open()</code> function.</li>
<li>The malicious server responds to the client's <code>SSH_FXP_OPEN</code> request with an <code>SSH_FXP_STATUS</code> packet that includes <code>FX_OK</code>.</li>
<li>The client-side <code>sftp_open()</code> function processes this initial response, leading to the first deallocation of the response data buffer.</li>
<li>During subsequent processing, or due to a crafted response from the malicious server, a call to <code>sftp_packet_require()</code> for the same buffer returns a specific error, such as <code>LIBSSH2_ERROR_CHANNEL_PACKET_EXCEEDED</code>.</li>
<li>The <code>sftp_open()</code> function attempts to free the already freed response data buffer for a second time, triggering the double-free condition.</li>
<li>On client systems running glibc, this double-free vulnerability can be leveraged to achieve tcache dup, allowing for controlled overlapping memory allocations.</li>
<li>An attacker can then manipulate these memory allocations to overwrite function pointers, ultimately leading to arbitrary code execution on the vulnerable client system.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2026-66032 can lead to heap corruption and function pointer overwrites on the authenticated client system. This memory corruption can be escalated to arbitrary code execution, allowing the malicious SSH server to execute commands with the privileges of the SFTP client process. This poses a significant risk to systems that connect to untrusted SSH servers using vulnerable libssh2 versions, potentially compromising data integrity, confidentiality, and system availability. No specific victim numbers or targeted sectors are currently available.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Patch CVE-2026-66032 immediately by upgrading libssh2 to a version beyond 1.11.1, specifically one that includes commit <code>5e47761</code> or later.</li>
<li>Implement host-based intrusion detection systems (HIDS) capable of detecting memory corruption anomalies or unusual process behavior following SFTP connections.</li>
<li>Restrict SFTP client connections to trusted SSH servers only, especially for clients running vulnerable libssh2 versions.</li>
<li>Enable verbose logging for SSH/SFTP client activities and monitor for unexpected client application crashes or unauthorized process launches.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>ssh</category><category>sftp</category><category>double-free</category><category>vulnerability</category><category>libssh2</category><category>memory-corruption</category><category>rce</category><category>DoS</category><category>integer-underflow</category><category>heap-corruption</category></item></channel></rss>