CVE-2026-85091: libs-sys: heap buffer overflow
zlib 1.2.11 through 1.3.2 contains a heap buffer overflow: after an underlying write() fails, gzwrite() returns without resetting strm.nextin, 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.
Other sources
zlib 1.3.1.2 through 1.3.2 Heap Buffer Overflow via gzvacate
— Microsoft
zlib versions 1.3.1.2 through 1.3.2 contain a heap buffer overflow vulnerability in the gzvacate() function when processing non-blocking gzwrite() operations with stale external buffer pointers. Attackers can trigger the overflow by calling gzprintf() or gzvprintf() after a write stall, causing an unchecked memmove() to write beyond the internal input buffer boundary.
— Ubuntu
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
azurelinux/zlibto a version that resolves this vulnerability.Fixed in 1.3.2-2 - Upgrade
Upgrade
alpine/zlibto a version that resolves this vulnerability.Fixed in 1.3.2-r1 - Upgrade
Upgrade
rust/libz-systo a version that resolves this vulnerability.Fixed in 1.1.33 - Upgrade
Upgrade
ubuntu/zlibto a version that resolves this vulnerability.Fixed in 1:1.3.dfsg-3.1ubuntu2.3 - Upgrade
Upgrade
ubuntu/zlibto a version that resolves this vulnerability.Fixed in 1:1.3.dfsg+really1.3.2-3ubuntu1.1 - Upgrade
Upgrade
ubuntu/zlibto a version that resolves this vulnerability.Fixed in 1:1.3.dfsg+really1.3.1-1ubuntu3.2 - Upgrade
Upgrade
debian/zlibto a version that resolves this vulnerability.Fixed in 1:1.2.13.dfsg-1+deb12u1 - Upgrade
Upgrade
debian/zlibto a version that resolves this vulnerability.Fixed in 1:1.3.dfsg+really1.3.1-1+deb13u1 - Upgrade
Upgrade
debian/zlibto a version that resolves this vulnerability.Fixed in 1:1.3.dfsg+really1.3.2-4 - Upgrade
Upgrade
debian/zlibto a version that resolves this vulnerability.Fixed in 1:1.2.13.dfsg-1+deb12u1Fixed in 1:1.3.dfsg+really1.3.1-1+deb13u1Fixed in 1:1.3.dfsg+really1.3.2-4 - Operational
For zlib versions before 1.3.1.2, call gzclearerr() after a failed write.
Event History
Frequently Asked Questions
Which application workflows are exposed to this issue?
Applications using affected zlib versions are exposed when they perform non-blocking gzwrite() operations, encounter a write stall, and subsequently call gzprintf() or gzvprintf(). The issue involves stale external buffer pointers during that sequence.
Does exploitation require authentication or user interaction?
The supplied severity vector indicates network attackability with no privileges required and no user interaction required. It also rates attack complexity as high.
How can I determine whether my deployment is affected?
Verify whether the deployed zlib version is from 1.3.1.2 through 1.3.2 and whether the application uses the affected non-blocking gzwrite() workflow followed by gzprintf() or gzvprintf() after write stalls.