CVE-2026-59980: hpack Package Unbounded Variable Integer Decoding Vulnerability

hpack Updated 01 Oct 2026

Summary

01/10/2026
Yes i
Moderate
6.3

CVE-2026-59980: hpack: Unbounded variable integer decoding can cause run-away computation on malformed input. Affects hpack versions < 4.2.0. Fixed in 4.2.0. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The hpack package is a Python library that implements HPACK, the header compression format used in HTTP/2. It is commonly utilized as a dependency in the python-hyper/h2 library, which provides HTTP/2 client and server functionalities. The hpack library is designed to efficiently encode and decode HTTP/2 header fields, but it is susceptible to vulnerabilities that can be exploited through malformed input.

Vulnerability Detail

The vulnerability arises from unbounded variable integer decoding within the hpack library. This flaw can lead to excessive computation time when processing malformed input, resulting in a potential denial of service (DoS) scenario. Specifically, the decoding process can exhibit O(n^2) runtime behavior, effectively blocking further processing when faced with sufficiently large and unsanitized input. This can be particularly detrimental in environments where performance and responsiveness are critical.

How To Fix

Latest published version: 4.2.0 as of 22 Oct 2026

pip install --upgrade "hpack==4.2.0"

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary measure, it is advisable to sanitize input to the hpack decoder, particularly for long sequences of '0xFF' values. This can help mitigate the risk of exploitation until the package is updated. For example, you can implement input validation in your code as follows:

def sanitize_input(input_data):
    if input_data.count(b'\xFF') > threshold:
        raise ValueError('Input contains too many 0xFF values')
    return input_data

Conclusion

The hpack package has a significant vulnerability (CVE-2026-59980) that can lead to denial of service through unbounded variable integer decoding. Users are strongly encouraged to update to version 4.2.0 or later to mitigate this risk. Until then, input sanitization is a recommended workaround.

See every vulnerability recorded for hpack →

Share this vulnerability

FAQ

CVE-2026-59980 is a vulnerability in the hpack package that allows for unbounded variable integer decoding, potentially leading to denial of service due to excessive computation time.

You can check if your application is affected by using the Vulert playground at Vulert Scanner, which allows you to monitor for open-source vulnerabilities without requiring any signup.

The CVSS score for this vulnerability is 6.3, indicating a medium severity level that could impact the performance and availability of affected applications.

If an immediate update is not possible, implement input sanitization to filter out potentially malicious input, particularly sequences of '0xFF' values.

More information about the hpack library can be found on its GitHub repository or the official documentation, which details its usage and features.

Related vulnerabilities

Recent vulnerabilities recorded for hpack.

How To Fix

Latest published version: 4.2.0 as of 22 Oct 2026

pip install --upgrade "hpack==4.2.0"

The newest release already contains this fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback