# CVE-2022-1271

- Priority: **Routine**
- Reason: Not severe (CVSS 8.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-08-31 · Modified: 2026-10-14
- Aliases: ALPINE-CVE-2022-1271, MGASA-2022-0149, SUSE-SU-2022:1158-1, SUSE-SU-2022:1160-1, SUSE-SU-2022:1250-1, SUSE-SU-2022:1272-1, SUSE-SU-2022:1275-1, SUSE-SU-2022:14938-1, SUSE-SU-2022:1617-1, SUSE-SU-2022:1650-1, SUSE-SU-2022:1673-1, SUSE-SU-2022:1674-1, RHSA-2022:1537, RHSA-2022:1592, RHSA-2022:1665, RHSA-2022:1676, RHSA-2022:2191, RHSA-2022:4582, RHSA-2022:4940, RHSA-2022:4991, RHSA-2022:4992, RHSA-2022:4993, RHSA-2022:4994, RHSA-2022:5052, UBUNTU-CVE-2022-1271, USN-5378-1, USN-5378-2, USN-5378-3, USN-5378-4, DEBIAN-CVE-2022-1271, DLA-2976-1, DLA-2977-1, DSA-5122-1, DSA-5123-1, openSUSE-SU-2024:11987-1, openSUSE-SU-2024:11992-1, openSUSE-SU-2024:12271-1
- Record: https://cvemate.com/vulnerability/CVE-2022-1271 · JSON: https://cvemate.com/vulnerability/CVE-2022-1271/json

## Description

```text
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.
```

## Signals

- CVSS: 8.8 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 5.868%, percentile 93.402%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 108)

- alpine gzip (Alpine Linux): \< 1.12-r0
- alpine xz (Alpine Linux): \< 5.2.5-r1
- debian gzip (Debian): \< 1.6-5+deb9u1 \| \< 1.9-3+deb10u1 \| \< 1.10-4+deb11u1 \| \< 1.12-1
- debian xz-utils (Debian): \< 5.2.2-1.2+deb9u1 \| \< 5.2.4-1+deb10u1 \| \< 5.2.5-2.1~deb11u1 \| \< 5.2.5-2.1
- ubuntu gzip (Ubuntu): \< 1.6-3ubuntu1+esm1 \| \< 1.6-4ubuntu1+esm1 \| \< 1.6-5ubuntu1.2 \| \< 1.10-0ubuntu4.1 \| \< 1.10-4ubuntu4
- ubuntu xz-utils (Ubuntu): \< 5.1.1alpha+20120614-2ubuntu2.14.04.1+esm1 \| \< 5.1.1alpha+20120614-2ubuntu2.16.04.1+esm1 \| \< 5.2.2-1.3ubuntu0.1 \| \< 5.2.4-1ubuntu1.1 \| \< 5.2.5-2ubuntu1
- debian debian\_linux: 10.0
- gnu gzip: \< 1.12
- mageia gzip (Mageia): \< 1.10-4.1.mga8
- mageia xz (Mageia): \< 5.2.5-2.1.mga8
- redhat jboss\_data\_grid: 7.0.0
- opensuse apparmor&distro=openSUSE Tumbleweed (openSUSE): \< 3.0.4-4.1
- opensuse gzip&distro=openSUSE Leap 15.3 (openSUSE): \< 1.10-150200.10.1
- opensuse gzip&distro=openSUSE Leap 15.4 (openSUSE): \< 1.10-150200.10.1
- opensuse gzip&distro=openSUSE Tumbleweed (openSUSE): \< 1.12-1.1
- opensuse xz&distro=openSUSE Leap 15.3 (openSUSE): \< 5.2.3-150000.4.7.1
- opensuse xz&distro=openSUSE Tumbleweed (openSUSE): \< 5.2.6-1.1
- redhat gzip (Red Hat): \< 0:1.9-13.el8\_5 \| \< 0:1.9-10.el8\_1 \| \< 0:1.9-10.el8\_2 \| \< 0:1.9-13.el8\_4 \| \< 0:1.5-11.el7\_9 \| \< 0:1.10-9.el9\_0
- redhat gzip-debuginfo (Red Hat): \< 0:1.9-13.el8\_5 \| \< 0:1.9-10.el8\_1 \| \< 0:1.9-10.el8\_2 \| \< 0:1.9-13.el8\_4 \| \< 0:1.5-11.el7\_9 \| \< 0:1.10-9.el9\_0
- redhat gzip-debugsource (Red Hat): \< 0:1.9-13.el8\_5 \| \< 0:1.9-10.el8\_1 \| \< 0:1.9-10.el8\_2 \| \< 0:1.9-13.el8\_4 \| \< 0:1.10-9.el9\_0

## References (first 20 of 66)

- <https://bugzilla.redhat.com/show_bug.cgi?id=2073310>
- <https://www.openwall.com/lists/oss-security/2022/04/07/8>
- <https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html>
- <https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch>
- <https://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6>
- <https://security-tracker.debian.org/tracker/CVE-2022-1271>
- <https://access.redhat.com/security/cve/CVE-2022-1271>
- <https://security.gentoo.org/glsa/202209-01>
- <https://security.netapp.com/advisory/ntap-20220930-0006/>
- <https://security.alpinelinux.org/vuln/CVE-2022-1271>
- <https://advisories.mageia.org/MGASA-2022-0149.html>
- <https://bugs.mageia.org/show_bug.cgi?id=30261>
- <https://www.openwall.com/lists/oss-security/2022/04/08/3>
- <https://www.debian.org/lts/security/2022/dla-2976>
- <https://www.debian.org/lts/security/2022/dla-2977>
- <https://ubuntu.com/security/notices/USN-5378-1>
- <https://ubuntu.com/security/notices/USN-5378-2>
- <https://www.debian.org/security/2022/dsa-5122>
- <https://www.debian.org/security/2022/dsa-5123>
- <https://www.suse.com/support/update/announcement/2022/suse-su-20221158-1/>

---

Data as of 2026-12-05T03:12:10.309Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
