GHSA-hhm7-qrv5-h4r6 CVE-2026-52739
Zebra: Repeated Non-Finalized Shielded Transaction Aborts Zebra Before Duplicate-Nullifier Rejection
- Severity
- 5.9 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 0.52%
- Chance of exploitation in the next 30 days. Higher than 43.92% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-248 Uncaught Exception
- Fix
- Available
- 2 packages have a fixed version
Description
Am I affected
You are affected if:
- You run
zebradup to and includingv4.4.1. - Your node processes blocks past the checkpoint height (non-finalized state is active).
- The network has NU5 or later activated.
All default configurations are affected.
Summary
Chain::push in the non-finalized state updates the transaction-location index (tx_loc_by_hash) before it runs the duplicate shielded-nullifier guard. When an invalid child block repeats a shielded transaction from its non-finalized parent, the assert_eq!(prior_pair, None, "transactions must be unique within a single chain") fires before the contextual validation that would cleanly reject the duplicate. Under Zebra's panic = "abort" release profile, this terminates the entire node process.
The block should be rejected with a duplicate-nullifier contextual validation error. Instead, the ordering of index updates within Chain::push causes the process to abort.
Details
In zebra-state/src/service/non_finalized_state/chain.rs:1608-1628, the block push sequence is:
- Insert transaction hash into
tx_loc_by_hashwithassert_eq!on uniqueness - Update transparent outputs and inputs
- Update shielded data (JoinSplit, Sapling, Orchard) — including nullifier uniqueness checks
The shielded nullifier uniqueness check at step 3 would correctly reject the duplicate transaction. But the assert_eq! at step 1 fires first because the transaction hash is already in tx_loc_by_hash from the parent block on the same chain.
The block transaction verifier does not run the best-chain nullifier query for block transactions — that check is gated on mempool transactions only (zebra-consensus/src/transaction.rs:521-526). Initial contextual validation checks nullifiers in finalized state only (zebra-state/src/service/check.rs:407-415), but the parent transaction is still in non-finalized state.
There are two attack models:
Model A (two attacker blocks): The attacker mines two consecutive valid-work blocks: parent B1 containing a shielded transaction T, and child B2 repeating T. This requires controlling both blocks consecutively.
Model B (one attacker block after an honest block): The attacker broadcasts a shielded transaction T into the mempool. When any honest miner includes T in their block B1, the attacker only needs to mine the next child block B2 containing the same T. This requires controlling only one block immediately after an honest block that included the attacker's transaction. The attacker can broadcast a suitable shielded transaction every block until one is included by an honest miner, then attempt to mine the follow-up.
Both models require the child block to repeat the shielded-only V5 transaction while the parent is still in non-finalized state.
Patches
zebra-state 7.0.0 and zebrad 4.5.0.
Replace the assert_eq! with an Entry-based check that returns ValidateContextError::DuplicateTransaction instead of panicking:
match self.tx_loc_by_hash.entry(transaction_hash) {
Entry::Vacant(entry) => {
entry.insert(transaction_location);
}
Entry::Occupied(_) => {
return Err(ValidateContextError::DuplicateTransaction { transaction_hash });
}
}
Workarounds
There is no configuration-level workaround. The assert is in the non-finalized state push path, which is exercised by all block processing past the checkpoint height.
Impact
A malicious block producer can crash targeted Zebra nodes. There are two attack models:
In the first model, the attacker mines two consecutive valid-work blocks where the child repeats a shielded transaction from the parent. At 10% hashrate, the attacker has approximately 11.5 opportunities per day; at 5%, approximately 2.9 per day; at 1%, approximately one every 8.7 days.
In the second model, the attacker broadcasts a shielded transaction into the mempool and waits for any honest miner to include it. The attacker then only needs to mine the next block containing the same transaction. This is cheaper because the attacker does not need to mine the parent block. At 10% hashrate, the attacker has approximately 14.4 single-block opportunities per day; at 5%, approximately 7.2 per day; at 1%, approximately 1.4 per day.
The crash is a process abort (not recoverable within the process). The node must be restarted. Repeated attacks can keep a node down for extended periods. This is a liveness issue, not a consensus divergence: zcashd cleanly rejects the invalid child block while Zebra aborts.
Credit
Reported by @haxatron via email disclosure.
Affected versions
crates.io
| Package | Vulnerable | Fixed in |
|---|---|---|
| zebra-state | < 7.0.0 |
7.0.0 |
| zebrad | < 4.5.0 |
4.5.0 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
zebra-state crates.io → 7.0.0
- cargo
cargo update -p zebra-state --precise 7.0.0
zebrad crates.io → 4.5.0
- cargo
cargo update -p zebrad --precise 4.5.0
Severity breakdown
CVSS 3.1 5.9
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Weakness
CWE-248: Uncaught Exception
An exception is thrown from a function, but it is not caught.
References
Packages
Other links
- github.com/ZcashFoundation/zebra/security/advisories/GHSA-hhm7-qrv5-h4r6
- github.com/ZcashFoundation/zebra/blob/d4cd662c716382f6397d2a730148025a1ca79fec/…
- github.com/ZcashFoundation/zebra/blob/d4cd662c716382f6397d2a730148025a1ca79fec/…
- github.com/ZcashFoundation/zebra/blob/d4cd662c716382f6397d2a730148025a1ca79fec/…
- github.com/ZcashFoundation/zebra/commit/1440b43ca7df59aca948090d45117557b217a6cd
- github.com/ZcashFoundation/zebra/releases/tag/v4.5.0
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-ww9q-8r59-xv46 Zebra: Missing copy constraint in halo2_gadgets variable-base scalar multiplication allows under-constrained base, breaking Orchard Action circuit soundness | Critical | Also affects zebrad |
| GHSA-63wg-wjjj-7cp8 Zebra Address Book Aborted by IPv4-Mapped Mempool Misbehavior Update | High | Also affects zebrad |
| GHSA-65jj-fmw8-468q zebrad has unbounded memory leak in mempool download pipeline via timeout path cancel_handles retention | Medium | Also affects zebrad |
| GHSA-2gf8-q9rr-jq3h zebrad has persistent on-disk corruption of Sapling/Orchard subtree roots after chain fork via pop_tip | Medium | Also affects zebrad |
| GHSA-w834-cf6p-9m9w Zebra: Finalized address balance credit-first overflow on consensus-valid blocks | Medium | Also affects zebrad |
| GHSA-gvjc-3w7c-92jx Zebra has sync restart poisoning from single unauthenticated peer via above-lookahead block | Medium | Also affects zebrad |
| GHSA-gf9r-m956-97qx zebrad has consensus divergence via P2SH sigop undercount in pure-Rust disabled-opcode parser | Critical | Also affects zebrad |
| GHSA-4m69-67m6-prqp Zebra has block suppression via NU5 same-header body poisoning of sent-hash cache | High | Also affects zebrad |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor