---
id: CVE-2026-77640
title: >-
  tor before 0.4.9.9 was prone to an infinite loop when decompressing a
  truncated zlib/gzip  stream with done=1
summary: >-
  tor before 0.4.9.9 was prone to an infinite loop when decompressing a
  truncated zlib/gzip  stream with done=1. A truncated stream never reaches
  Z_STREAM_END,  causing zlib to return Z_BUF_ERROR with no input remaining,
  which  buf_add_com…
severity: low
cvss: 3.7
cvssVector: 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L'
cwe:
  - CWE-1284
vendor: torproject
product: tor
affected:
  - tor < 0.4.9.9
patched:
  - tor 0.4.9.9
published: '2026-08-20'
updated: '2026-09-08'
sourceUpdated: '2026-09-08T18:26:07.090'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-77640'
references:
  - url: 'https://gitlab.torproject.org/tpo/core/tor/-/raw/tor-0.4.9.9/ChangeLog'
    label: cve@mitre.org
tags:
  - nvd
epss: 0.00223
epssPercentile: 0.13229
ingestedAt: '2026-09-08T19:08:49.591Z'
---

## Overview

tor before 0.4.9.9 was prone to an infinite loop when decompressing a truncated zlib/gzip  stream with done=1. A truncated stream never reaches Z_STREAM_END,  causing zlib to return Z_BUF_ERROR with no input remaining, which  buf_add_compress() mistook for a full output buffer and retried forever. Fixed by returning TOR_COMPRESS_ERROR in that case so the caller can abort cleanly. This is TROVE-2026-021.

## Affected

- `tor < 0.4.9.9`

## Remediation

Upgrade past the affected range:

- `tor 0.4.9.9`
