Zebra state: zebrad has persistent on-disk corruption of Sapling/Orchard subtree roots after chain fork via pop_tip (CVE-2026-52733)
### Am I affected You are affected if: 1. You run `zebrad` up to and including `v4.4.1`. 2. Your node participates in a network where chain forks occur (mainnet, testnet, or any network with multiple miners). All default configurations are affected. The corruption persists across restarts because it is written to RocksDB. ### Summary When `pop_tip` removes the tip block during a chain fork, stale Sapling and Orchard note commitment subtree root data is retained in the in-memory non-finalized state. When the chain subsequently finalizes, this stale data is written to the persistent RocksDB state. The corrupted subtree root history affects `z_getsubtreesbyindex` (used by lightwalletd for wallet synchronization) and could affect future chain verification that depends on correct subtree roots. ### Details The non-finalized state provides two methods for removing blocks: `pop_root` (removes the oldest block during finalization) and `pop_tip` (removes the newest block during a fork revert). `pop_root` correctly cleans up note commitment subtree contributions. `pop_tip` does not: it removes the block but retains the block's subtree root contributions in the in-memory state. When a chain fork occurs and `pop_tip` reverts the old tip, the winning fork's chain is extended. When that chain is later finalized, the stale subtree data from the reverted blocks is included in the RocksDB write batch and persisted to disk. The `pop_root`/`pop_tip` asymmetry is specific to subtree root handling. Other state managed by `pop_tip` (nullifiers, UTXOs, anchors, block hashes) uses different cleanup patterns that are not affected. ### Patches zebra-state 7.0.0 and zebrad 4.5.0. The fix adds subtree root cleanup to `pop_tip` matching the pattern already used by `pop_root`. ### Workarounds There is no configuration-level workaround. Chain forks are natural events on any Proof-of-Work network. Operators can mitigate the downstream impact by periodically verifying subtree root consistency using `z_getsubtreesbyindex` against a known-good reference. ### Impact Persistent corruption of Sapling and Orchard subtree root history in the RocksDB state database. The corruption survives node restarts. Downstream consumers that rely on `z_getsubtreesbyindex` for wallet synchronization (primarily `lightwalletd` and light wallets) receive incorrect subtree roots. This does not directly affect consensus validation of new blocks but can cause wallet synchronization failures or incorrect wallet state. Recovery requires rebuilding the state database from scratch. ### Credit Reported by `@dingledropper` via a private GitHub Security Advisory submission.
AI Analysis
Technical Summary
The vulnerability occurs in zebrad versions up to v4.4.1 where the pop_tip method, used to revert the tip block during chain forks, fails to remove stale Sapling and Orchard note commitment subtree root data from the in-memory non-finalized state. When the chain finalizes, this stale data is persisted to RocksDB, causing on-disk corruption of subtree root history. This affects the z_getsubtreesbyindex RPC used by lightwalletd for wallet synchronization, potentially leading to incorrect wallet states. The pop_root method correctly cleans up subtree roots, but pop_tip does not, causing an asymmetry in state cleanup. Other state elements like nullifiers and UTXOs are unaffected. The issue is fixed by adding subtree root cleanup to pop_tip in zebra-state 7.0.0 and zebrad 4.5.0.
Potential Impact
The corruption of Sapling and Orchard subtree root history persists on disk and survives node restarts. Downstream consumers relying on z_getsubtreesbyindex, such as lightwalletd and light wallets, may receive incorrect subtree roots, causing wallet synchronization failures or incorrect wallet states. This does not directly impact consensus validation or block acceptance but affects wallet functionality. Recovery requires rebuilding the state database from scratch.
Mitigation Recommendations
A fix is available in zebra-state 7.0.0 and zebrad 4.5.0 that addresses the subtree root cleanup in pop_tip. Operators should upgrade to these versions to resolve the issue. There is no configuration-level workaround. Operators can mitigate downstream impact by periodically verifying subtree root consistency using z_getsubtreesbyindex against a known-good reference. Recovery from corruption requires rebuilding the state database.
Zebra state: zebrad has persistent on-disk corruption of Sapling/Orchard subtree roots after chain fork via pop_tip (CVE-2026-52733)
Description
### Am I affected You are affected if: 1. You run `zebrad` up to and including `v4.4.1`. 2. Your node participates in a network where chain forks occur (mainnet, testnet, or any network with multiple miners). All default configurations are affected. The corruption persists across restarts because it is written to RocksDB. ### Summary When `pop_tip` removes the tip block during a chain fork, stale Sapling and Orchard note commitment subtree root data is retained in the in-memory non-finalized state. When the chain subsequently finalizes, this stale data is written to the persistent RocksDB state. The corrupted subtree root history affects `z_getsubtreesbyindex` (used by lightwalletd for wallet synchronization) and could affect future chain verification that depends on correct subtree roots. ### Details The non-finalized state provides two methods for removing blocks: `pop_root` (removes the oldest block during finalization) and `pop_tip` (removes the newest block during a fork revert). `pop_root` correctly cleans up note commitment subtree contributions. `pop_tip` does not: it removes the block but retains the block's subtree root contributions in the in-memory state. When a chain fork occurs and `pop_tip` reverts the old tip, the winning fork's chain is extended. When that chain is later finalized, the stale subtree data from the reverted blocks is included in the RocksDB write batch and persisted to disk. The `pop_root`/`pop_tip` asymmetry is specific to subtree root handling. Other state managed by `pop_tip` (nullifiers, UTXOs, anchors, block hashes) uses different cleanup patterns that are not affected. ### Patches zebra-state 7.0.0 and zebrad 4.5.0. The fix adds subtree root cleanup to `pop_tip` matching the pattern already used by `pop_root`. ### Workarounds There is no configuration-level workaround. Chain forks are natural events on any Proof-of-Work network. Operators can mitigate the downstream impact by periodically verifying subtree root consistency using `z_getsubtreesbyindex` against a known-good reference. ### Impact Persistent corruption of Sapling and Orchard subtree root history in the RocksDB state database. The corruption survives node restarts. Downstream consumers that rely on `z_getsubtreesbyindex` for wallet synchronization (primarily `lightwalletd` and light wallets) receive incorrect subtree roots. This does not directly affect consensus validation of new blocks but can cause wallet synchronization failures or incorrect wallet state. Recovery requires rebuilding the state database from scratch. ### Credit Reported by `@dingledropper` via a private GitHub Security Advisory submission.
CVSS v3.1
Score 6.5medium
Affected software
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
Technical Analysis
The vulnerability occurs in zebrad versions up to v4.4.1 where the pop_tip method, used to revert the tip block during chain forks, fails to remove stale Sapling and Orchard note commitment subtree root data from the in-memory non-finalized state. When the chain finalizes, this stale data is persisted to RocksDB, causing on-disk corruption of subtree root history. This affects the z_getsubtreesbyindex RPC used by lightwalletd for wallet synchronization, potentially leading to incorrect wallet states. The pop_root method correctly cleans up subtree roots, but pop_tip does not, causing an asymmetry in state cleanup. Other state elements like nullifiers and UTXOs are unaffected. The issue is fixed by adding subtree root cleanup to pop_tip in zebra-state 7.0.0 and zebrad 4.5.0.
Potential Impact
The corruption of Sapling and Orchard subtree root history persists on disk and survives node restarts. Downstream consumers relying on z_getsubtreesbyindex, such as lightwalletd and light wallets, may receive incorrect subtree roots, causing wallet synchronization failures or incorrect wallet states. This does not directly impact consensus validation or block acceptance but affects wallet functionality. Recovery requires rebuilding the state database from scratch.
Mitigation Recommendations
A fix is available in zebra-state 7.0.0 and zebrad 4.5.0 that addresses the subtree root cleanup in pop_tip. Operators should upgrade to these versions to resolve the issue. There is no configuration-level workaround. Operators can mitigate downstream impact by periodically verifying subtree root consistency using z_getsubtreesbyindex against a known-good reference. Recovery from corruption requires rebuilding the state database.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-2gf8-q9rr-jq3h
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-52733"]
- Ecosystems
- ["crates.io"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a46ecb527e9c7971943c8cc
Added to database: 07/02/2026, 22:56:53 UTC
Last enriched: 07/02/2026, 23:10:03 UTC
Last updated: 07/31/2026, 12:27:30 UTC
Views: 24
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.