{"id":"CVE-2026-52733","kind":"vulnerability","aliases":["CVE-2026-52733","GHSA-2gf8-q9rr-jq3h"],"related":[],"title":"zebrad has persistent on-disk corruption of Sapling/Orchard subtree roots after chain fork via pop_tip","description":"### Am I affected\n\nYou are affected if:\n\n1. You run `zebrad` up to and including `v4.4.1`.\n2. Your node participates in a network where chain forks occur (mainnet, testnet, or any network with multiple miners).\n\nAll default configurations are affected. The corruption persists across restarts because it is written to RocksDB.\n\n### Summary\n\nWhen `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.\n\n### Details\n\nThe 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.\n\nWhen 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.\n\nThe `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.\n\n### Patches\n\nzebra-state 7.0.0 and zebrad 4.5.0.\n\nThe fix adds subtree root cleanup to `pop_tip` matching the pattern already used by `pop_root`.\n\n### Workarounds\n\nThere 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.\n\n### Impact\n\nPersistent 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.\n\n### Credit\n\nReported by `@dingledropper` via a private GitHub Security Advisory submission.","summary":"After a chain fork, zebrad keeps stale Sapling and Orchard subtree root data and writes it to its RocksDB state database when the new chain finalizes. Wallet-sync data served by z_getsubtreesbyindex, used by lightwalletd, can then be wrong and survives restarts.","severity":"medium","cvss":6.5,"epss":0.00436,"exploited":false,"exploited_at":null,"products":[{"name":"zebra-state","fixed":["7.0.0"],"affected":"<= 6.0.0","ecosystem":"cargo"},{"name":"zebrad","fixed":["4.5.0"],"affected":"<= 4.4.1","ecosystem":"cargo"}],"ecosystems":["cargo"],"tags":["cwe-459","cwe-672","lightwalletd","package","rocksdb","zcash","zebra-state","zebrad"],"not_affected_if":["no-zebrad","zebrad-4.5.0-or-later"],"how_to_check":"- Check the zebrad version with `zebrad --version`; versions up to and including `4.4.1` are affected per the advisory.\n- Check the zebra-state crate version in Cargo.lock; versions up to and including `6.0.0` are affected.\n- Compare `z_getsubtreesbyindex` output against a known-good reference node, as the advisory suggests.","fix":"- zebrad: move to `4.5.0`\n- zebra-state: move to `7.0.0`","status":"open","published_at":"2026-07-02T20:11:36+00:00","first_seen_at":"2026-11-13T02:43:33+00:00","triaged_at":"2026-11-13T02:45:01+00:00","updated_at":"2026-11-13T02:45:01+00:00","category":"package","confidence":0.8,"triage":{"at":"2026-11-13T02:45:01Z","model":"claude-haiku-5-5","output":{"fix":"- zebrad: move to `4.5.0`\n- zebra-state: move to `7.0.0`","reach":"network","title":"zebrad: chain forks corrupt stored Zcash shielded subtree roots on disk","impact":"medium","summary":"After a chain fork, zebrad keeps stale Sapling and Orchard subtree root data and writes it to its RocksDB state database when the new chain finalizes. Wallet-sync data served by z_getsubtreesbyindex, used by lightwalletd, can then be wrong and survives restarts.","audience":"businesses","category":"package","nicknames":[],"who_cares":["zebrad","zcash","lightwalletd","zebra-state","rocksdb"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"wallet sync gets wrong subtree roots; node state stays corrupted","analyst_note":"","how_to_check":"- Check the zebrad version with `zebrad --version`; versions up to and including `4.4.1` are affected per the advisory.\n- Check the zebra-state crate version in Cargo.lock; versions up to and including `6.0.0` are affected.\n- Compare `z_getsubtreesbyindex` output against a known-good reference node, as the advisory suggests.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["zebrad-4.5.0-or-later","no-zebrad"],"who_is_affected":"Operators of zebrad nodes at or below 4.4.1 on any Zcash network with forks, including default configurations, are affected, since the stale data is written on finalization after any fork. Systems that depend on z_getsubtreesbyindex, mainly lightwalletd and light wallets, are the ones that show wrong results. Nodes that never run zebrad, or that already run 4.5.0 or later, can skip it. The advisory notes that a state rebuild is needed to clear existing corruption.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"no","severity_if_unknown":"unknown"},"cost_usd":0.000906,"input_tokens":5514,"output_tokens":710,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-2026':19A,27A '-459':34B '-52733':20A,28A '-672':36B '1':96C '2':105C '2gf8':23A '4.5.0':357C '7.0.0':354C 'across':132C 'add':360C 'advisori':492C 'affect':91C,94C,128C,192C,203C,349C,459C 'alreadi':370C 'anchor':339C 'asymmetri':324C 'batch':314C 'block':147C,224C,230C,239C,260C,264C,307C,340C,464C 'caus':467C 'chain':13A,47B,69B,113C,150C,174C,205C,277C,291C,296C,383C 'clean':247C 'cleanup':344C,363C 'commit':157C,250C 'configur':126C,380C 'configuration-level':379C 'consensus':460C 'consist':406C 'consum':437C 'contribut':252C,268C 'correct':210C,246C 'corrupt':7A,130C,188C,418C,432C 'could':202C 'credit':483C 'cve':18A,26A 'cwe':33B,35B 'data':57B,74B,160C,179C,303C 'databas':65B,430C,480C 'default':125C 'depend':208C 'detail':213C 'differ':343C 'dingledropp':486C 'direct':458C 'disk':6A,318C 'downstream':399C,436C 'event':387C 'extend':293C 'failur':470C 'final':70B,170C,176C,217C,232C,299C 'fix':359C 'fork':14A,48B,114C,151C,242C,278C,289C,384C 'futur':204C 'getsubtreesbyindex':78B,194C,409C,442C 'ghsa':22A 'ghsa-2gf8-q9rr-jq3h':21A 'github':490C 'good':414C 'handl':330C 'hash':341C 'histori':191C,425C 'impact':400C,416C 'in-memori':165C,271C 'includ':103C,309C 'incorrect':452C,472C 'jq3h':25A 'keep':50B 'known':413C 'known-good':412C 'later':298C 'level':381C 'light':449C 'lightwalletd':37B,81B,197C,447C 'mainnet':116C 'manag':333C 'match':367C 'memori':167C,273C 'method':221C 'miner':123C 'mitig':397C 'multipl':122C 'natur':386C 'network':111C,120C,394C 'new':68B,463C 'newest':238C 'node':107C,434C 'non':169C,216C 'non-fin':168C,215C 'note':156C,249C 'nullifi':337C 'occur':115C,279C 'old':285C 'oldest':229C 'on-disk':4A 'oper':395C 'orchard':54B,155C,422C 'packag':38B 'particip':108C 'patch':350C 'pattern':345C,369C 'period':402C 'persist':3A,131C,184C,316C,417C 'pop':16A,142C,225C,234C,244C,253C,281C,320C,322C,335C,365C,373C 'primarili':446C 'privat':489C 'proof':391C 'proof-of-work':390C 'provid':219C 'q9rr':24A 'rebuild':477C 'receiv':451C 'recoveri':475C 'refer':415C 'reli':439C 'remov':144C,223C,227C,236C,258C 'report':484C 'requir':476C 'restart':88B,133C,435C 'retain':162C,262C 'revert':243C,283C,306C 'rocksdb':39B,63B,139C,185C,312C,428C 'root':11A,56B,159C,190C,212C,226C,245C,267C,321C,329C,362C,374C,405C,424C,454C 'run':98C 'sapl':52B,153C,420C 'sapling/orchard':9A 'scratch':482C 'secur':491C 'serv':75B 'specif':326C 'stale':51B,152C,178C,301C 'state':31A,43B,64B,171C,186C,218C,274C,332C,353C,429C,474C,479C 'submiss':493C 'subsequ':175C 'subtre':10A,55B,158C,189C,211C,251C,266C,302C,328C,361C,404C,423C,453C 'summari':140C 'surviv':87B,433C 'sync':73B 'synchron':200C,445C,469C 'testnet':117C 'tip':17A,143C,146C,235C,254C,282C,286C,323C,336C,366C 'two':220C 'use':79B,195C,342C,371C,407C 'utxo':338C 'v4.4.1':104C 'valid':461C 'verif':206C 'verifi':403C 'via':15A,487C 'wallet':72B,199C,444C,450C,468C,473C 'wallet-sync':71B 'win':288C 'work':393C 'workaround':375C,382C 'write':59B,313C 'written':137C,181C 'wrong':85B 'z':77B,193C,408C,441C 'zcash':40B 'zebra':30A,42B,352C 'zebra-st':41B,351C 'zebra-state':29A 'zebrad':1A,32A,44B,49B,99C,356C","nicknames":[],"mitigations":[],"who_affected":"Operators of zebrad nodes at or below 4.4.1 on any Zcash network with forks, including default configurations, are affected, since the stale data is written on finalization after any fork. Systems that depend on z_getsubtreesbyindex, mainly lightwalletd and light wallets, are the ones that show wrong results. Nodes that never run zebrad, or that already run 4.5.0 or later, can skip it. The advisory notes that a state rebuild is needed to clear existing corruption.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":["zebrad","zebrastate"],"ptokens":["state","zebra","zebrad"],"labels":["cargo","cwe459","cwe672","lightwalletd","medium","package","rocksdb","zcash","zebrad","zebrastate"],"campaign_type":null,"search_a":"'-2026':19A,27A '-52733':20A,28A '2gf8':23A 'chain':13A 'corrupt':7A 'cve':18A,26A 'disk':6A 'fork':14A 'ghsa':22A 'ghsa-2gf8-q9rr-jq3h':21A 'jq3h':25A 'on-disk':4A 'persist':3A 'pop':16A 'q9rr':24A 'root':11A 'sapling/orchard':9A 'state':31A 'subtre':10A 'tip':17A 'via':15A 'zebra':30A 'zebra-state':29A 'zebrad':1A,32A","search_b":"'-459':34B '-672':36B 'chain':47B,69B 'cwe':33B,35B 'data':57B,74B 'databas':65B 'final':70B 'fork':48B 'getsubtreesbyindex':78B 'keep':50B 'lightwalletd':37B,81B 'new':68B 'orchard':54B 'packag':38B 'restart':88B 'rocksdb':39B,63B 'root':56B 'sapl':52B 'serv':75B 'stale':51B 'state':43B,64B 'subtre':55B 'surviv':87B 'sync':73B 'use':79B 'wallet':72B 'wallet-sync':71B 'write':59B 'wrong':85B 'z':77B 'zcash':40B 'zebra':42B 'zebra-st':41B 'zebrad':44B,49B","search_c":"'1':96C '2':105C '4.5.0':357C '7.0.0':354C 'across':132C 'add':360C 'advisori':492C 'affect':91C,94C,128C,192C,203C,349C,459C 'alreadi':370C 'anchor':339C 'asymmetri':324C 'batch':314C 'block':147C,224C,230C,239C,260C,264C,307C,340C,464C 'caus':467C 'chain':113C,150C,174C,205C,277C,291C,296C,383C 'clean':247C 'cleanup':344C,363C 'commit':157C,250C 'configur':126C,380C 'configuration-level':379C 'consensus':460C 'consist':406C 'consum':437C 'contribut':252C,268C 'correct':210C,246C 'corrupt':130C,188C,418C,432C 'could':202C 'credit':483C 'data':160C,179C,303C 'databas':430C,480C 'default':125C 'depend':208C 'detail':213C 'differ':343C 'dingledropp':486C 'direct':458C 'disk':318C 'downstream':399C,436C 'event':387C 'extend':293C 'failur':470C 'final':170C,176C,217C,232C,299C 'fix':359C 'fork':114C,151C,242C,278C,289C,384C 'futur':204C 'getsubtreesbyindex':194C,409C,442C 'github':490C 'good':414C 'handl':330C 'hash':341C 'histori':191C,425C 'impact':400C,416C 'in-memori':165C,271C 'includ':103C,309C 'incorrect':452C,472C 'known':413C 'known-good':412C 'later':298C 'level':381C 'light':449C 'lightwalletd':197C,447C 'mainnet':116C 'manag':333C 'match':367C 'memori':167C,273C 'method':221C 'miner':123C 'mitig':397C 'multipl':122C 'natur':386C 'network':111C,120C,394C 'new':463C 'newest':238C 'node':107C,434C 'non':169C,216C 'non-fin':168C,215C 'note':156C,249C 'nullifi':337C 'occur':115C,279C 'old':285C 'oldest':229C 'oper':395C 'orchard':155C,422C 'particip':108C 'patch':350C 'pattern':345C,369C 'period':402C 'persist':131C,184C,316C,417C 'pop':142C,225C,234C,244C,253C,281C,320C,322C,335C,365C,373C 'primarili':446C 'privat':489C 'proof':391C 'proof-of-work':390C 'provid':219C 'rebuild':477C 'receiv':451C 'recoveri':475C 'refer':415C 'reli':439C 'remov':144C,223C,227C,236C,258C 'report':484C 'requir':476C 'restart':133C,435C 'retain':162C,262C 'revert':243C,283C,306C 'rocksdb':139C,185C,312C,428C 'root':159C,190C,212C,226C,245C,267C,321C,329C,362C,374C,405C,424C,454C 'run':98C 'sapl':153C,420C 'scratch':482C 'secur':491C 'specif':326C 'stale':152C,178C,301C 'state':171C,186C,218C,274C,332C,353C,429C,474C,479C 'submiss':493C 'subsequ':175C 'subtre':158C,189C,211C,251C,266C,302C,328C,361C,404C,423C,453C 'summari':140C 'surviv':433C 'synchron':200C,445C,469C 'testnet':117C 'tip':143C,146C,235C,254C,282C,286C,323C,336C,366C 'two':220C 'use':195C,342C,371C,407C 'utxo':338C 'v4.4.1':104C 'valid':461C 'verif':206C 'verifi':403C 'via':487C 'wallet':199C,444C,450C,468C,473C 'win':288C 'work':393C 'workaround':375C,382C 'write':313C 'written':137C,181C 'z':193C,408C,441C 'zebra':352C 'zebra-st':351C 'zebrad':99C,356C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-05-29T07:45:43+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:L","cvss_by":"GitHub","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-2gf8-q9rr-jq3h","url":"https://github.com/advisories/GHSA-2gf8-q9rr-jq3h","severity":"medium","published_at":"2026-07-02T20:11:36+00:00","modified_at":"2026-11-13T02:42:43+00:00","first_seen_at":"2026-11-13T02:43:33+00:00","fetched_at":"2026-11-13T02:52:49+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-52733","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-52733","severity":null,"published_at":"2026-08-18T20:17:16+00:00","modified_at":"2026-11-09T20:10:00+00:00","first_seen_at":"2026-11-13T03:13:22+00:00","fetched_at":"2026-11-13T03:13:22+00:00","note":null}],"documents":[{"id":142040,"url":"https://api.github.com/repos/ZcashFoundation/zebra/security-advisories/GHSA-2gf8-q9rr-jq3h","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"},{"id":142041,"url":"https://github.com/ZcashFoundation/zebra/security/advisories/GHSA-2gf8-q9rr-jq3h","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2026-05-29T07:45:43+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":142266,"url":"https://github.com/ZcashFoundation/zebra/commit/1440b43ca7df59aca948090d45117557b217a6cd","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":142267,"url":"https://github.com/ZcashFoundation/zebra/releases/tag/v4.5.0","title":"Release notes: github.com","kind":"release","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release notes: github.com"}],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.00436,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-52733"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}