CVE-2026-85091: zlib heap buffer overflow in gz_vacate function

CVE-2026-85091 · Severity: high · CVSS 7.4 · Published 2026-09-03

zlib is a widely-used compression library found in countless server and client applications. This vulnerability allows an attacker to trigger a heap buffer overflow by exploiting non-blocking write operations, potentially leading to application crashes or code execution. Affected versions are used in infrastructure ranging from web servers to CDNs to system utilities.

Quick answers

Is CVE-2026-85091 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-85091 being exploited in the wild.
How severe is CVE-2026-85091?
High severity, with a CVSS score of 7.4, published 3 September 2026.
Which products and versions are affected?
zlib zlib 1.3.1.2 through 1.3.2.
Is there a fix for CVE-2026-85091?
No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.
How is CVE-2026-85091 attacked?
It is attacked over the network.
Am I affected by CVE-2026-85091?
Check whether anything you run is named in the advisory. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

A heap buffer overflow exists in the gz_vacate() function (introduced in zlib 1.3.1.2) when processing non-blocking gzwrite() operations. The root cause is that gz_write() can leave a stale external buffer pointer (strm->next_in) pointing outside the internal input buffer after a write stalls (EAGAIN), but avail_in remains unbounded. When gzprintf() or gzvprintf() subsequently calls gz_vacate(), an unchecked memmove() copies avail_in bytes (potentially hundreds of KB) into a 16384-byte allocation, overflowing the heap. Zlib 1.3.1.2 through 1.3.2 are affected; 1.3.1 suffers lower-severity single-byte null writes. The attack requires the application to perform non-blocking gz operations followed by gzprintf/gzvprintf without intervening error clearing that resets pointers. No patch is mentioned in the advisory text.

Affected products

  • zlib zlib 1.3.1.2 through 1.3.2

Timeline

  • 2026-09-03: disclosed: Public advisory published; GitHub gist and NVD disclosure
  • 2026-09-16: other: GitHub gist last updated

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.