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

HTTP/2 Protocol Architecture and Security Model

Understanding HTTP/2 binary framing, multiplexing, stream prioritization, and the security implications of the new protocol design.

HTTP/2 Protocol Architecture and Security Model

What You'll Learn

You'll understand how HTTP/2's binary framing layer fundamentally changes how browsers and servers communicate, creating both performance benefits and new security considerations.


The Binary Framing Revolution

Unlike HTTP/1.1's text-based protocol, HTTP/2 uses a binary framing layer that splits messages into small frames and sends them over a single TCP connection. Think of it like upgrading from sending letters one at a time to using a package delivery system that can bundle multiple items together.

Key Architectural Changes

Multiplexing: Multiple requests and responses can be in-flight simultaneously over one connection. No more head-of-line blocking where a slow response delays everything else.

Stream Prioritization: Each request gets a "stream ID" and can be assigned priority levels. Critical resources (like CSS) can be delivered before less important ones (like images).

Binary Format: Data is split into TYPE, LENGTH, FLAGS, and PAYLOAD fields. This is more efficient but harder for humans to debug with traditional tools.

Security Implications

The new architecture introduces unique attack surfaces:

  • Stream multiplexing confusion: Attackers may craft requests that exploit how servers prioritize or queue streams, potentially causing resource exhaustion
  • Binary parsing vulnerabilities: Bugs in frame parsing can lead to crashes or memory corruption
  • Header compression (HPACK): While efficient, improper implementation can leak information or enable injection attacks
  • Enhanced monitoring difficulty: Binary protocols are harder to inspect with traditional web application firewalls and logging tools
  • Single connection dependency: One compromised connection affects all multiplexed streams

Most HTTP/2 implementations require TLS (HTTPS), which provides encryption and helps validate the connection, but the protocol complexity itself creates opportunities for implementation flaws.

Key Takeaway: HTTP/2's binary framing and multiplexing deliver performance gains but introduce protocol-level attack surfaces that require specialized security tools and careful implementation validation.