CVE-2026-40880 Overview
CVE-2026-40880 is a logic error vulnerability in Zebra, a Zcash node implementation written entirely in Rust. The vulnerability exists in Zebra's transaction verification cache and could allow a malicious miner to induce a consensus split within the Zcash network. By exploiting this flaw, an attacker with mining capabilities can cause vulnerable Zebra nodes to accept an invalid block, effectively fragmenting the blockchain consensus.
Critical Impact
A malicious miner can exploit the transaction verification cache logic to induce a consensus split, causing vulnerable Zebra nodes to diverge from the main Zcash network and accept invalid blocks.
Affected Products
- zebrad versions prior to 4.3.1
- zebra-consensus versions prior to 5.0.2
- Zcash network nodes running vulnerable Zebra versions
Discovery Timeline
- 2026-04-21 - CVE CVE-2026-40880 published to NVD
- 2026-04-22 - Last updated in NVD database
Technical Details for CVE-2026-40880
Vulnerability Analysis
This vulnerability stems from a logic error in Zebra's transaction verification cache mechanism (CWE-1025: Comparison Using Wrong Factors). The transaction verification cache is designed to improve performance by caching the results of transaction validation checks. However, the caching logic fails to properly account for height-dependent transaction validity rules.
In the Zcash protocol, certain transactions may be valid at one block height but invalid at another due to consensus rules that change based on network height. The vulnerability occurs because the cache incorrectly reuses validation results across block heights where the validity constraints differ.
The attack requires network access and low privileges (mining capability), but involves precise timing and coordination (represented by the "Present" attack complexity modifier). The impact is significant: while there is no direct confidentiality breach, the integrity and availability of both the vulnerable system and downstream systems are severely affected. A consensus split can lead to double-spend opportunities, network fragmentation, and loss of trust in transaction finality.
Root Cause
The root cause is a comparison logic error in the transaction verification cache that fails to properly factor block height into cache key generation or validation result lookups. When a transaction's validity is cached at height H+1, the cache does not invalidate or re-evaluate this cached result when the same transaction appears in a block at a different height (H+2) where different consensus rules may apply.
This is classified as CWE-1025 (Comparison Using Wrong Factors), indicating that the cache comparison mechanism uses insufficient factors to determine whether a cached validation result can be safely reused.
Attack Vector
The attack is network-based and requires the attacker to have mining capabilities within the Zcash network. The attack sequence involves:
- The attacker crafts a transaction that passes validation rules at height H+1 but fails validation at height H+2 due to consensus rule differences between these heights
- The attacker submits this transaction to vulnerable Zebra nodes, causing them to cache a "valid" result
- The attacker then mines a block at height H+2 containing this transaction
- Vulnerable Zebra nodes retrieve the cached "valid" result and accept the invalid block
- This causes the vulnerable nodes to diverge from honest nodes that correctly reject the block, creating a consensus split
The attack exploits the fundamental assumption that transaction validity is height-independent, which is not always true in Zcash's consensus model. For detailed technical information, see the GitHub Security Advisory.
Detection Methods for CVE-2026-40880
Indicators of Compromise
- Zebra nodes reporting different chain tips than other network nodes
- Unexpected block rejections or acceptances logged with height-related validation messages
- Network partitioning alerts indicating consensus divergence among Zcash nodes
- Transaction verification cache hits for transactions that should require re-validation
Detection Strategies
- Monitor Zebra node logs for discrepancies between cached and freshly computed transaction validation results
- Implement chain tip monitoring to detect if local nodes diverge from network consensus
- Deploy network health checks that compare block hashes across multiple Zebra and Zcashd nodes
- Set up alerts for unusual mining patterns or blocks containing transactions with height-sensitive characteristics
Monitoring Recommendations
- Enable verbose logging on Zebra nodes to capture transaction cache behavior
- Implement cross-node consensus monitoring comparing chain state across multiple node implementations
- Monitor for unusual network partitioning events in Zcash network telemetry
- Track zebrad and zebra-consensus version deployments across infrastructure
How to Mitigate CVE-2026-40880
Immediate Actions Required
- Upgrade zebrad to version 4.3.1 or later immediately
- Upgrade zebra-consensus to version 5.0.2 or later immediately
- Audit current chain state to ensure nodes have not diverged from network consensus
- Consider temporarily running parallel Zcashd nodes for consensus verification until patches are applied
Patch Information
The vulnerability is fixed in zebrad version 4.3.1 and zebra-consensus version 5.0.2. The fix addresses the transaction verification cache logic to properly account for height-dependent validation rules, ensuring that cached results are not incorrectly reused across block heights where consensus rules differ.
For complete patch details and security advisory information, refer to the GitHub Security Advisory.
Workarounds
- Disable or bypass the transaction verification cache if the software allows configuration of this feature
- Run Zebra nodes behind a trusted Zcashd node that can validate consensus before forwarding blocks
- Implement additional consensus checks comparing chain state with known-good reference nodes
- Temporarily reduce reliance on affected Zebra nodes for critical transaction processing until patched versions are deployed
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


