{"id":"CVE-2026-104436","aliases":["CVE-2026-104436","GHSA-443g-gwgp-49x4"],"related":[],"kind":"vulnerability","state":"published","title":"Zebra before 4.5.0 CPU Amplification via Uncapped getblocks/getheaders Locator Length","summary":"Zebra before 4.5.0 contains an uncontrolled resource consumption vulnerability that allows remote P2P peers to exhaust blocking-pool threads by sending oversized block locator vectors. Attackers can send getblocks or getheaders messages with up to 65,535 locator hashes, triggering per-hash chain lookups that degrade block validation, RPC, and mempool performance.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Zebra before 4.5.0 contains an uncontrolled resource consumption vulnerability that allows remote P2P peers to exhaust blocking-pool threads by sending oversized block locator vectors. Attackers can send getblocks or getheaders messages with up to 65,535 locator hashes, triggering per-hash chain lookups that degrade block validation, RPC, and mempool performance.","source":"cvelist"},{"lang":"en","text":"### Am I affected\n\nYou are affected if:\n\n1. You run `zebrad` up to and including `v4.4.1`.\n2. Your node accepts inbound P2P connections.\n\n### Summary\n\nThe `read_getblocks` and `read_getheaders` codec paths accepted block locator vectors up to approximately 65,535 entries (the generic `TrustedPreallocate` ceiling derived from `MAX_PROTOCOL_MESSAGE_LEN`), rather than the protocol-specification limit of 101 entries (matching zcashd's `MAX_LOCATOR_SZ`). Each entry in the locator vector triggers a per-hash chain lookup (`HashMap::contains_key` + `RocksDB::contains_hash`) in `find_chain_intersection` on a tokio blocking-pool thread.\n\nA single maximally-sized `getblocks` message occupies one blocking-pool thread for approximately 10–65ms. Under sustained load from multiple peers, this can degrade state-read performance for block validation, RPC, and mempool lookups.\n\n### Details\n\nThe `read_headers` codec path already implements the correct pattern: it reads the CompactSize count, validates against `MAX_HEADERS_PER_MESSAGE = 160` before deserialization, and rejects oversized messages. The `read_getblocks` and `read_getheaders` paths were missing this pre-deserialization count check and instead relied on the generic `block::Hash::max_allocation()` bound, which allows `(MAX_PROTOCOL_MESSAGE_LEN - 1) / 32 = 65,535` hashes.\n\nA legitimate block locator is logarithmic in chain length (approximately 30 hashes for the current ~3M-block Zcash chain). Zebra's own send-side cap is `MAX_FIND_BLOCK_HASHES_RESULTS = 500`.\n\nThe practical impact requires significant attacker bandwidth (approximately 2 MiB per request) and multiple Sybil peers to meaningfully degrade the blocking pool, which limits real-world exploitability.\n\n### Patches\n\nPatched in Zebra 4.4.2. The fix caps `block::Hash::max_allocation()` at `MAX_BLOCK_LOCATOR_LENGTH = 101`, matching zcashd's `MAX_LOCATOR_SZ`. This causes the deserializer to reject oversized locators before any allocation or iteration occurs.\n\n### Workarounds\n\nNo specific workaround is needed. Existing backpressure mechanisms (load shedding, sequential per-peer message processing, connection limits) constrain the practical impact.\n\n### Impact\n\nUnder sustained load from multiple Sybil peers, oversized locator vectors can occupy blocking-pool threads and degrade state-read performance. The effect is bounded by connection limits and requires significant attacker bandwidth.\n\n### Credit\n\nVulnerability identified by `@dingledropper`, who submitted the fix in [PR #10570](https://github.com/ZcashFoundation/zebra/pull/10570). Downstream CPU/blocking-pool impact analysis contributed by `@ouicate`.","format":"markdown","source":"ghsa"}],"published":"2026-07-02T19:34:21.000Z","modified":"2026-10-29T21:17:08.690Z","severity":{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"VulnCheck","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N","score":6.3,"rating":"MEDIUM"},{"scorer":"VulnCheck","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":3.7,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L","score":3.7,"rating":"LOW"}],"cwes":["CWE-770"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"4.5.0","status":"affected"},{"type":"semver","version":"4.5.0","status":"unaffected"}],"vendor":"ZcashFoundation","product":"zebra","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","fixed":"8.0.0","status":"affected"},{"type":"semver","version":"8.0.0","status":"unaffected"}],"vendor":"ZcashFoundation","product":"zebra-chain","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"4.5.0"}],"ecosystem":"crates.io","package":"zebrad","purl":"pkg:cargo/zebrad","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"8.0.0"}],"ecosystem":"crates.io","package":"zebra-chain","purl":"pkg:cargo/zebra-chain","source":"ghsa"}],"references":[{"url":"https://github.com/ZcashFoundation/zebra/security/advisories/GHSA-443g-gwgp-49x4","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://www.vulncheck.com/advisories/zebra-before-4.5.0-cpu-amplification-via-uncapped-getblocks-getheaders-locator-length","tags":["third-party-advisory"],"sources":["cvelist","nvd"]},{"url":"https://github.com/ZcashFoundation/zebra/pull/10570","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ZcashFoundation/zebra/commit/8981a1b95d4807cad99e5bb3b94fc8bc723ac033","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/ZcashFoundation/zebra","tags":["package"],"sources":["ghsa"]}],"credits":["dingledropper","mpguerra","oxarbitrage"],"assigner":"VulnCheck","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-10-02T14:51:19.938Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-104436","url":"https://www.cve.org/CVERecord?id=CVE-2026-104436","licence":"CVE Terms of Use","modified":"2026-10-29T21:15:28.872Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-443g-gwgp-49x4","url":"https://github.com/advisories/GHSA-443g-gwgp-49x4","licence":"CC-BY-4.0","modified":"2026-10-03T03:56:03.280Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-104436","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-104436","licence":"Public domain","modified":"2026-10-29T21:17:08.690Z"}],"updatedAt":"2026-11-25T22:59:41.949Z","epss":{"score":0.00333,"percentile":0.28608,"date":"2026-12-01T12:00:22.000Z"}}