# CVE-2026-85091: zlib 1.2.11 through 1.3.2 Heap Buffer Overflow via Stale gzwrite Pointer After Failed Write

- Severity: High 8.3 (CVSS:4.0, scored by VulnCheck) `CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.50%, higher than 44% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-09-03T01:04:44.460Z
- Modified: 2026-11-17T10:15:02.362Z
- Also known as: RUSTSEC-2026-0544
- Weaknesses: CWE-787
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: VulnCheck

## Description

zlib 1.2.11 through 1.3.2 contains a heap buffer overflow: after an underlying write() fails, gz_write() returns without resetting strm.next_in, leaving it pointed at the caller's buffer. A later gz* write call then derives a position from the stale pointer and writes past a heap allocation; any write() failure reaches it, including EPIPE on a blocking descriptor, and in versions before 1.3.1.2 the failed write must be followed by a gzclearerr() call.

(As written by CVE List.)

## Affected

- zlib zlib: from 1.2.11 up to 1.3.2
- libz-sys (crates.io): from 1.1.25 before 1.1.33

## Every score

- VulnCheck: CVSS:4.0 8.3 High `CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:H/VA:H/SC:N/SI:N/SA:N`
- VulnCheck: CVSS:3.1 7.4 High `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H`

## References

- <https://gist.github.com/thesmartshadow/e0b9481792afb7c31e86fee1ff084490> (exploit, technical-description)
- <https://github.com/madler/zlib/commit/df84af25dc1942490e1d1c899a07619152a46148> (patch, web)
- <https://github.com/madler/zlib/blob/v1.3.2/gzwrite.c#L393> (technical-description)
- <https://github.com/madler/zlib> (product)
- <https://www.vulncheck.com/advisories/zlib-1.3.1.2-through-1.3.2-heap-buffer-overflow-via-gz-vacate> (third-party-advisory)
- <https://crates.io/crates/libz-sys> (package)
- <https://rustsec.org/advisories/RUSTSEC-2026-0544.html> (advisory)
- <https://github.com/madler/zlib/issues/1310> (report)
- <https://github.com/rust-lang/libz-sys/commit/b161d77050c00c6eeb7dd4b66ea14d4524d73dc4> (web)
- <https://github.com/rust-lang/libz-sys/commit/8827cadbe2b560233909212527c291827fb34512> (web)

## Sources

- CVE List: [CVE-2026-85091](https://www.cve.org/CVERecord?id=CVE-2026-85091), CVE Terms of Use, modified 2026-11-13
- RustSec Advisory Database: [RUSTSEC-2026-0544](https://rustsec.org/advisories/RUSTSEC-2026-0544.html), CC0-1.0, modified 2026-11-17
- NVD: [CVE-2026-85091](https://nvd.nist.gov/vuln/detail/CVE-2026-85091), Public domain, modified 2026-11-13

---

Page: https://cve.day/CVE-2026-85091 · Whole record: https://cve.day/CVE-2026-85091.json · Rebuilt by cve.day 2026-11-25T22:59:36.173Z
