Skip to main content
EPSS 0.3%top 78%

Zebra script: zebrad has consensus divergence via P2SH sigop undercount in pure-Rust disabled-opcode parser (CVE-2026-52735)

0
Critical
Published: 08/18/2026 (08/18/2026, 19:23:10 UTC)
Source: GCVE Database
Product: zebra-script

Description

ZEBRA is a Zcash node written entirely in Rust. Prior to 4.5.0, Zebra can accept a block that zcashd rejects because the P2SH signature-operation counter undercounts redeem scripts containing a disabled opcode followed by signature opcodes. In zebra-script/src/lib.rs, p2sh_input_sigop_count used the pure-Rust script::Code::sig_op_count path, whose try_fold parser stops at disabled opcodes such as OP_CODESEPARATOR and returns only the partial count accumulated before the error. The zcashd reference implementation continues static signature-operation counting through disabled opcodes, so an attacker can broadcast P2SH spends that Zebra counts below MAX_BLOCK_SIGOPS while zcashd counts above the 20,000-operation limit. If a Zebra miner includes those transactions, Zebra validators accept the block while zcashd validators reject it, creating a consensus chain split that affects network integrity and availability without requiring the attacker to produce a block. This issue is fixed in version 4.5.0.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
High
Vuln. Availability
None
Subsq. Confidentiality
None
Subsq. Integrity
High
Subsq. Availability
High
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:H/SA:H

Affected software

crates.ioghsa
zebra-script
Affected versions
<7.0.0
crates.ioghsa
zebrad
Affected versions
<4.5.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/19/2026, 11:13:03 UTC

Technical Analysis

The vulnerability in zebrad (Zebra script) arises from its P2SH sigop counter using a pure-Rust code path that prematurely terminates counting upon encountering disabled opcodes, returning a partial sigop count of zero for subsequent sigops. In contrast, the reference implementation zcashd counts through disabled opcodes during static sigop analysis. This discrepancy leads to consensus divergence when blocks exceed the MAX_BLOCK_SIGOPS threshold on one implementation but not the other. An attacker can exploit this by broadcasting transactions spending P2SH outputs with redeem scripts containing disabled opcodes followed by multiple OP_CHECKSIG or OP_CHECKMULTISIG operations. This causes Zebra validators to accept blocks rejected by zcashd validators, resulting in a chain split. The issue is fixed in Zebra version 4.4.2 by routing the P2SH sigop counting through the same C++ FFI used by the legacy sigop counter, ensuring consistent counting behavior.

Potential Impact

The vulnerability causes a consensus split between Zebra and zcashd validators on networks where both participate. Zebra nodes accept blocks with sigop counts under their flawed counting method, while zcashd nodes reject these blocks for exceeding the sigop limit. This split can be triggered by an attacker without mining power or special privileges, simply by broadcasting crafted transactions. Approximately 30% of the current network hashrate using Zebra could mine these divergent blocks, perpetuating the chain split. The attacker incurs only transaction fees to execute this attack.

Mitigation Recommendations

A patch is available in Zebra version 4.4.2 that corrects the P2SH sigop counting by using the C++ FFI method consistent with the legacy sigop counter. There is no configuration-level workaround; all Zebra nodes validating blocks on networks shared with zcashd are affected until upgraded. Operators should upgrade to Zebra 4.4.2 or later as soon as possible to prevent chain splits.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-gf9r-m956-97qx
Osv Schema Version
1.4.0
Aliases
["CVE-2026-52735"]
Ecosystems
["crates.io"]
Database Specific Severity
CRITICAL
Cvss Version
4.0

Threat ID: 6a46ecb627e9c7971943c9b1

Added to database: 07/02/2026, 22:56:54 UTC

Last enriched: 08/19/2026, 11:13:03 UTC

Last updated: 09/13/2026, 22:01:35 UTC

Views: 115

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses