---
id: CVE-2026-59980
title: hpack is an HTTP/2 Header Encoding for Python
summary: >-
  hpack is an HTTP/2 Header Encoding for Python. Prior to version 4.2.0,
  unbounded variable integer decoding can cause run-away computation on
  malformed input leading to O(n^2) runtime, effectively blocking further
  processing with large en…
severity: medium
cvss: 6.3
cvssVector: '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'
cwe:
  - CWE-400
  - CWE-770
vendor: python-hyper
product: hpack
affected:
  - hpack < 4.2.0
published: '2026-09-23'
updated: '2026-09-24'
sourceUpdated: '2026-09-24T14:17:37.727'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-59980'
references:
  - url: >-
      https://cs.opensource.google/go/x/net/+/master:http2/hpack/hpack.go;l=468;drc=8e2b117aee74f6b86c207a808b0255de45c0a18a
    label: security-advisories@github.com
  - url: 'https://docs.rs/http2/0.5.19/src/http2/hpack/decoder.rs.html#403'
    label: security-advisories@github.com
  - url: >-
      https://github.com/python-hyper/hpack/commit/8cfb02c547740e16dbfe7aba77bad84b297cec2c
    label: security-advisories@github.com
  - url: >-
      https://github.com/python-hyper/hpack/security/advisories/GHSA-8v8h-hg4w-mvq2
    label: security-advisories@github.com
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-59980.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-59980'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2539827'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-59980'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-59980'
  - url: 'https://github.com/python-hyper/hpack/releases/tag/v4.2.0'
  - url: 'https://github.com/advisories/GHSA-8v8h-hg4w-mvq2'
  - url: 'https://github.com/python-hyper/hpack'
tags:
  - nvd
  - cve.org
  - csaf
  - vex
  - red-hat
  - ghsa
  - pip
  - osv
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: partial
  timestamp: '2026-09-24T13:24:31.887152Z'
cvssSource: cna
scores:
  cna: 6.3
  vendor: 5.3
ingestedAt: '2026-09-23T22:33:56.547Z'
aliases:
  - GHSA-8v8h-hg4w-mvq2
ecosystem: pip
patched:
  - hpack 4.2.0
epss: 0.00301
epssPercentile: 0.20297
---

## Overview

hpack is an HTTP/2 Header Encoding for Python. Prior to version 4.2.0, 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. A fix is available in python-hyper/hpack v4.2.0 to restricted variable integer decoding to uint32 to prevent run-away computation. As a workaround, sanitize input to hpack decoder for long sequences of `0xFF` values to prevent malicious use.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Vendor advisories

- **Red Hat VEX** · Low · affected: Migration Toolkit for Containers, Red Hat Ansible Automation Platform 2, Red Hat OpenShift AI (RHOAI), Red Hat OpenStack Platform 17.1, Red Hat OpenStack Platform 18.0 · no fix planned: Migration Toolkit for Containers, Red Hat Ansible Automation Platform 2, Red Hat OpenShift AI (RHOAI), Red Hat OpenStack Platform 17.1, … · updated 2026-09-24 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-59980.json)

## Package advisory (CVE-2026-59980)

Affected packages:

- `hpack <= 4.1.0`

Patched in:

- `hpack 4.2.0`

Source: https://github.com/advisories/GHSA-8v8h-hg4w-mvq2
