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

MODERATE
Advisory Identifier: GHSA-8v8h-hg4w-mvq2
CWE-400
Published
Advisory Summary

CVE-2026-59980 is a MODERATE unbounded variable integer decoding can vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting hpack libraries in the PyPI ecosystem. The issue involves unbounded variable integer decoding can cause run-away computation on malformed input. Remediation is available by upgrading affected packages to version 4.2.0.

CVE-2026-59980 at a Glance

CVE Identifier CVE-2026-59980
GHSA Identifier GHSA-8v8h-hg4w-mvq2
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product hpack
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-59980

To remediate this vulnerability, upgrade all affected hpack dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

hpack fixed: 4.2.0
pip install hpack>=4.2.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show hpack

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-59980, inspect your installed packages using pip:

pip show hpack

Analyze the terminal output to locate any version of hpack in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.0), your application is affected.

Note: The pip show hpack command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In hpack, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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.

CVE-2026-59980 Affected hpack Versions

1 component(s)
Fixed Versions:
4.2.0
Product / Package Ecosystem Affected Versions Fixed Version
hpack
PyPI
< 4.2.0
4.2.0

References

Frequently Asked Questions

What is CVE-2026-59980?
CVE-2026-59980 is a security vulnerability in hpack involving Unbounded variable integer decoding can cause run-away computation on malformed input under CWE-400: Uncontrolled Resource Consumption.
Which hpack versions are affected?
Affected versions include releases prior to 4.2.0 across affected packages: hpack.
What version fixes CVE-2026-59980?
Upgrading to 4.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hpack affected?
Yes, hpack is affected in releases prior to 4.2.0. Upgrade your dependency to 4.2.0 or later.
What CWE is associated with CVE-2026-59980?
CVE-2026-59980 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for CVE-2026-59980?
Run the dependency tree command: 'pip show hpack'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-8v8h-hg4w-mvq2",
  "modified" : "2026-09-24T19:43:26Z",
  "published" : "2026-09-24T19:43:26Z",
  "aliases" : [ "CVE-2026-59980" ],
  "summary" : "hpack: Unbounded variable integer decoding can cause run-away computation on malformed input",
  "details" : "### Impact\n\nUsers 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.\n\n### Patches\nA fix is available in python-hyper/hpack v4.2.0 to restricted variable integer decoding to uint32 to prevent run-away computation.\n\n### Workarounds\nSanitize input to hpack decoder for long sequences of `0xFF` values to prevent malicious use.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "hpack"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.2.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 4.1.0"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/python-hyper/hpack/security/advisories/GHSA-8v8h-hg4w-mvq2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-59980"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python-hyper/hpack/commit/8cfb02c547740e16dbfe7aba77bad84b297cec2c"
  }, {
    "type" : "WEB",
    "url" : "https://cs.opensource.google/go/x/net/+/master:http2/hpack/hpack.go;l=468;drc=8e2b117aee74f6b86c207a808b0255de45c0a18a"
  }, {
    "type" : "WEB",
    "url" : "https://docs.rs/http2/0.5.19/src/http2/hpack/decoder.rs.html#403"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/python-hyper/hpack"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/python-hyper/hpack/releases/tag/v4.2.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-09-24T19:43:26Z",
    "nvd_published_at" : "2026-09-23T23:17:11Z"
  }
}