Course contentsShow
← Security
Lesson 1103 of 3,05223. Web Security - Modern Web AttacksFree lesson

HTTP/3 0-RTT Replay Attacks

Exploiting zero round-trip time resumption, replay attack vectors, and application-level protections against 0-RTT vulnerabilities.

HTTP/3 0-RTT Replay Attacks

What you'll learn: How HTTP/3's zero round-trip time resumption feature creates replay attack vulnerabilities and how to defend against them.


The Promise and Peril of 0-RTT

HTTP/3 (built on QUIC) offers 0-RTT resumption — a performance feature that lets clients send application data in their very first packet when resuming a previous connection. No handshake delay means faster page loads, but there's a dangerous side effect: those early data packets can be replayed by attackers.

Think of it like sending a sealed letter with a copy of yesterday's authenticated message taped to the outside. The recipient can't tell if you sent it twice intentionally or if someone intercepted and resent the original.

The Replay Attack Vector

When an attacker intercepts 0-RTT data packets, they can capture and retransmit them to the server. The server, unable to distinguish replayed packets from legitimate ones during connection establishment, processes the request again.

Critical vulnerable scenarios:

  • State-changing operations: POST requests that transfer money, delete accounts, or modify data
  • Non-idempotent actions: Incrementing counters, one-time token usage
  • Authentication tokens: Session cookies sent in 0-RTT can be replayed

Application-Level Protections

Since the protocol itself can't prevent replays, defense must happen at the application layer:

  1. Never use 0-RTT for non-idempotent requests — only allow GET/HEAD with no side effects
  2. Implement request deduplication — track unique request identifiers server-side
  3. Require explicit confirmation — use a full round-trip for sensitive operations
  4. Time-bound operations — include tight timestamps and reject old requests
  5. Server configuration — disable 0-RTT entirely for sensitive endpoints

Key Takeaway: HTTP/3's 0-RTT resumption trades security for speed by enabling replay attacks; applications must explicitly forbid state-changing operations in early data and implement deduplication mechanisms to prevent attackers from retransmitting captured packets.