<?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>Rust — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/rust/</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>Mon, 04 May 2026 21:43:56 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/rust/feed.xml" rel="self" type="application/rss+xml"/><item><title>Malicious mysten-metrics Crate Exfiltrates Build Machine Data</title><link>https://feed.craftedsignal.io/briefs/2026-05-mysten-metrics-exfiltration/</link><pubDate>Mon, 04 May 2026 21:43:56 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-mysten-metrics-exfiltration/</guid><description>The `mysten-metrics` crate was removed from crates.io after it was found to contain a malicious build script that attempted to exfiltrate data from the build machine during the build process.</description><content:encoded><![CDATA[<p>On April 20, 2026, a malicious crate named <code>mysten-metrics</code> was published to crates.io. This crate contained a build script designed to exfiltrate data from the machine during the build process. The crate was identified and removed from crates.io. At the time of removal, only one version of the crate had been published, and there was no evidence of actual usage. The crate had no dependencies on crates.io, limiting the potential spread. This incident highlights the risks associated with supply chain attacks targeting software build processes and the importance of verifying the integrity of third-party dependencies.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker publishes the <code>mysten-metrics</code> crate to crates.io.</li>
<li>A developer adds <code>mysten-metrics</code> as a dependency to their project.</li>
<li>The developer builds the project using <code>cargo build</code>.</li>
<li>As part of the build process, the malicious build script within <code>mysten-metrics</code> is executed.</li>
<li>The build script collects sensitive data from the build environment (e.g., environment variables, file contents, system information).</li>
<li>The build script attempts to exfiltrate the collected data to a remote attacker-controlled server. The exact exfiltration method is not specified, but could involve HTTP/S requests or DNS tunneling.</li>
<li>The attacker receives the exfiltrated data from the compromised build machine.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The successful execution of the malicious build script could lead to the exposure of sensitive information, including API keys, credentials, source code, and other confidential data present on the build machine. This data could be used to compromise the developer&rsquo;s infrastructure, intellectual property, and customer data. Since there were no known usages, the impact was contained by its early removal.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Implement integrity checks for all third-party dependencies to identify and prevent the use of malicious packages.</li>
<li>Monitor network connections originating from build processes for suspicious outbound traffic, as this could indicate data exfiltration. Create network connection rules.</li>
<li>Implement file integrity monitoring on build machines to detect unauthorized modifications to files during the build process.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>supply-chain</category><category>malware</category><category>rust</category></item><item><title>Malicious sui-execution-cut Crate Exfiltrates Build Machine Data</title><link>https://feed.craftedsignal.io/briefs/2026-05-sui-execution-cut-exfiltration/</link><pubDate>Mon, 04 May 2026 21:42:55 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-sui-execution-cut-exfiltration/</guid><description>The `sui-execution-cut` crate on crates.io contained a build script designed to exfiltrate data from the build machine during the build process.</description><content:encoded><![CDATA[<p>On April 20, 2026, a malicious crate named <code>sui-execution-cut</code> was published to crates.io. This crate included a build script that, when executed, attempted to exfiltrate data from the machine on which the crate was being built. The crate had no dependencies and only one version was ever published. The malicious package was quickly removed from crates.io after discovery. While the crate was available for a short period, there is no evidence of actual usage, however, supply chain compromises can have a wide impact if successful, and even this low-usage crate warrants monitoring.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>A developer adds the malicious <code>sui-execution-cut</code> crate as a dependency to their Rust project.</li>
<li>During the build process, the <code>cargo</code> build system executes the build script embedded within the <code>sui-execution-cut</code> crate.</li>
<li>The build script executes a series of commands designed to gather sensitive information from the build environment.</li>
<li>The script establishes an outbound network connection to a remote server controlled by the attacker.</li>
<li>The gathered data is transmitted to the attacker&rsquo;s server via HTTP POST or a similar method.</li>
<li>The attacker receives the exfiltrated data, which could include environment variables, file contents, or other sensitive information.</li>
<li>The attacker analyzes the stolen data for valuable secrets, credentials, or intellectual property.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The <code>sui-execution-cut</code> crate, if used, could have compromised developer machines by exfiltrating sensitive data during the build process. Although the crate was quickly removed and showed no signs of usage, a successful attack of this nature could lead to the exposure of secrets, credentials, and intellectual property. The lack of usage limits the impact, but the nature of supply chain attacks makes even low-usage crates a potential risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Monitor for unexpected network connections originating from build processes, especially connections to unknown or suspicious domains. Use the &ldquo;Detect Suspicious Outbound Connections from Build Processes&rdquo; Sigma rule.</li>
<li>Implement strict dependency review processes to identify and prevent the introduction of malicious packages into your software supply chain.</li>
<li>Continuously monitor crates.io and other package repositories for reports of malicious packages and promptly remove them from your dependencies if identified.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>supply-chain</category><category>malware</category><category>rust</category></item><item><title>rust-openssl Unchecked Callback Length Memory Leak</title><link>https://feed.craftedsignal.io/briefs/2026-04-rust-openssl-memory-leak/</link><pubDate>Thu, 23 Apr 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-04-rust-openssl-memory-leak/</guid><description>The rust-openssl crate versions 0.9.24 prior to 0.10.78 are vulnerable to memory leaks due to unchecked callback lengths in PSK/cookie trampolines, potentially leading to buffer overflows.</description><content:encoded><![CDATA[<p>The <code>rust-openssl</code> crate, a Rust wrapper for the OpenSSL library, is susceptible to a high-severity vulnerability due to unchecked callback lengths within the FFI trampolines used by several functions related to PSK (Pre-Shared Key) and cookie generation. Specifically, versions 0.9.24 up to (but not including) 0.10.78 are affected. The vulnerable functions include <code>SslContextBuilder::set_psk_client_callback</code>, <code>set_psk_server_callback</code>, <code>set_cookie_generate_cb</code>, and <code>set_stateless_cookie_generate_cb</code>. The issue arises because the user-provided closure&rsquo;s returned <code>usize</code> (size) value is directly passed to OpenSSL without validation against the size of the <code>&amp;mut [u8]</code> buffer provided to the closure, resulting in potential buffer overflows and memory leaks. This allows an attacker to potentially leak adjacent memory regions to a peer.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious application or exploits an existing application using the vulnerable <code>rust-openssl</code> crate.</li>
<li>The attacker triggers one of the vulnerable callback functions (<code>set_psk_client_callback</code>, <code>set_psk_server_callback</code>, <code>set_cookie_generate_cb</code>, or <code>set_stateless_cookie_generate_cb</code>).</li>
<li>The vulnerable callback function executes the user-provided closure.</li>
<li>The user-provided closure returns a <code>usize</code> value indicating the intended length of the data to be written to the output buffer.</li>
<li>The FFI trampoline forwards this <code>usize</code> value directly to OpenSSL, bypassing bounds checking against the actual buffer size.</li>
<li>If the returned <code>usize</code> exceeds the allocated buffer size, OpenSSL writes beyond the buffer boundary, leading to a buffer overflow.</li>
<li>The buffer overflow allows the attacker to read adjacent memory regions or overwrite data, potentially leaking sensitive information or corrupting program state.</li>
<li>Successful exploitation could lead to information disclosure, denial of service, or potentially arbitrary code execution.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability could lead to information disclosure, denial of service, or potentially arbitrary code execution. Given the widespread use of the <code>rust-openssl</code> crate in various applications, the impact could be significant, affecting numerous services and potentially exposing sensitive data. The vulnerability allows for memory leakage to peers which could have broad consequences.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to <code>rust-openssl</code> version 0.10.78 or later to patch the vulnerability (reference: <a href="https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78)">https://github.com/rust-openssl/rust-openssl/releases/tag/openssl-v0.10.78)</a>.</li>
<li>Implement input validation and sanitization within user-provided closures to ensure that the returned <code>usize</code> value does not exceed the allocated buffer size, mitigating the risk even in vulnerable versions.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>rust</category><category>openssl</category><category>memory leak</category><category>buffer overflow</category></item><item><title>libp2p-gossipsub Remote Denial of Service via Integer Overflow</title><link>https://feed.craftedsignal.io/briefs/2026-03-libp2p-gossipsub-dos/</link><pubDate>Mon, 30 Mar 2026 13:04:03 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-03-libp2p-gossipsub-dos/</guid><description>A remote, unauthenticated attacker can crash applications using libp2p-gossipsub versions prior to 0.49.4 by sending a crafted PRUNE control message with a near-maximum backoff value, causing an arithmetic overflow during heartbeat processing.</description><content:encoded><![CDATA[<p>The Rust libp2p Gossipsub implementation, a peer-to-peer networking library, is susceptible to a remote denial-of-service (DoS) vulnerability. This flaw resides in the handling of <code>backoff</code> expiry during heartbeat processing. By sending a specially crafted <code>PRUNE</code> control message containing an attacker-controlled, near-maximum <code>backoff</code> value, a remote, unauthenticated peer can trigger an integer overflow. This overflow occurs when the implementation performs unchecked addition of the <code>backoff_time</code> and a <code>slack</code> value. This vulnerability affects applications using libp2p-gossipsub versions prior to 0.49.4 and is distinct from CVE-2026-33040, which addressed overflow during backoff insertion. This report highlights a distinct secondary overflow path in heartbeat expiry handling that remained exploitable even after the initial insertion-side hardening. The vulnerability was reported by the Security team of the Ethereum Foundation.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker establishes a standard libp2p session with a target node using <code>TCP + Noise</code> for encryption.</li>
<li>The attacker negotiates a stream multiplexer protocol such as <code>mplex</code> or <code>yamux</code>.</li>
<li>The attacker opens a Gossipsub stream with the target node to initiate communication.</li>
<li>The attacker sends an RPC (Remote Procedure Call) containing a <code>ControlPrune</code> message.</li>
<li>The <code>ControlPrune</code> message includes a crafted <code>backoff</code> value set near the maximum representable value for an i64 integer (e.g., <code>9223372036854674580</code>). The attacker chooses this value relative to the victim&rsquo;s uptime.</li>
<li>The target node parses the <code>backoff</code> value from the protobuf message and processes it using <code>Behaviour::handle_prune()</code>.</li>
<li>The <code>backoff</code> value is stored after a checked addition to ensure it&rsquo;s valid, however the near-maximum value is still retained.</li>
<li>On the next heartbeat, the node attempts to calculate the expiry time by adding a <code>slack</code> value to the stored <code>backoff_time</code> using unchecked addition, which results in an integer overflow, causing a panic and crashing the application.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This vulnerability results in a remote, unauthenticated denial of service. Any application exposing an affected <code>libp2p-gossipsub</code> listener can be crashed by a network-reachable peer. The crash occurs during heartbeat processing, not immediately upon receiving the <code>PRUNE</code> message. The attack can be repeated by reconnecting to the target and replaying the crafted <code>PRUNE</code> message. This could lead to service disruptions and potential data loss if the application does not handle crashes gracefully. The number of potential victims is significant, encompassing any application utilizing vulnerable versions of the <code>libp2p-gossipsub</code> library.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>libp2p-gossipsub</code> dependency to version 0.49.4 or later to patch the unchecked arithmetic operation that causes the overflow.</li>
<li>Deploy the Sigma rule &ldquo;Detect libp2p Gossipsub PRUNE with Large Backoff&rdquo; to identify potential exploitation attempts by monitoring network traffic for unusually large <code>backoff</code> values in <code>PRUNE</code> messages.</li>
<li>Enable network connection logging to capture details of libp2p sessions and identify potential malicious peers attempting to exploit this vulnerability (logsource: network_connection).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>libp2p</category><category>gossipsub</category><category>denial-of-service</category><category>integer overflow</category><category>rust</category></item><item><title>Salvo Web Framework Denial of Service Vulnerability (CVE-2026-33241)</title><link>https://feed.craftedsignal.io/briefs/2026-03-salvo-dos/</link><pubDate>Wed, 25 Mar 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-03-salvo-dos/</guid><description>The Salvo web framework before version 0.89.3 is vulnerable to denial of service due to unbounded memory allocation when parsing form data, enabling attackers to crash services by sending large payloads.</description><content:encoded><![CDATA[<p>Salvo is a Rust-based web framework. Prior to version 0.89.3, the <code>form_data()</code> method and <code>Extractible</code> macro within Salvo do not properly enforce payload size limits when parsing form data. This lack of input validation allows a remote, unauthenticated attacker to send arbitrarily large HTTP request bodies to a vulnerable server. By exploiting this vulnerability, an attacker can exhaust the server&rsquo;s memory resources, leading to an Out-of-Memory (OOM) condition. This results in service crashes…</p>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>denial-of-service</category><category>web-framework</category><category>rust</category></item><item><title>JPCERT/CC Study on Reverse Engineering Rust Binaries</title><link>https://feed.craftedsignal.io/briefs/2026-03-rust-binaries/</link><pubDate>Mon, 16 Mar 2026 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-03-rust-binaries/</guid><description>JPCERT/CC published a study on the reverse engineering of binaries created with the Rust programming language, providing insights for malware analysis and detection engineering.</description><content:encoded><![CDATA[<p>On March 15, 2026, JPCERT/CC published a study examining the challenges and techniques involved in reverse engineering binaries compiled from the Rust programming language. This research aims to aid security analysts and reverse engineers in understanding the structure and characteristics of Rust-based malware. Rust&rsquo;s increasing popularity among malware authors necessitates specialized knowledge to effectively analyze and detect these threats. The study details specific features of Rust binaries that differ from those compiled from other languages like C or C++, focusing on aspects such as metadata handling, string encoding, and unique function calling conventions. The research provides practical guidance for overcoming common obstacles encountered during reverse engineering of Rust binaries.</p>
<h2 id="attack-chain">Attack Chain</h2>
<p>This threat brief focuses on the analysis of Rust binaries, not a specific attack chain. However, understanding the structure of these binaries is crucial for analyzing attacks leveraging them. The following steps outline a general reverse engineering process applicable to any binary, with considerations specific to Rust:</p>
<ol>
<li><strong>Initial Reconnaissance:</strong> Obtain the Rust binary and gather basic information such as file type, size, and compilation timestamp using tools like <code>file</code> and <code>strings</code>.</li>
<li><strong>Metadata Analysis:</strong> Examine the binary&rsquo;s metadata section to identify Rust version, crate dependencies, and potentially debug symbols. This can be done using tools like <code>objdump</code> or specialized Rust metadata parsers.</li>
<li><strong>String Extraction:</strong> Extract embedded strings from the binary. Note that Rust often uses UTF-8 encoding for strings, so ensure your tools support this encoding.</li>
<li><strong>Function Identification:</strong> Identify key functions such as <code>main</code>, and any other functions related to suspicious behavior. Tools like IDA Pro or Ghidra can be used for disassembly and function analysis.</li>
<li><strong>Control Flow Analysis:</strong> Analyze the control flow of the program, paying attention to function calls and branching logic. Rust&rsquo;s ownership and borrowing system can make control flow more complex than in C/C++.</li>
<li><strong>Dependency Analysis:</strong> Identify and analyze any external crates (libraries) used by the binary. These crates may contain known vulnerabilities or malicious code.</li>
<li><strong>Behavioral Analysis:</strong> Execute the binary in a controlled environment (sandbox) to observe its behavior, including file system access, network connections, and registry modifications.</li>
<li><strong>Detection Rule Creation:</strong> Based on the reverse engineering and behavioral analysis, create detection rules for identifying similar malicious Rust binaries.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>The increasing use of Rust in malware development poses a challenge for security analysts. Successful reverse engineering and understanding of Rust binaries are crucial for detecting and mitigating threats. Failure to adapt to this trend could lead to a decreased ability to identify and respond to novel malware strains.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Familiarize detection engineers with the structure and characteristics of Rust binaries as described in the JPCERT/CC study to improve reverse engineering capabilities.</li>
<li>Implement the Sigma rules provided below to detect suspicious behaviors commonly associated with potentially malicious binaries, adjusting thresholds and whitelists as needed for your environment.</li>
<li>Utilize tools capable of parsing Rust metadata to extract crate dependencies and other useful information from Rust binaries during analysis, as described in the &ldquo;Metadata Analysis&rdquo; step above.</li>
</ul>
]]></content:encoded><category domain="severity">low</category><category domain="type">advisory</category><category>rust</category><category>reverse-engineering</category><category>malware-analysis</category></item><item><title>rust-openssl Stack Buffer Overflow Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-rust-openssl-buffer-overflow/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-03-rust-openssl-buffer-overflow/</guid><description>The rust-openssl crate is vulnerable to a stack-based buffer overflow (CVE-2026-41681) where the `EVP_DigestFinal()` function writes beyond the allocated buffer, potentially corrupting the stack, affecting versions &gt;= 0.10.39 and &lt; 0.10.78.</description><content:encoded><![CDATA[<p>The <code>rust-openssl</code> crate, a Rust wrapper for the OpenSSL library, is susceptible to a critical vulnerability (CVE-2026-41681) stemming from a buffer overflow within the <code>MdCtxRef::digest_final()</code> function. This flaw arises because <code>EVP_DigestFinal()</code> unconditionally writes <code>EVP_MD_CTX_size(ctx)</code> bytes to the provided output buffer (<code>out</code>), without verifying if the buffer&rsquo;s allocated size is sufficient. Consequently, if <code>out</code> is smaller than the size dictated by <code>EVP_MD_CTX_size(ctx)</code>, a write-out-of-bounds condition occurs, potentially leading to stack corruption. The vulnerability is reachable from safe Rust code, making it a significant concern for applications utilizing the affected versions of the <code>rust-openssl</code> crate. Specifically, versions 0.10.39 up to (but not including) 0.10.78 are affected.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a Rust application that utilizes the <code>rust-openssl</code> crate.</li>
<li>The application initiates a digest operation using <code>EVP_DigestInit()</code> to set up the message digest context.</li>
<li>The application feeds data into the digest context using <code>EVP_DigestUpdate()</code>.</li>
<li>The application calls <code>MdCtxRef::digest_final()</code> via safe Rust.</li>
<li>Internally, <code>EVP_DigestFinal()</code> is called without proper bounds checking.</li>
<li><code>EVP_DigestFinal()</code> attempts to write <code>EVP_MD_CTX_size(ctx)</code> bytes to the <code>out</code> buffer.</li>
<li>If <code>out</code> is smaller than the expected size, a stack-based buffer overflow occurs as data is written beyond the allocated memory region.</li>
<li>This overflow overwrites adjacent memory on the stack, potentially corrupting critical program data or control flow structures, leading to crashes or arbitrary code execution.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows an attacker to potentially achieve arbitrary code execution within the context of the affected application. This could lead to complete system compromise, data breaches, or denial-of-service conditions. Given that the vulnerability is reachable from safe Rust, applications relying on vulnerable versions of the <code>rust-openssl</code> crate are at risk. The vulnerability can cause stack corruption, leading to unpredictable behavior and potential application crashes.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>rust-openssl</code> crate to version 0.10.78 or later to remediate CVE-2026-41681.</li>
<li>Implement robust input validation and size checks when using the <code>rust-openssl</code> crate, specifically when handling digest operations, to prevent buffer overflows.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>buffer overflow</category><category>rust</category><category>openssl</category><category>vulnerability</category></item><item><title>Heap/Stack Overflow in rust-openssl with OpenSSL 1.1.x</title><link>https://feed.craftedsignal.io/briefs/2024-01-03-openssl-overflow/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-03-openssl-overflow/</guid><description>The rust-openssl crate's `Deriver::derive` and `PkeyCtxRef::derive` functions can cause heap/stack overflows when used with OpenSSL 1.1.x due to insufficient buffer length validation in X25519, X448, DH, and HKDF-extract, affecting rust-openssl versions &gt;= 0.9.27 and &lt; 0.10.78.</description><content:encoded><![CDATA[<p>The <code>rust-openssl</code> crate, specifically the <code>Deriver::derive</code> and <code>PkeyCtxRef::derive</code> functions, is vulnerable to a heap/stack overflow when used in conjunction with OpenSSL version 1.1.x. This occurs because the <code>EVP_PKEY_derive</code> function in OpenSSL 1.1.x fails to properly validate the input buffer length when used with X25519, X448, DH, and HKDF-extract. These key derivation functions unconditionally write the full shared secret (32/56/prime-size bytes) regardless of the buffer size provided by the caller, leading to a buffer overflow if the provided slice is too small. This vulnerability affects rust-openssl versions &gt;= 0.9.27 and &lt; 0.10.78. This vulnerability is mitigated in OpenSSL 3.x because the providers check buffer length.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts a malicious application using the <code>rust-openssl</code> crate.</li>
<li>The application uses <code>Deriver::derive</code> or <code>PkeyCtxRef::derive</code> with an X25519, X448, DH, or HKDF-extract key agreement algorithm.</li>
<li>The application provides a buffer smaller than the expected output size of the key derivation function (32 bytes for X25519, 56 bytes for X448, prime-size bytes for DH).</li>
<li>The <code>EVP_PKEY_derive</code> function in OpenSSL 1.1.x is called without proper buffer length validation.</li>
<li>The key derivation function writes the full shared secret to the undersized buffer.</li>
<li>A heap or stack buffer overflow occurs, overwriting adjacent memory.</li>
<li>The attacker gains control of the application&rsquo;s execution flow.</li>
<li>The attacker executes arbitrary code on the target system.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability can lead to arbitrary code execution within the context of the vulnerable application. This could allow an attacker to gain complete control of the affected system. The number of victims depends on the prevalence of vulnerable <code>rust-openssl</code> versions being used with OpenSSL 1.1.x. Sectors that rely on <code>rust-openssl</code> for cryptographic operations are at higher risk.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade the <code>rust-openssl</code> crate to version &gt;= 0.10.78 to patch the vulnerability (see Overview).</li>
<li>If upgrading <code>rust-openssl</code> is not immediately feasible, ensure that OpenSSL is upgraded to version 3.x, where the buffer length is checked (see Overview).</li>
<li>Implement runtime checks to validate buffer lengths before calling <code>Deriver::derive</code> and <code>PkeyCtxRef::derive</code> when using X25519, X448, DH, or HKDF-extract (see Attack Chain).</li>
<li>Deploy the Sigma rule provided below to detect potential exploitation attempts (see Rules).</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>openssl</category><category>buffer-overflow</category><category>rust</category><category>cryptography</category></item><item><title>Nimiq Block Skip Block Quorum Bypass Vulnerability</title><link>https://feed.craftedsignal.io/briefs/2024-01-nimiq-block-quorum-bypass/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-nimiq-block-quorum-bypass/</guid><description>A vulnerability exists in Nimiq Block's SkipBlockProof verification process, allowing attackers to bypass quorum checks by manipulating MultiSignature signers with out-of-range indices, potentially compromising blockchain integrity, and affecting rust/nimiq-block versions 0.2.0 and earlier.</description><content:encoded><![CDATA[<p>A critical vulnerability has been identified in the Nimiq Block&rsquo;s <code>SkipBlockProof::verify</code> function within the rust-albatross core. This vulnerability stems from the way the quorum check is performed. The vulnerability lies in the ability to craft <code>MultiSignature.signers</code> that contain out-of-range indices spaced by 65536, inflating the <code>len()</code> calculation but colliding onto the same in-range <code>u16</code> slot during aggregation due to truncation. The vulnerability affects <code>rust/nimiq-block</code> versions <code>&lt;= 0.2.0</code>. Successful exploitation allows a malicious validator with significantly fewer than the required <code>2f+1</code> signer slots to pass skip block proof verification. This bypasses the intended security mechanisms, potentially undermining the blockchain&rsquo;s consensus and integrity.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker identifies a Nimiq Block instance running a vulnerable version (&lt;= 0.2.0) of the <code>rust/nimiq-block</code> package.</li>
<li>The attacker crafts a malicious <code>MultiSignature.signers</code> payload.</li>
<li>The malicious payload contains out-of-range indices spaced by 65536. These indices are specifically designed to inflate the <code>BitSet.len()</code> calculation used in the quorum check.</li>
<li>During verification within <code>SkipBlockProof::verify</code>, the <code>usize</code> indices are cast to <code>u16</code> (<code>slot as u16</code>) for slot lookup.</li>
<li>Due to the <code>u16</code> truncation, the out-of-range indices collide onto the same in-range slot. This creates an artificial aggregation of signatures.</li>
<li>The attacker multiplies a single BLS signature by a factor to match the inflated <code>len()</code> value.</li>
<li>The manipulated <code>SkipBlockProof</code> passes the quorum check due to the inflated <code>len()</code> and signature aggregation.</li>
<li>The malicious skip block is accepted, potentially leading to consensus manipulation or other attacks on the blockchain.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of this vulnerability allows a malicious validator to bypass the standard quorum requirements for skip block proof verification. This means that a single compromised validator or a small group of colluding validators can inject fraudulent blocks into the blockchain, potentially leading to double-spending, denial-of-service, or other attacks that compromise the integrity and availability of the Nimiq blockchain. Given the severity of these potential outcomes, this vulnerability poses a critical risk to any system relying on affected versions of Nimiq Block.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to <code>rust/nimiq-block</code> version <code>1.3.0</code> or later, which includes the fix for <a href="https://github.com/advisories/GHSA-6973-8887-87ff">CVE-2026-33471</a>.</li>
<li>Monitor network traffic for anomalies related to skip block submissions, focusing on unusually large <code>MultiSignature.signers</code> payloads with indices spaced by multiples of 65536. Create a network monitoring rule.</li>
</ul>
]]></content:encoded><category domain="severity">medium</category><category domain="type">advisory</category><category>blockchain</category><category>quorum bypass</category><category>nimiq</category><category>rust</category></item></channel></rss>