CVE-2022-1271: gzip, xz-utils · - Incorrect Behavior Order: Early Validation, CWE-1173 Improper Use of Validation Framework
Affects gzip, xz-utilsSource CVE Database V5
Not known to be exploited · CVSS 8.8 High : upgrade to 1.12 soon.
Data as of 25 Oct 2026, 19:02 UTC
- EPSS
- 5.5% chance of exploitation in 30 days – higher than 92% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 1.12
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HExploitation evidence
Disclosed: evidence found.
CVE published 31 Aug 2022
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.
What to do
Upgrade gzip and xz-utils to 1.12.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
Debiangzippkg:deb/gzipOther threats | Affected
| Fixed in
|
Debianxz-utilspkg:deb/xz-utilsOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
European organizations should prioritize upgrading gzip to version 1.12 or later, where this vulnerability is patched. For environments where immediate upgrade is not feasible, organizations should implement strict input validation and sanitization controls on any filenames or inputs processed by zgrep or related utilities, especially those originating from untrusted sources. Restricting access to systems running vulnerable versions of gzip and xz-utils to trusted users and networks can reduce exposure. Monitoring and logging usage of zgrep with unusual or suspicious filename patterns containing newline characters can help detect attempted exploitation. Additionally, employing application whitelisting and integrity monitoring on critical files can alert administrators to unauthorized modifications. Organizations should also review and harden their file system permissions to minimize the impact of arbitrary file writes. Finally, incorporating this vulnerability into vulnerability management and incident response plans will ensure timely detection and remediation.
Description
An arbitrary file write vulnerability was found in GNU gzip's zgrep utility. When zgrep is applied on the attacker's chosen file name (for example, a crafted file name), this can overwrite an attacker's content to an arbitrary attacker-selected file. This flaw occurs due to insufficient validation when processing filenames with two or more newlines where selected content and the target file names are embedded in crafted multi-line file names. This flaw allows a remote, low privileged attacker to force zgrep to write arbitrary files on the system.
References
- bugzilla.redhat.com/show_bug.cgi?id=2073310 (opens in a new tab)
- openwall.com/lists/oss-security/2022/04/07/8 (opens in a new tab)
- lists.gnu.org/r/bug-gzip/2022-04/msg00011.html (opens in a new tab)
- tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch (opens in a new tab)
- git.tukaani.org (opens in a new tab)
- security-tracker.debian.org/tracker/CVE-2022-1271 (opens in a new tab)
- access.redhat.com/security/cve/CVE-2022-1271 (opens in a new tab)
- security.gentoo.org/glsa/202209-01 (opens in a new tab)
- security.netapp.com/advisory/ntap-20220930-0006/ (opens in a new tab)