Skip to content
Heist/ feed
MediumFix available

zebrad vulnerable to getblocks/getheaders locator CPU amplification via uncapped vector length

Type: advisorySource: OSV1 source record

### Am I affected You are affected if: 1. You run `zebrad` up to and including `v4.4.1`. 2. Your node accepts inbound P2P connections. ### Summary The `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. A 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. ### Details The `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. A 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_HASHE

Announced Source revision 1
Original source ↗

GHSA-443g-gwgp-49x4

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: osv:GHSA-443g-gwgp-49x4

zebrad

Source reference: /affected/0/package/name

Affected versions
Not stated in this record
Fixed versions
4.5.0

Source reference: /affected/0/ranges

Prerequisites
Not stated in this record

zebra-chain

Source reference: /affected/1/package/name

Affected versions
Not stated in this record
Fixed versions
8.0.0

Source reference: /affected/1/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "SEMVER",
        "events": [
          {
            "introduced": "0"
          },
          {
            "fixed": "4.5.0"
          }
        ]
      }
    ],
    "package": {
      "name": "zebrad",
      "purl": "pkg:cargo/zebrad",
      "ecosystem": "crates.io"
    },
    "database_specific": {
      "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-443g-gwgp-49x4/GHSA-443g-gwgp-49x4.json"
    }
  },
  {
    "ranges": [
      {
        "type": "SEMVER",
        "events": [
          {
            "introduced": "0"
          },
          {
            "fixed": "8.0.0"
          }
        ]
      }
    ],
    "package": {
      "name": "zebra-chain",
      "purl": "pkg:cargo/zebra-chain",
      "ecosystem": "crates.io"
    },
    "database_specific": {
      "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-443g-gwgp-49x4/GHSA-443g-gwgp-49x4.json"
    }
  }
]
Related CVEs
CVE-2026-104436

Source reference: /aliases

Publisher severity

low

Source reference: /database_specific/severity

Linked CVE context

These ratings describe the referenced vulnerabilities and products. They are not a severity rating for every application using this dependency.

Event
#72827 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement