<?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>Signature Validation — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/tags/signature-validation/</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>Sat, 26 Oct 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/tags/signature-validation/feed.xml" rel="self" type="application/rss+xml"/><item><title>Zebra Consensus Failure due to Improper SIGHASH_SINGLE Validation</title><link>https://feed.craftedsignal.io/briefs/2024-10-zebra-sighash-single/</link><pubDate>Sat, 26 Oct 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-10-zebra-sighash-single/</guid><description>Zebra 4.4.0 failed to enforce a ZIP-244 consensus rule for V5 transparent transactions, potentially leading to a consensus split with zcashd nodes if an input is signed with `SIGHASH_SINGLE` and there is no corresponding output.</description><content:encoded><![CDATA[<p>Zebra version 4.4.0 improperly validates V5 transparent transactions using the <code>SIGHASH_SINGLE</code> signature flag.  Specifically, it fails to enforce a ZIP-244 consensus rule that requires validation to fail when an input is signed with <code>SIGHASH_SINGLE</code> and there is no transparent output at the same index.  Instead, Zebra asks the underlying sighash library to compute a digest, resulting in a digest over an empty output set. This divergence from <code>zcashd</code>, which correctly rejects such transactions, could allow an attacker to create a consensus split between Zebra and <code>zcashd</code> nodes.  The vulnerability exists due to a missed check in Zebra&rsquo;s V5 sighash callback, which calls <code>librustzcash</code>&rsquo;s ZIP-244 implementation.  The issue was addressed in Zebra 4.4.1.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker crafts a V5 transaction with two or more transparent inputs.</li>
<li>The crafted transaction includes fewer transparent outputs than inputs.</li>
<li>The attacker signs an input whose index has no matching output (<code>vout</code> entry) with <code>SIGHASH_SINGLE</code> (0x03) or <code>SIGHASH_SINGLE|ANYONECANPAY</code> (0x83).</li>
<li>Zebra&rsquo;s sighash callback incorrectly computes a digest for the invalid input using <code>librustzcash</code>, rather than failing the validation.</li>
<li>The attacker broadcasts the malicious transaction to the Zcash network.</li>
<li>Zebra nodes verify the transaction&rsquo;s transparent script using the incorrectly computed digest and accept the transaction (and any block containing it).</li>
<li><code>zcashd</code> nodes reject the transaction due to the invalid <code>SIGHASH_SINGLE</code> signature.</li>
<li>This divergence creates a consensus split, potentially isolating Zebra nodes from the rest of the network.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>This consensus failure could lead to network partitioning, service disruption, and potential double-spend attacks against affected Zebra nodes. While the impact is currently mitigated by the dominance of <code>zcashd</code> among miners, a successful attack could still disrupt services relying on Zebra nodes, cause financial losses for affected users, and damage the reputation of the Zebra project.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to Zebra version 4.4.1 or later immediately to remediate the vulnerability.</li>
<li>Monitor network traffic for unusual transaction patterns, especially V5 transactions with <code>SIGHASH_SINGLE</code> signatures.</li>
<li>Deploy the Sigma rules in this brief to your SIEM to detect potential exploitation attempts based on transaction characteristics.</li>
<li>Review the fix in Zebra 4.4.1 (GHSA-pvmv-cwg8-v6c8) to understand the corrected validation logic.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>consensus failure</category><category>signature validation</category><category>network partition</category></item></channel></rss>