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

HTTP/2 Stream Vulnerabilities and Attacks

Exploiting stream dependencies, flow control mechanisms, and priority manipulation to cause denial of service or resource exhaustion.

HTTP/2 Stream Vulnerabilities and Attacks

You'll learn how attackers exploit HTTP/2's stream management features to overwhelm servers and cause denial of service.

What Are HTTP/2 Streams?

HTTP/2 allows multiple concurrent "streams" (requests and responses) over a single TCP connection. Each stream has an ID, priority level, and dependencies on other streams. The protocol uses flow control to prevent any single stream from monopolizing the connection.

While these features improve performance, they also create new attack surfaces.

Stream-Based Attacks

Stream Dependency Manipulation: Attackers can create complex dependency chains where Stream B depends on Stream A, Stream C depends on B, and so on. When Stream A is delayed, all dependent streams wait, consuming server memory tracking these relationships. Imagine a pyramid scheme where each participant waits for the person above them—the server must remember everyone's position while nothing actually happens.

Flow Control Abuse: HTTP/2 uses WINDOW_UPDATE frames to control how much data can be sent. An attacker might:

  • Open many streams and never send WINDOW_UPDATE, forcing the server to buffer data indefinitely
  • Send tiny window updates (1 byte at a time), making the server send thousands of tiny frames
  • Exhaust the server's window size across all streams

Priority Manipulation: Attackers set all their streams to maximum priority, causing the server to constantly recalculate resource allocation. Or they rapidly change priorities, creating processing overhead without sending meaningful data.

Real-World Impact

These attacks cause resource exhaustion—memory fills with stream metadata, CPU cycles are wasted recalculating priorities, and legitimate users can't connect. Unlike traditional HTTP/1.1 slowloris attacks, HTTP/2 vulnerabilities exploit the protocol's own optimization features against itself.

Key Takeaway: HTTP/2's stream management features—designed for efficiency—become attack vectors when abused through complex dependencies, flow control manipulation, and priority flooding, requiring servers to implement strict limits on stream count, dependency depth, and priority changes.