Executive brief
Zebra, a Zcash node implementation, contains a flaw that causes it to slowly consume all available system memory when processing certain network traffic. This occurs because the software fails to clear temporary data when a transaction verification takes too long to complete. Over time, this memory exhaustion will cause the node to crash or become unresponsive, potentially disrupting the ability to participate in the Zcash network.
Technical details
A memory leak exists in the `Downloads::poll_next()` function within `zebrad/src/components/mempool/downloads.rs`. When a transaction verification task hits the `RATE_LIMIT_DELAY` timeout, the resulting `tokio::time::error::Elapsed` error lacks the transaction ID payload required to remove the entry from the `cancel_handles` map. Consequently, the full deserialized transaction (up to ~9 MB) remains in memory indefinitely. An unauthenticated remote attacker can exploit this by flooding the node with transactions that trigger timeouts, leaking memory at a rate of up to ~685 KB/s per connection. The issue is fixed in version 4.5.0 by ensuring the timeout error path preserves and utilizes the transaction ID for map cleanup.
Affected products
- ZcashFoundation zebrad <= 4.4.1
Timeline
- 2026-05-29: disclosed: Reported via private GitHub Security Advisory
- 2026-07-02: advisory: GitHub Advisory published
- 2026-07-02: patched: Version 4.5.0 released
References
- https://api.github.com/users/AnticsDecoded
- https://github.com/AnticsDecoded
- https://api.github.com/users/AnticsDecoded/gists%7B/gist_id%7D
- https://api.github.com/users/AnticsDecoded/repos
- https://avatars.githubusercontent.com/u/237784870?v=4
- https://api.github.com/users/AnticsDecoded/events%7B/privacy%7D