Zebra state: Zebra: Repeated Non-Finalized Shielded Transaction Aborts Zebra Before Duplicate-Nullifier Rejection (CVE-2026-52739)
### Am I affected You are affected if: 1. You run `zebrad` up to and including `v4.4.1`. 2. Your node processes blocks past the checkpoint height (non-finalized state is active). 3. 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: 1. Insert transaction hash into `tx_loc_by_hash` with `assert_eq!` on uniqueness 2. Update transparent outputs and inputs 3. 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: ```rust 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.
AI Analysis
Technical Summary
The vulnerability in Zebra's non-finalized state handling occurs because the transaction-location index (`tx_loc_by_hash`) is updated before the duplicate shielded-nullifier check. When a child block repeats a shielded transaction from its non-finalized parent, an assertion designed to enforce transaction uniqueness triggers a panic and aborts the node process instead of cleanly rejecting the block. This is due to the ordering of index updates and validation checks in `Chain::push`. The block transaction verifier does not perform the best-chain nullifier query for block transactions in non-finalized state, allowing this condition to cause a process abort. Two attack models exist: one where an attacker mines two consecutive blocks with a repeated shielded transaction, and another where an attacker broadcasts a shielded transaction and mines the immediate child block repeating it. Both cause a denial-of-service by crashing the node process.
Potential Impact
A malicious block producer can cause targeted Zebra nodes to crash and abort their process, resulting in denial-of-service and requiring node restarts. This can be exploited repeatedly to keep nodes offline for extended periods. The issue affects node liveness but does not cause consensus divergence, as other implementations like zcashd reject the invalid block cleanly. The attack requires the child block to repeat a shielded-only V5 transaction from a non-finalized parent block. The frequency of attack opportunities depends on the attacker's hashrate, with higher hashrates enabling more frequent attacks.
Mitigation Recommendations
An official fix is available in zebra-state 7.0.0 and zebrad 4.5.0, which replaces the assertion with an error return for duplicate transactions, preventing process aborts. There is no configuration-level workaround. Users should upgrade to these fixed versions to prevent denial-of-service crashes caused by repeated shielded transactions in non-finalized state.
Zebra state: Zebra: Repeated Non-Finalized Shielded Transaction Aborts Zebra Before Duplicate-Nullifier Rejection (CVE-2026-52739)
Description
### Am I affected You are affected if: 1. You run `zebrad` up to and including `v4.4.1`. 2. Your node processes blocks past the checkpoint height (non-finalized state is active). 3. 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: 1. Insert transaction hash into `tx_loc_by_hash` with `assert_eq!` on uniqueness 2. Update transparent outputs and inputs 3. 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: ```rust 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.
CVSS v3.1
Score 5.9medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Zebra's non-finalized state handling occurs because the transaction-location index (`tx_loc_by_hash`) is updated before the duplicate shielded-nullifier check. When a child block repeats a shielded transaction from its non-finalized parent, an assertion designed to enforce transaction uniqueness triggers a panic and aborts the node process instead of cleanly rejecting the block. This is due to the ordering of index updates and validation checks in `Chain::push`. The block transaction verifier does not perform the best-chain nullifier query for block transactions in non-finalized state, allowing this condition to cause a process abort. Two attack models exist: one where an attacker mines two consecutive blocks with a repeated shielded transaction, and another where an attacker broadcasts a shielded transaction and mines the immediate child block repeating it. Both cause a denial-of-service by crashing the node process.
Potential Impact
A malicious block producer can cause targeted Zebra nodes to crash and abort their process, resulting in denial-of-service and requiring node restarts. This can be exploited repeatedly to keep nodes offline for extended periods. The issue affects node liveness but does not cause consensus divergence, as other implementations like zcashd reject the invalid block cleanly. The attack requires the child block to repeat a shielded-only V5 transaction from a non-finalized parent block. The frequency of attack opportunities depends on the attacker's hashrate, with higher hashrates enabling more frequent attacks.
Mitigation Recommendations
An official fix is available in zebra-state 7.0.0 and zebrad 4.5.0, which replaces the assertion with an error return for duplicate transactions, preventing process aborts. There is no configuration-level workaround. Users should upgrade to these fixed versions to prevent denial-of-service crashes caused by repeated shielded transactions in non-finalized state.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-hhm7-qrv5-h4r6
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-52739"]
- Ecosystems
- ["crates.io"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a46ecb627e9c7971943c9a2
Added to database: 07/02/2026, 22:56:54 UTC
Last enriched: 07/02/2026, 23:10:57 UTC
Last updated: 07/31/2026, 12:27:30 UTC
Views: 40
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.