ZEBRAD · CVE-2026-52734 · Package
FIX → 4.5.0
Zebra's mempool download pipeline does not remove a transaction's cancel handle when verification times out, so the entries pile up for every timed-out transaction. An unauthenticated peer sending transactions over P2P can slowly exhaust memory until the node is killed by the operating system.
first public May 29, 2026 · 2 sources
Check it with your coding agent
It reads this page and tells you if your code or app is affected.
Any node running zebrad up to and including 4.4.1 that accepts inbound P2P connections and has an active mempool, which is the default configuration once the node is synced near the chain tip. Nodes that do not listen for inbound connections or are not synced to the tip are not exposed to the mempool path. Operators in memory-constrained containers are most at risk of an OOM kill.
Not affected if no-inbound-p2p, zebrad-4.5.0-or-later
Who cares node-operators, self-hosted, zcash, zebra
zebrad --version; affected versions are up to and including 4.4.1.network.listen_addr is set in the zebrad config (it is set by default), since inbound P2P connections are required.Upgrade to 4.5.0
You are affected if:
zebrad up to and including v4.4.1.network.listen_addr is set, which is the default).All default configurations are affected.
The mempool download pipeline's cancel_handles map retains entries for transactions whose verification times out at the outer RATE_LIMIT_DELAY (73-second) boundary. The tokio::time::error::Elapsed error carries no payload, so the transaction ID is unrecoverable and the corresponding cancel_handles entry (including the full Gossip::Tx(UnminedTx), up to ~2 MB) is never removed. Entries accumulate monotonically with no upper bound or garbage collection, leading to eventual out-of-memory process termination.
Downloads::poll_next() at handles three terminal states for a verification task:
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.
zebrad4.5.0zebrad/src/components/mempool/downloads.rs:215-228Ok(Ok(...)): success. Calls cancel_handles.remove(&tx.transaction.id). Correct.Ok(Err(...)): verification error. Calls cancel_handles.remove(&hash). Correct.Err(elapsed): outer timeout. Returns Err(elapsed) without removing anything. Bug.tokio::time::error::Elapsed has no payload, so the timed-out transaction's UnminedTxId is unrecoverable from the error. The consumer at zebrad/src/components/mempool.rs:663-672 explicitly acknowledges this gap with a TODO comment.
The only cleanup paths for cancel_handles are cancel(mined_ids) (removes entries matching mined transaction IDs; attacker transactions are never mined) and cancel_all() (clears everything on shutdown or chain reset). No periodic GC, no time-based eviction, and no count cap exists.
For direct tx pushes (Gossip::Tx), the retained entry holds the full deserialized transaction, which can be up to ~9 MB in memory for a transaction near the transparent-output extreme. Per-connection leak rate at worst case: ~685 KB/s (~2.4 GB/hour).
The fix preserves the UnminedTxId through the timeout error path: wrap the timeout future so the spawned task's outer error carries the txid (e.g., Err((txid, elapsed))). In Downloads::poll_next(), on the timeout arm, call cancel_handles.remove(&txid).
There is no configuration-level workaround. Restarting the node clears the accumulated entries. Operators running in memory-constrained environments (containers with cgroup limits) may see the process killed by the OOM killer before natural recovery.
Gradual, unbounded memory exhaustion of a Zebra node from unauthenticated P2P traffic. The leak is monotonic (entries are never freed under normal operation) but slow (~685 KB/s per connection worst case). An attacker must sustain traffic for hours to exhaust typical server memory. The node continues operating normally until memory pressure becomes critical, at which point the OS OOM killer terminates the process or the node degrades due to swap pressure. No consensus impact, no fund loss, no on-disk corruption.
Reported by @AnticsDecoded via a private GitHub Security Advisory submission. Working E2E reproduction on a live regtest node with staged parent/child transaction dependencies.
This page as .md · .json · CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.