hpack: Unbounded variable integer decoding can cause run-away computation on malformed inputGHSA-8v8h-hg4w-mvq2
Fix: python-hyper/hpack@8cfb02cGHSA-8v8h-hg4w-mvq2 is a Uncontrolled Resource Consumption vulnerability in hpack. A fix is available for hpack — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-8v8h-hg4w-mvq2.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
hpackReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
Impact
Users of the python-hyper/hpack library, most commonly used as downstream dependency of the python-hyper/h2 library (an HTTP/2 client and server implementation). Unbounded variable integer decoding can cause run-away computation on malformed input leading to O(n^2) runtime, effectively blocking further processing with large enough unsanitized input.
Patches
A fix is available in python-hyper/hpack v4.2.0 to restricted variable integer decoding to uint32 to prevent run-away computation.
Workarounds
Sanitize input to hpack decoder for long sequences of 0xFF values to prevent malicious use.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | hpack | all versions | 4.2.0pip install --upgrade 'hpack==4.2.0' |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for hpack, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update hpack to 4.2.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-8v8h-hg4w-mvq2 is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
A flaw was found in hpack, the Python HTTP/2 header encoding library, which is shipped as a dependency in several Red Hat products, including Red Hat OpenStack Platform, Red Hat Ansible Automation Platform, Red Hat OpenShift AI, Migration Toolkit for Containers, and cloud.redhat.com services. The library performs…
Sanitize input to hpack decoder for long sequences of `0xFF` values to prevent malicious use.Source: Red Hat security advisory for GHSA-8v8h-hg4w-mvq2 (CC BY 4.0)
Frequently Asked Questions
Is GHSA-8v8h-hg4w-mvq2 in your dependencies?
Find it across PyPI, including transitive dependencies.