# Security Analysis of Bitcoin's V2 Transport Protocol: Exploiting Design Implications for Sustained Eclipse and Downgrade Attacks

Crypto.world

> Bitcoin historically exchanged all P2P traffic in plaintext over TCP, which enabled a long line of attacks based on reading or modifying payloads. BIP 324 introduced V2 P2P transport — encrypted but…

**arXiv**: 2605.19715

**Published**: 2026-05-19

**Authors**: Charmaine Ndolo, Florian Tschorsch

## AI summary

Security Analysis of Bitcoin's V2 Transport Protocol: Exploiting Design Implications for Sustained Eclipse and Downgrade Attacks

## Overview

**Research area:** Blockchain network security — specifically the peer-to-peer (P2P) layer of Bitcoin and the security properties of BIP 324, Bitcoin's encrypted V2 P2P transport protocol.

**Technical level:** Advanced. The paper assumes familiarity with Bitcoin's connection management, TCP-level adversary models, and cryptographic transport design.

**Scope (one sentence):** The paper analyzes whether Bitcoin's new encrypted V2 P2P transport actually remediates previously known network-level attacks, and demonstrates that conceptual design choices — not implementation bugs — enable a sustained eclipse attack and a full downgrade to unencrypted V1 transport.

## What This Paper Is About

Bitcoin historically exchanged all P2P traffic in plaintext over TCP, which enabled a long line of attacks based on reading or modifying payloads. BIP 324 introduced V2 P2P transport — encrypted but unauthenticated channels — and it became the default in Bitcoin Core 27.0. This paper asks whether that encryption genuinely closes the old attack surface, and finds that while the original attacks are remediated in their original form, alternative paths to the same objectives exist. The authors show two of them: an eclipse attack built on how V2 handles decryption errors, and a downgrade attack built on the compatibility mechanism meant to fall back to V1.

## Key Contributions

1. **Analysis and documentation of the V2 protocol.** The authors consolidate the BIP 324 specification, the reference client's code base, and informal resources into a single reference, dissecting protocol message structure and showing how message types can be classified at the network layer despite encryption. They derive a threat model from BIP 324 and assess the current viability of past attacks. They state this is the first work to study Bitcoin's security under V2 P2P transport.
2. **A sustained eclipse attack exploiting encryption error handling.** An active network-level adversary replays duplicate ciphertexts, causing recipients to hit decryption errors and close their TCP connections to the victim. The adversary then fills the freed connection slots. The authors emphasize sustaining the eclipse, describing the maintenance challenges (handshake, inactivity timeout, outbound peer synchronisation checks, eviction of inbound peers) and how each is overcome — a component they say prior eclipse work neglects.
3. **A downgrade attack exploiting protocol compatibility.** Because BIP 324 relies on the transport layer rather than the application layer for negotiating with older clients, an adversary injecting a TCP RST during the key exchange phase causes the initiator to retry using unencrypted V1. The authors state they are the first to present and demonstrate such a downgrade attack, and that it reopens the door to delay and spoofing attacks.
4. **Root-cause analysis and countermeasures.** The authors narrow down the causes of the identified issues and propose short-term and long-term countermeasures, noting that some are not sufficient on their own and others require further research.

## Main Findings

- **Prior attacks are remediated in their original form, but not eliminated.** BIP 324 renders payload inspection, modification, and spoofing impractical, and blocks interference with existing connections. It does not change Bitcoin's address management, so the address-table component of older eclipse attacks still applies.
- **Message types remain classifiable despite encryption.** Given a TCP payload of *x* bytes, an observer can infer a message type *t* if (x − 21 − {1, 3}) mod min(|t|) = 0. This was validated in a **6-week measurement study** of the public network. Some types, such as VERSION, can be identified reliably; others, such as BLOCK, cannot be identified with an equally straightforward approach due to multiple variable-length fields.
- **Decryption failure forces disconnection.** V2 ciphertexts can only be decrypted exactly once. A replayed payload yields a wrong length from the 3-byte length descriptor, producing a "packet too large" error and a regular four-way FIN teardown — which the paper notes leaves no indication of an attack, unlike classic RST injection.
- **The eclipse attack succeeded in under a day.** The authors implemented the attack in their testbed and eclipsed a victim node in **less than a day**, which they describe as more effective than the now-impractical EREBUS attack and with a significantly shorter execution period.
- **Immediate disconnection on decryption failure is a cross-network pattern.** A review of IPFS, the Lightning network, and Ethereum found that all close TCP connections immediately on decryption failure. The authors argue this common practice, appropriate for client–server architectures, introduces a conceptual vulnerability in P2P settings.
- **PING and PONG are the preferred messages to replay.** PINGs are sent approximately every **two minutes** and are the smallest non-empty messages, but both PING and PONG travel in **29-byte payloads**, making them indistinguishable by size alone — so a stateless adversary will sometimes substitute one for the other.
- **V2 adoption on the wire is incomplete.** Mainnet measurements showed that **less than 50%** of a node's outgoing connections are V2 P2P transport connections — which is why the downgrade adversary must distinguish V1 from V2 attempts rather than interfering with all of them. A V1 initiator's first packet after the TCP handshake carries **126 bytes** of VERSION payload; V2's first payload is larger and cannot be serialised to a VERSION message.
- **The downgrade attack succeeded without fail.** The window of opportunity is the key exchange phase (public keys, garbage, and garbage terminators), implemented by Bitcoin Core in one and a half round trips. The authors implemented and confirmed the attack is viable and succeeds without fail.
- **Restarts create downgrade opportunities at scale.** Per the Bitnodes crawler, **120** nodes had upgraded to Bitcoin Core 28.0 one day after its 4 October 2024 release, **447** after a week, and **1562** after **30** days — implying at least 1562 restarts in the first month. Prior work found a node with a public IP address has a **10%** probability of going offline after two hours, rising to **25%** after ten hours.
- **Connection slots are asymmetric to attack.** Inbound slots have no requirements, so one host with one IP address on different ports suffices to fill them. Outbound slots require inserting adversarial addresses into the victim's new table, needing at least **ten** IP addresses from distinct /16 (IPv4) or /32 (IPv6) subnets.
- **Sustaining the eclipse requires minimal but specific functionality.** Adversaries must complete the application handshake within **60 seconds**, respond to PINGs to avoid a **20-minute** inactivity timeout, and satisfy outbound synchronisation checks — a HEADERS response within **two minutes**, first requested after **20 minutes** — which can be met statelessly by echoing the victim's own GETHEADERS and returning its HEADERS reply.

## Methodology in Plain English

The authors used a combination of network measurements, emulation, and simulation.

1. **Protocol review.** They read BIP 324 and the Bitcoin Core 28.0 code base to reconstruct exactly how connections are established, how packets are structured, and how errors and compatibility are handled. From this they derived a threat model: a network-level adversary such as an autonomous system that controls infrastructure between the victim and the rest of the network, is in-path and can tamper with TCP streams, and targets nodes running Bitcoin Core 27.0 or higher on the default port TCP/8333, not via Tor.
2. **Measuring the side channel.** They tested whether encrypted payload lengths leak message type by running a 6-week measurement study against the public network and checking their length-based classification rule.
3. **Building a testbed.** They built `btc-play-ground`, based on Mininet with Docker containers as hosts, on an Ubuntu 24.04 LTS server with **16** cores and **94** GiB RAM. The topology comprised **621** hosts: **3** hosts each in **200** subnets running Bitcoin Core 27.0 or 28.0; **1** Debian Linux container running the victim (Bitcoin Core 28.0) plus the attack code, attached to a `netfilter` queue via an `iptables` rule directing all TCP port 8333 traffic there; and **20** subnets with **1** host each running `basic-btc-client` to fill the victim's outbound slots. Block generation time was ten minutes. The victim's maximum connections were set to **50**, giving **10** outgoing, **1** feeler, and **39** incoming slots; all other instances used default settings.
4. **Implementing the attacks.** The eclipse attack code replays PING messages and uses `basic-btc-client` — the authors' minimal Bitcoin client that implements only what is needed to survive connection maintenance — to occupy inbound slots and announce adversarial addresses. The attack code was launched **24 hours** after the network was deployed.
5. **Evaluating.** They report results from the eclipse evaluation, with some results omitted for space and placed in an appendix figure (not reproduced in the excerpt). The downgrade attack was implemented and confirmed viable. Notably, the victim and attacker were placed in the same container for implementation simplicity; the authors argue this represents an in-path attacker and does not affect evaluation validity.

## Why This Matters

**Impact on research.** The paper reframes the security question around BIP 324: not "does encryption stop the old attacks?" but "what new attack surface does the design of the encryption and its compatibility layer create?" It argues the issues are conceptual rather than implementation bugs, making them relevant beyond Bitcoin. It also provides what the authors describe as the first sustained-eclipse treatment, addressing how an adversary keeps an eclipse alive rather than only how to achieve it.

**Real-world applications:**

- **Full-node operators** should understand that encryption does not protect against an AS-level adversary that can replay or reset traffic, and that decryption-error disconnection can be weaponised against them.
- **Bitcoin Core developers and reviewers** get a concrete list of design decisions to revisit: reliance on the transport layer for protocol negotiation, silent retry and fallback on failure, and the absence of any specified shapability mechanism despite it being a protocol objective.
- **Other P2P networks (IPFS, Ethereum, Lightning)** face the same conceptual pattern, since all were found to close TCP connections immediately on decryption failure.
- **Network operators, exchanges, and custodial services** running nodes for transaction and block propagation have a direct stake in whether their view of the chain can be isolated, given that eclipse attacks enable double-spending and 51% attack scenarios.

**Industry relevance.** V2 P2P transport is not experimental — it is the default in Bitcoin Core 27.0 and later, and downgrade attacks can force a node back to unencrypted V1 where delay and spoofing attacks become viable again. The finding that fewer than 50% of a node's outgoing connections are V2 in mainnet measurements indicates the encrypted overlay is far from universal, which affects how much real protection node operators currently have.

## Future Directions

- **Designing and validating countermeasures.** The authors propose short-term and long-term countermeasures but state that some are not sufficient on their own and others address fundamental challenges in securing the P2P network and require further research. Evaluating these experimentally is the obvious next step.
- **Specifying shapability.** BIP 324 lists shapability as an objective and provides decoy packets, but does not specify how they should be used. Defining a decoy-packet policy — and testing whether it defeats the length-based classification rule — is an open problem.
- **Moving negotiation to the application layer.** The downgrade attack stems from BIP 324 relying on the transport layer for protocol negotiation. Whether an application-layer downgrade-protection mechanism can be retrofitted without breaking compatibility is unresolved.
- **Extending to other P2P networks.** The cross-network review was a survey of error handling, not an attack demonstration. Confirming whether the replayed-ciphertext and reset-based techniques transfer to IPFS, Ethereum, or Lightning is left open.

## Target Audience

Bitcoin Core and BIP contributors, blockchain P2P networking researchers, and network-security researchers studying adversarially controlled infrastructure. It is also valuable to operators of full nodes and to engineers working on other encrypted P2P overlays, but it is not beginner material — readers should already understand Bitcoin's connection and address management and be comfortable with transport-layer attack models.

## Authors’ abstract

Bitcoin recently introduced a new protocol for the encryption of peer-to-peer (P2P) communication. The protocol, known as V2 P2P transport, represents a big step towards securing the overlay network against various previously-known attack vectors. Based on an analysis of V2 P2P transport, this work examines the current viability of said attacks and concludes that while they are now remediated, alternative attacks and paths to similar objectives exist. The identified…

[The full abstract on arXiv](https://arxiv.org/abs/2605.19715)

[Read the original paper](https://arxiv.org/abs/2605.19715)

---

Canonical: https://crypto.world/paper/security-analysis-of-bitcoin-s-v2-transport-protocol-exploiting-design-2605.19715
