← All advisories
T3 · Low

btcd Out-of-Memory via 32 MB Message Payloads

Published September 21, 2026

Affected ProductAffected VersionsPatched Versions
btcd < v0.25.0 v0.25.0

Impact

btcd allowed individual P2P messages to carry payloads of up to roughly 32 MB, where Bitcoin Core caps messages at 4 MB. Two message types, alert and cfcheckpt, declared the full limit. The peer layer read and allocated a receive buffer for the first message on a connection before checking that it was a version, so any host that could open a TCP connection to the P2P listener could send oversized messages of these types; no handshake was required. With enough concurrent connections the node exhausted memory and was killed by the operating system.

The reporter reproduced this against a 2 GB node with 125 simulated peers, each sending 32 MB alert messages, until the process was OOM-killed.

There is no fund-loss path. The node restarts cleanly. The attack can be repeated as long as the attacker can open connections.

Severity

Scored against the Lightning Labs severity taxonomy:

Dimension Score Reasoning
Impact Low OOM crash, operator-recoverable by restart. No fund loss and no persistent state damage.
Attack Vector High Network. Any host that can open a TCP connection to the P2P listener; no handshake is required.
Exploitability High Reliable against a default configuration; the attacker needs only bandwidth and connections.
Virality Low Per-victim. Each target needs its own sustained connections; nothing propagates.

Result: T3. Rule 3 (Impact = Low, base T3); no promotion because Virality is not High.

Patches

Fixed in two parts, both in btcd v0.25.0:

  • The alert message was removed entirely (btcd#2396). Bitcoin Core retired it in 2016 and it serves no purpose on the modern network.
  • cfcheckpt now declares a message-specific maximum payload of about 3.2 MB, enough for the 100,000 filter headers it will decode, instead of the global 32 MB limit (btcd#2398).

A third message, reject, kept the 32 MB limit until v0.26.0 and is covered by a separate advisory published alongside this one. Operators should prefer v0.26.0 or later.

Disclosure timeline

  • Reported by Erick Cestari on 2025-07-03, following differential fuzzing of Bitcoin P2P message parsing between btcd and rust-bitcoin.
  • Fixes merged 2025-07-11 and 2025-07-16; released in btcd v0.25.0 on 2025-11-04.
  • Public disclosure: 2026-09-21.