CVE-2026-52735: zebrad has consensus divergence via P2SH sigop undercount in pure-Rust disabled-opcode parser
Zebra’s P2SH sigop counter uses a pure-Rust code path that short-circuits on disabled opcodes (such as OP_CODESEPARATOR), returning a partial count of zero for any sigops following the disabled opcode. The reference implementation (zcashd) correctly counts through disabled opcodes in its static sigop analysis. This produces a consensus divergence: Zebra accepts blocks that zcashd rejects when the block-wide MAX_BLOCK_SIGOPS = 20,000 threshold is crossed on one side but not the other.
An attacker can exploit this without mining capability. Broadcasting transactions that spend P2SH outputs with malicious redeem scripts is sufficient; any Zebra miner who includes those transactions in a block triggers a chain split between Zebra and zcashd validators.
References
- github.com/AlfredoG87/zcash_script/blob/v0.4.4/src/script/iter.rs
- github.com/ZcashFoundation/zebra/blob/d4cd662c716382f6397d2a730148025a1ca79fec/zebra-consensus/src/block.rs
- github.com/ZcashFoundation/zebra/blob/d4cd662c716382f6397d2a730148025a1ca79fec/zebra-script/src/lib.rs
- github.com/ZcashFoundation/zebra/security/advisories/GHSA-gf9r-m956-97qx
- github.com/advisories/GHSA-gf9r-m956-97qx
- nvd.nist.gov/vuln/detail/CVE-2026-52735
Code Behaviors & Features
Detect and mitigate CVE-2026-52735 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →