Bandwidth Attack

Flooding a node's connection with junk data to slow its relaying and validation work.

Basically

A bandwidth attack floods your Bitcoin node's internet connection with too much data. Your node then struggles to pass on transactions.

Key Takeaways

  • A bandwidth attack floods a Bitcoin node with excessive P2P messages. It can exhaust network bandwidth, memory or CPU resources and reduce the node's ability to validate and relay transactions.
  • Attack vectors include inv message flooding (CVE-2018-17145), large transaction spam, bloom filter abuse and addr message flooding. Each exploits a different part of the protocol to force disproportionate resource consumption.
  • Bitcoin Core defends against these attacks through mempool policy rules, peer misbehaviour scoring, rate limiting and protocol improvements like compact blocks and Erlay.

What Is a Bandwidth Attack?

A bandwidth attack is a denial-of-service (DoS) attack that floods your Bitcoin node with excessive or malicious peer-to-peer messages. It aims to exhaust your network bandwidth, memory or processing power, so your node slows down, disconnects from peers or crashes. Bitcoin's open and permissionless P2P network lets any node connect and send messages, so bandwidth attacks remain a persistent concern for node operators.

An eclipse attack tries to isolate your node by controlling all its peer connections, but a bandwidth attack focuses on resource exhaustion. The attacker does not need to manipulate your view of the blockchain. They simply want to degrade or disable your node's ability to participate in the network.

How It Works

Bandwidth attacks use individually valid or valid-looking Bitcoin P2P messages that overwhelm your node when sent together. Sending these messages costs the attacker little, but processing, storing and relaying them costs you much more.

INV Message Flooding (CVE-2018-17145)

INV message flooding is the best-documented bandwidth attack on Bitcoin nodes. Inventory (inv) messages announce new transactions or blocks to peers, and an attacker can flood your node with inv messages containing up to 50,000 transaction hashes each. Your node queues them for processing but can run out of available memory before it handles them all.

Braydon Fuller discovered this vulnerability, tracked as CVE-2018-17145. It affected Bitcoin Core versions 0.16.0 and 0.16.1, Bitcoin Knots 0.16.x, all beta versions of bcoin through v1.0.0-pre, and btcd through v0.20.1-beta. Developers patched it privately and disclosed it publicly in September 2020; Litecoin, Namecoin, Decred and Bitcoin Cash were also affected.

Large Transaction Spam

Attackers craft many transactions at or near the maximum standard size (100,000 vBytes / 400,000 weight units) and broadcast them across the network. Every node that accepts these transactions into its mempool must relay them to peers, consuming bandwidth and memory at each hop; the July 2015 flood attack used this approach, sending hundreds of thousands of low-value transactions and leaving over 80,000 unconfirmed in the mempool. During a 10-day peak, approximately 23% of all transactions were spam, average confirmation delays rose from 20 minutes to over 2.5 hours, and the estimated attack cost was around 201 BTC.

Bloom Filter Abuse

BIP 37 introduced bloom filters so lightweight (SPV) clients could request only relevant transactions from full nodes. Maliciously crafted filters with high false-positive rates forced full nodes to test every transaction against the filter and send far more data than necessary, making the work cheap for the attacker but expensive for the serving node. Bitcoin Core disabled NODE_BLOOM service by default in version 0.19 (2019), BIP 111 added a service bit so nodes can signal whether they serve bloom filter requests, and compact block filters (BIP 157/158) now provide a safer alternative for light client filtering.

ADDR Message Flooding

The addr message relays peer connection information for decentralised peer discovery. An attacker can flood the network with fabricated addr messages containing fake IP addresses, polluting nodes' address managers; this consumes bandwidth and can prepare Sybil or eclipse attacks by filling address tables with attacker-controlled entries. Bitcoin Core addressed this with a token-bucket rate limiter (PR #22387), restricting addr processing to an average of 0.1 addresses per second per connection with bursts of up to 1,000 addresses.

Defences and Mitigations

Bitcoin Core has implemented multiple layers of defence against bandwidth attacks. These layers combine protocol-level policies, peer management and network optimisations.

Mempool Policy Rules

Mempool policy is the first line of defence against bandwidth attacks. It makes spam economically costly and rejects obviously wasteful transactions.

Bitcoin mempool congestion economics offers a deeper look at how mempool economics interact with congestion and fee markets. Read that entry for more detail.

Peer Misbehaviour Scoring

Bitcoin Core tracks a per-peer misbehaviour score, and each protocol violation adds points for actions such as sending an invalid block header or a duplicate version message. Your node disconnects the peer when the score reaches 100 and discourages reconnection from that address for 24 hours. The system catches many straightforward protocol-level abuses, but it is less effective against sophisticated attackers who stay within protocol boundaries.

Connection Management

Nodes maintain distinct connection types to limit exposure. These types separate peer connections and reduce that exposure.

Protocol-Level Bandwidth Optimisations

Several protocol improvements reduce baseline bandwidth consumption. They leave more headroom to absorb attack traffic.

Bandwidth Attacks vs. Related Attacks

People often confuse bandwidth attacks with eclipse and Sybil attacks. Each attack targets a different layer of the network.

These attacks often work together: an attacker might use addr message flooding as a bandwidth vector to pollute address tables, prepare a Sybil attack and then eclipse specific targets. A bandwidth attack can also distract from a more targeted eclipse attack.

Historical Incidents

Several real-world events illustrate how bandwidth attacks affect the Bitcoin network. The July 2015 flood attack and October 2015 attack are two examples covered in this entry.

Why It Matters

Bandwidth attacks threaten the decentralisation and reliability of the Bitcoin network. If a full node needs excessive bandwidth to withstand attacks, fewer individuals and organisations will operate nodes, concentrating the network among well-resourced operators. That concentration makes censorship resistance harder to maintain.

Layer-2 protocols like the Lightning Network and Spark depend directly on the health of the base layer. Nodes that cannot reliably receive and broadcast transactions may miss critical channel state updates, creating security risks for off-chain protocols. Protocol-level bandwidth optimisations benefit the entire stack, from base-layer nodes to the applications built on top.

Evolving Attack Surface

Bitcoin's evolving protocol can introduce unexpected bandwidth attack vectors through new features. Taproot witness data, Ordinals inscriptions and novel transaction types all expand the design space that attackers can exploit. Each protocol change requires careful analysis of its bandwidth implications.

Resource-Constrained Nodes

Nodes on limited hardware, such as Raspberry Pi devices or connections with data caps, are disproportionately vulnerable. The October 2015 attack took approximately 10% of nodes offline, primarily those on memory-constrained hardware. The result is a tension between keeping node requirements low for decentralisation and hardening against bandwidth attacks.

Economic Cost of Defence

Mempool policy rules that defend against spam, including minimum relay fees and standardness checks, also limit legitimate use cases. A minimum relay fee that is too high prices out micropayments, while one that is too low makes spam cheap. Operators must balance openness with resilience, and Bitcoin Core developers continue to debate these trade-offs.

The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.

0

← All 1876 glossary terms