CVE-2016-6581: HPACK Denial of Service vulnerability in hpack
Summary
CVE-2016-6581: HPACK Denial of Service vulnerability (HPACK Bomb). Affects hpack versions >= 1.0.0, < 2.3.0. Fixed in 2.3.0. How to fix ↓
Also tracked for
- python-hpack · Debian:11
The same CVE-2016-6581 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
hpack is a Python library used for HTTP/2 header compression. It provides functionality to compress and decompress headers using the HPACK algorithm. The library is commonly used in HTTP/2 implementations to reduce the size of header data and improve network performance. However, versions between v1.0.0 and v2.2.0 of the hpack library are vulnerable to a denial of service attack known as an "HPACK Bomb".
Vulnerability Detail
The HPACK Bomb attack targets HTTP/2 implementations that use the affected versions of the hpack library. In this attack, an attacker inserts a header field into the dynamic header table that is exactly the size of the table. The attacker then sends a header block consisting of repeated requests to expand that field in the dynamic table. This results in a compression ratio of 4,096 or better, meaning that a small amount of data can decompress to a significantly larger amount on the target machine. This can lead to resource exhaustion and potentially crash the target system.
How To Fix
Latest published version: 4.2.0 as of 22 Oct 2026
pip install --upgrade "hpack==4.2.0"
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.3.0
This is the first release that contains the fix.
pip install --upgrade "hpack==2.3.0"
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update the hpack library to the fixed version to mitigate the risk of a denial of service attack.
Conclusion
The HPACK Denial of Service vulnerability in the hpack library can be exploited to launch a denial of service attack on systems using the affected versions. To mitigate this risk, it is crucial to update the hpack library to version 2.3.0 or later. For further support and guidance on vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for hpack →
FAQ
This vulnerability can be exploited to launch a denial of service attack on systems using the affected versions of the hpack library. The attack can lead to resource exhaustion and potentially crash the target system.
Versions between v1.0.0 and v2.2.0 of the hpack library are vulnerable to this attack. It is recommended to upgrade to version 2.3.0 or later to fix the vulnerability.
No, there is no known workaround for this vulnerability. Updating the hpack library to the fixed version is the only recommended solution.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using just Pipfile.lock to provide accurate vulnerability information.
For further support on vulnerability remediation, you can contact info@devnack.com. They can provide assistance and guidance on fixing the vulnerability in your application.
Related vulnerabilities
Recent vulnerabilities recorded for hpack.