{"id":"CVE-2026-76844","summary":"zlib 1.2.11 through 1.3.2 Heap Buffer Overflow via Stale gzwrite Pointer After Failed Write","details":"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.","aliases":["GHSA-g84c-rxfj-3j2c"],"modified":"2026-10-22T16:40:36.039638232Z","published":"2026-08-24T13:12:01.148Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/76xxx/CVE-2026-76844.json","cna_assigner":"VulnCheck","cwe_ids":["CWE-787"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/76xxx/CVE-2026-76844.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-76844"},{"type":"ADVISORY","url":"https://www.vulncheck.com/advisories/zlib-1.3.1.2-through-1.3.2-heap-buffer-overflow-via-gz-vacate"},{"type":"FIX","url":"https://github.com/madler/zlib/commit/df84af25dc1942490e1d1c899a07619152a46148"},{"type":"PACKAGE","url":"https://github.com/madler/zlib"},{"type":"ARTICLE","url":"https://github.com/madler/zlib/blob/v1.3.2/gzwrite.c#L393"},{"type":"EVIDENCE","url":"https://gist.github.com/thesmartshadow/e0b9481792afb7c31e86fee1ff084490"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/madler/zlib","events":[{"introduced":"cacf7f1d4e3d44d871b605da3b647f07d718623f"},{"fixed":"df84af25dc1942490e1d1c899a07619152a46148"}],"database_specific":{"extracted_events":[{"strategy":"StandardRange","range":[{"introduced":"1.2.11"},{"last_affected":"1.3.2"}],"source":"AFFECTED_FIELD"},{"source":"REFERENCES_COMMIT","range":[{"fixed":"df84af25dc1942490e1d1c899a07619152a46148"}]}]}}],"versions":["v1.3.2","v1.3.1.2","v1.3.1","v1.3","v1.2.13","v1.2.12","v1.2.11"],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2026-76844.json","vanir_signatures":[{"signature_version":"v1","source":"https://github.com/madler/zlib/commit/df84af25dc1942490e1d1c899a07619152a46148","target":{"file":"gzwrite.c"},"deprecated":false,"digest":{"line_hashes":["321090108084038968139662894088929200997","2390431503662171455844889591158512276","135295985711956928995159240810902034005","87796769545444147572130438046479323601","235441658041769278382234619656069783544"],"threshold":0.9},"id":"CVE-2026-76844-d61a29f0","signature_type":"Line"},{"source":"https://github.com/madler/zlib/commit/df84af25dc1942490e1d1c899a07619152a46148","target":{"function":"gz_write","file":"gzwrite.c"},"deprecated":false,"digest":{"function_hash":"263750299263033607512351826485480615201","length":1343},"id":"CVE-2026-76844-dc9ae361","signature_type":"Function","signature_version":"v1"}],"vanir_signatures_modified":"2026-10-22T16:40:36Z"}}],"schema_version":"1.9.2","severity":[{"type":"CVSS_V4","score":"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"}]}