JLSEC-2026-1997: zlib 1.2.11 through 1.3.2 gzip-writing 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.
zlib 1.4 includes the fix.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
julia/Zlib_jllto a version that resolves this vulnerability.Fixed in 1.4.0+0 - Upgrade
Upgrade
zlibto a version that resolves this vulnerability.Fixed in 1.4 - Compensating control
For zlib versions before 1.3.1.2, call gzclearerr() after a failed write() before making a later gz* write call.
Event History
Child vulnerabilities
Contains the following vulnerabilities.
Frequently Asked Questions
Which listed software packages should be reviewed for exposure?
Review julia/gccbootstrap_jLL and julia/zlib_jll deployments that include zlib versions 1.2.11 through 1.3.2.
What conditions are required to reach the overflow?
An underlying write() must first fail during gz_write(), followed by a later gz* write call. EPIPE on a blocking descriptor is one example of a write failure that can reach the issue.
Are additional calls required on older affected releases?
For versions before 1.3.1.2, the failed write must be followed by a gzclearerr() call before the condition can be triggered.
What version contains the fix?
The fix is included in zlib 1.4.