CVEfocus › CVE database › CVE-2022-1271

CVE-2022-1271

CVSS 8.8 HighEPSS 5.9% (higher than 93% of CVEs)Published 2022-08-31Updated 2026-10-14Assigner: redhat

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.

CWE-179

What to do

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

69Fixed
4Fix pending
5Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04gzipFixed1.10-4ubuntu4UBUNTU-CVE-2022-1271
Ubuntu 22.04xz-utilsFixed5.2.5-2ubuntu1UBUNTU-CVE-2022-1271
Ubuntu 20.04gzipFixed1.10-0ubuntu4.1UBUNTU-CVE-2022-1271
Ubuntu 20.04xz-utilsFixed5.2.4-1ubuntu1.1UBUNTU-CVE-2022-1271
Ubuntu 18.04gzipFixed1.6-5ubuntu1.2UBUNTU-CVE-2022-1271
Ubuntu 18.04xz-utilsFixed5.2.2-1.3ubuntu0.1UBUNTU-CVE-2022-1271
Ubuntu 16.04gzipFix pending1.6-4ubuntu1+esm1 (Ubuntu Pro)UBUNTU-CVE-2022-1271
Ubuntu 16.04xz-utilsFix pending5.1.1alpha+20120614-2ubuntu2.16.04.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2022-1271
Ubuntu 14.04gzipFix pending1.6-3ubuntu1+esm1 (Ubuntu Pro)UBUNTU-CVE-2022-1271
Ubuntu 14.04xz-utilsFix pending5.1.1alpha+20120614-2ubuntu2.14.04.1+esm1 (Ubuntu Pro)UBUNTU-CVE-2022-1271
Debian 14gzipFixed1.12-1DEBIAN-CVE-2022-1271
Debian 14xz-utilsFixed5.2.5-2.1DEBIAN-CVE-2022-1271
Debian 13gzipFixed1.12-1DEBIAN-CVE-2022-1271
Debian 13xz-utilsFixed5.2.5-2.1DEBIAN-CVE-2022-1271
Debian 12gzipFixed1.12-1DEBIAN-CVE-2022-1271
Debian 12xz-utilsFixed5.2.5-2.1DEBIAN-CVE-2022-1271
Red Hat Enterprise Linux 9gzipFixed0:1.10-9.el9_0RHSA-2022:4582
Red Hat Enterprise Linux 9xzFixed0:5.2.5-8.el9_0RHSA-2022:4940
Red Hat Enterprise Linux 9xz-develFixed0:5.2.5-8.el9_0RHSA-2022:4940
Red Hat Enterprise Linux 9xz-libsFixed0:5.2.5-8.el9_0RHSA-2022:4940
Red Hat Enterprise Linux 9xz-lzma-compatFixed0:5.2.5-8.el9_0RHSA-2022:4940
Red Hat Enterprise Linux 8gzipFixed0:1.9-13.el8_5RHSA-2022:1537
Red Hat Enterprise Linux 8xzFixed0:5.2.4-4.el8_6RHSA-2022:4991
Red Hat Enterprise Linux 8xz-develFixed0:5.2.4-4.el8_6RHSA-2022:4991
Red Hat Enterprise Linux 8xz-libsFixed0:5.2.4-4.el8_6RHSA-2022:4991
Red Hat Enterprise Linux 8xz-lzma-compatFixed0:5.2.4-4.el8_6RHSA-2022:4991
Red Hat Enterprise Linux 7gzipFixed0:1.5-11.el7_9RHSA-2022:2191
Red Hat Enterprise Linux 7redhat-virtualization-hostFixed0:4.3.23-20220622.0.el7_9RHSA-2022:5439
Red Hat Enterprise Linux 7redhat-virtualization-host-image-updateFixed0:4.3.23-20220622.0.el7_9RHSA-2022:5439
Red Hat Enterprise Linux 7xzFixed0:5.2.2-2.el7_9RHSA-2022:5052
Red Hat Enterprise Linux 7xz-compat-libsFixed0:5.2.2-2.el7_9RHSA-2022:5052
Red Hat Enterprise Linux 7xz-develFixed0:5.2.2-2.el7_9RHSA-2022:5052
Red Hat Enterprise Linux 7xz-libsFixed0:5.2.2-2.el7_9RHSA-2022:5052
Red Hat Enterprise Linux 7xz-lzma-compatFixed0:5.2.2-2.el7_9RHSA-2022:5052
Red Hat Enterprise Linux 6gzipWill not fix
Out of support scope
Red Hat Enterprise Linux 6xzWill not fix
Out of support scope
Red Hat Enterprise Linux 6xz-develWill not fix
Out of support scope
Red Hat Enterprise Linux 6xz-libsWill not fix
Out of support scope
Red Hat Enterprise Linux 6xz-lzma-compatWill not fix
Out of support scope
AlmaLinux 9xzFixed5.2.5-8.el9_0ALSA-2022:4940
AlmaLinux 9xz-develFixed5.2.5-8.el9_0ALSA-2022:4940
AlmaLinux 9xz-libsFixed5.2.5-8.el9_0ALSA-2022:4940
AlmaLinux 9xz-lzma-compatFixed5.2.5-8.el9_0ALSA-2022:4940
AlmaLinux 8gzipFixed1.9-13.el8_5ALSA-2022:1537
AlmaLinux 8xzFixed5.2.4-4.el8_6ALSA-2022:4991
AlmaLinux 8xz-develFixed5.2.4-4.el8_6ALSA-2022:4991
AlmaLinux 8xz-libsFixed5.2.4-4.el8_6ALSA-2022:4991
AlmaLinux 8xz-lzma-compatFixed5.2.4-4.el8_6ALSA-2022:4991
Rocky Linux 9gzipFixed0:1.10-9.el9_0RLSA-2022:4582
Rocky Linux 9xzFixed0:5.2.5-8.el9_0RLSA-2022:4940
Rocky Linux 8gzipFixed0:1.9-13.el8_5RLSA-2022:1537
Rocky Linux 8xzFixed0:5.2.4-4.el8_6RLSA-2022:4991
Alpine Linux 3.24gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.24xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.23gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.23xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.22gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.22xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.21gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.21xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.20gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.20xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.19gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.19xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.18gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.18xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.17gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.17xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.16gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.16xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.15gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.15xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.14gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.14xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.13gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.13xzFixed5.2.5-r1ALPINE-CVE-2022-1271
Alpine Linux 3.12gzipFixed1.12-r0ALPINE-CVE-2022-1271
Alpine Linux 3.12xzFixed5.2.5-r1ALPINE-CVE-2022-1271

What the vendor says

As published in the CVE record by redhat, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.