Skip to content
IT
Guides & Tutorials

How to protect HTTP/2 servers from the HTTP/2 Bomb attack: complete guide

Mitigation and solutions for Apache, Nginx, IIS, and other vulnerable servers

Published on By Sebastiano, GoYou.it 4 min read
Listen to the full article Full reading · 6:15 · from the channel GoYou Wiki
How to protect HTTP/2 servers from the HTTP/2 Bomb attack: complete guide

KEY TAKEAWAYS

  • What is the HTTP/2 Bomb attack and how it works
  • Vulnerabilities in major HTTP/2 servers and available solutions
  • Steps to mitigate the impact of the attack
  • Protection strategies for servers without available patches

The HTTP/2 Bomb attack is a new denial-of-service type vulnerability that affects various web servers and HTTP/2 implementations, including Nginx, Apache HTTP Server, Microsoft IIS, Envoy, and Cloudflare Pingora. This attack exploits standard behaviors of the HTTP/2 protocol to force servers to allocate and retain large amounts of memory.

The attack was made public by researchers at Calif, who describe it as a remote attack targeting default HTTP/2 configurations. Unlike traditional attacks, HTTP/2 Bomb uses two main techniques: the first exploits HPACK header compression, sending small references to indexed headers that expand into much larger allocations on the server side. The second exploits HTTP/2 flow control to block responses, preventing the server from releasing the allocated memory.

This allows a client with limited bandwidth to consume a significant amount of RAM on a vulnerable server. Researchers' tests showed that Envoy 1.37.2 reached 32 GB of memory in 10 seconds, Apache httpd 2.4.67 in 18 seconds, Nginx 1.29.7 in 45 seconds, and Microsoft IIS on Windows Server 2025 reached 64 GB in 45 seconds.

The problem is not just about the size of the decoded headers. Many defenses limit the total size of the decoded headers, but this attack exploits numerous small headers, where memory usage results from server-side bookkeeping and processing rather than payload size.

Cookie management further contributes to the problem in some implementations. HTTP/2 allows splitting Cookie headers into separate fields, and in affected cases, these have not been correctly counted against request field limits. This allowed attackers to create many header objects while staying below the intended protection thresholds.

Prerequisites

  • Operating Systems: Windows Server 2025, systems compatible with Nginx, Apache HTTP Server, Microsoft IIS, Envoy, Cloudflare Pingora
  • Software: Nginx version 1.29.7 or higher, Apache HTTP Server version 2.4.67 or higher, Microsoft IIS, Envoy version 1.37.2 or higher, Cloudflare Pingora
  • Administrative Access: Administrator permissions to modify server configurations
  • Internet Connection: To download any security updates or patches

Procedure to Mitigate the HTTP/2 Bomb Attack

By the end of this guide, you will be able to apply the necessary measures to mitigate the HTTP/2 Bomb attack on your web servers.

Step 1: Verify Your Web Server Version

  • Check the currently used version.

Step 2: Apply Available Patches

  • For Apache httpd:
    • Update to modhttp2 2.0.41 or higher.
  • For Microsoft IIS, Envoy, and Cloudflare Pingora:
    • Check for official patches.

Step 3: Configure Security Settings

  • For Apache httpd:
  • For Nginx:

Step 4: Monitor and Evaluate

  • Monitor server memory usage after applying patches or configurations.
  • Evaluate the impact of the changes made.
  • Ensure that request header counting limits are applied.

Verification and Troubleshooting

Vulnerability Testing

  • Verify the web server version: Identify your web server version (Nginx, Apache HTTP Server, Microsoft IIS, Envoy, Cloudflare Pingora) to determine if it is vulnerable.
  • Check HTTP/2 configurations: Ensure the server uses HTTP/2 and verify default settings.
  • Simulate the attack: Use security testing tools to simulate the HTTP/2 Bomb attack and observe server behavior in terms of memory allocation.

Corrections and Mitigations

  • Nginx:

Monitoring and Prevention

  • Monitor memory usage: Implement monitoring tools to detect abnormal memory usage that may indicate an HTTP/2 Bomb attack.
  • Apply header limits: Configure the server to limit the number of headers per request.
  • Keep web servers updated: Ensure timely application of security updates to prevent future vulnerabilities.
  • Educational Summary:

The HTTP/2 Bomb attack exploits vulnerabilities in default HTTP/2 configurations, using techniques such as HPACK exploitation and HTTP/2 flow control to consume large amounts of server memory. This can lead to significant RAM consumption, as demonstrated in tests on various servers.

  • Call to Action:

If you manage an HTTP/2 server, it is crucial to act immediately:

  • Check if your stack is vulnerable.
  • Apply available patches for your server.
  • If immediate updates are not possible, disable HTTP/2 as a temporary measure.

For more details, refer to the message on Openwall.

Editorial Note and Disclaimer

The guides and content published on GoYou are the result of independent research and analysis activities, for informational, educational, and in-depth purposes.

GoYou does not constitute a journalistic publication nor an editorial product under Law No. 62/2001 and does not engage in real-time information activities.

The GoYou project does not provide professional, technical, legal, or financial advice and disclaims all responsibility for the improper use of the published information.

In the Crypto sector, every investment involves risks: readers are invited to always inform themselves autonomously before making any decision.

Source: linuxiac.com · GoYou.it is not a registered news outlet; all content is for informational and educational purposes.

Listen GoYou Wikievery article read in full
Go to the channel

You may also like

Behind every article is the work of our passion. If you enjoy GoYou.it, you can support its development and continuity.

Support with PayPal