Critical Buffer Overflow Vulnerability in zlib untgz Utility
Vulnerability Disclosure · 2 sources · Updated 5mo ago · First seen Jan 12, 2026

A critical global buffer overflow vulnerability has been identified in the zlib untgz utility, specifically affecting version 1.3.1.2. The flaw resides in the TGZfname() function, where an unbounded strcpy() operation copies user-supplied archive names from command-line arguments into a fixed-size global buffer of 1,024 bytes without proper length validation. Security researchers demonstrated that supplying an archive name exceeding this limit can trigger an out-of-bounds write, leading to memory corruption, denial-of-service, or potentially arbitrary code execution, depending on system configuration and compiler settings.
The vulnerability, tracked as CVE-2026-22184 with a CVSS score of 9.3, is trivially exploitable via command-line input and does not require any archive parsing or validation to trigger. Successful exploitation was confirmed using AddressSanitizer, which detected a global buffer overflow when the utility was invoked with a 4,096-byte filename. The issue is classified under CWE-120 (Buffer Copy without Checking Size of Input) and poses significant risk to systems utilizing the affected version of the untgz utility for archive extraction or processing.


