Executive brief
A vulnerability exists in a demonstration utility included with the zlib compression library. While the core library used by most applications is unaffected, the 'untgz' tool can be crashed or potentially manipulated if it is given an extremely long file name. This could lead to a service disruption or unauthorized system access if the utility is used in an automated environment.
Technical details
A global buffer overflow exists in the TGZfname() function of the zlib 'untgz' utility, located in the contrib directory. The flaw is caused by an unbounded strcpy() call that copies a user-supplied archive name from the command line into a fixed-size 1024-byte static global buffer without length validation. An attacker can exploit this by providing a filename argument exceeding 1024 bytes, leading to an out-of-bounds write. This can result in memory corruption of adjacent global objects, denial of service, or potential arbitrary code execution. The vulnerability was addressed in zlib version 1.3.2 by removing the untgz utility from the contrib directory.
Affected products
- zlib zlib up to and including 1.3.1.2
- Red Hat Logging Subsystem for Red Hat OpenShift 5
- Red Hat Red Hat Enterprise Linux 10 10
- Red Hat Red Hat Enterprise Linux 8 8
- Red Hat Red Hat Enterprise Linux 9 9
Timeline
- 2025-12-29: disclosed: Initial disclosure on Full Disclosure mailing list
- 2026-01-07: advisory: NVD and VulnCheck advisories published
- 2026-02-17: patched: zlib version 1.3.2 released removing the affected utility
References
- https://github.com/madler/zlib
- https://seclists.org/fulldisclosure/2026/Jan/3
- https://www.vulncheck.com/advisories/zlib-untgz-global-buffer-overflow-in-tgzfname
- https://zlib.net/
- https://github.com/madler/zlib/issues/1142
- https://access.redhat.com/security/cve/CVE-2026-22184
- https://bugzilla.redhat.com/show_bug.cgi?id=2427688