Skip to content
OpenAdvisories
High · 8.8 CVE-2022-1271 EUVD-2022-24604GHSA-jrpw-543v-8r62

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 …

Published Aug 31, 2022 · Updated Oct 14, 2026 · Assigned by redhat

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.

Affected products

VendorProductAffectedFixed
— gzip, xz-utils Fixed in gzip 1.12 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 gzip 1.12-1 —
Debian 14 xz-utils 5.2.5-2.1 —
Debian 13 gzip 1.12-1 —
Debian 13 xz-utils 5.2.5-2.1 —
Debian 12 gzip 1.12-1 —
Debian 12 xz-utils 5.2.5-2.1 —
Debian 11 gzip 1.10-4+deb11u1 DSA-5122-1
Debian 11 xz-utils 5.2.5-2.1~deb11u1 DSA-5123-1
Debian 10 gzip 1.9-3+deb10u1 DSA-5122-1
Debian 10 xz-utils 5.2.4-1+deb10u1 DSA-5123-1
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Debian 9 gzip 1.6-5+deb9u1 DLA-2976-1
Debian 9 xz-utils 5.2.2-1.2+deb9u1 DLA-2977-1
ReleasePackageFixed inAdvisory
Ubuntu 22.04 LTS gzip 1.10-4ubuntu4 —
Ubuntu 22.04 LTS xz-utils 5.2.5-2ubuntu1 —
Ubuntu 20.04 LTS gzip 1.10-0ubuntu4.1 USN-5378-1
Ubuntu 20.04 LTS xz-utils 5.2.4-1ubuntu1.1 USN-5378-2
Ubuntu 18.04 LTS gzip 1.6-5ubuntu1.2 USN-5378-1
Ubuntu 18.04 LTS xz-utils 5.2.2-1.3ubuntu0.1 USN-5378-2
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 16.04 LTS gzip 1.6-4ubuntu1+esm1 USN-5378-4
Ubuntu Pro 16.04 LTS xz-utils 5.1.1alpha+20120614-2ubuntu2.16.04.1+esm1 USN-5378-3
Ubuntu Pro 14.04 LTS gzip 1.6-3ubuntu1+esm1 USN-5378-4
Ubuntu Pro 14.04 LTS xz-utils 5.1.1alpha+20120614-2ubuntu2.14.04.1+esm1 USN-5378-3
ReleasePackageFixed inAdvisory
RHEL 9 gzip 1.10-9.el9_0 RHSA-2022:4582
RHEL 9 xz +3 5.2.5-8.el9_0 RHSA-2022:4940
RHEL 8 gzip 1.9-13.el8_5 RHSA-2022:1537
RHEL 8 xz +3 5.2.4-4.el8_6 RHSA-2022:4991
RHEL 7 gzip 1.5-11.el7_9 RHSA-2022:2191
RHEL 7 redhat-virtualization-host +1 4.3.23-20220622.0.el7_9 RHSA-2022:5439
RHEL 7 xz +4 5.2.2-2.el7_9 RHSA-2022:5052
Show 4 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Red Hat Rhev Hypervisor 4 redhat-virtualization-host +1 4.5.0-202205291010_8.6 RHSA-2022:4896
RHEL 8.4 EUS gzip 1.9-13.el8_4 RHSA-2022:1676
RHEL 8.4 EUS xz +3 5.2.4-4.el8_4 RHSA-2022:4993
RHEL 8.2 EUS gzip 1.9-10.el8_2 RHSA-2022:1665
RHEL 8.2 EUS xz +3 5.2.4-4.el8_2 RHSA-2022:4992
RHEL 8.1 E4S gzip 1.9-10.el8_1 RHSA-2022:1592
RHEL 8.1 E4S xz +2 5.2.4-4.el8_1 RHSA-2022:4994

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 9 xz +3 5.2.5-8.el9_0 ALSA-2022:4940
AlmaLinux 8 gzip 1.9-13.el8_5 ALSA-2022:1537
AlmaLinux 8 xz +3 5.2.4-4.el8_6 ALSA-2022:4991

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 9 gzip 1.10-9.el9_0 RLSA-2022:4582
Rocky Linux 9 xz 5.2.5-8.el9_0 RLSA-2022:4940
Rocky Linux 8 gzip 1.9-13.el8_5 RLSA-2022:1537
Rocky Linux 8 xz 5.2.4-4.el8_6 RLSA-2022:4991
ReleasePackageFixed inAdvisory
SLES 15 SP4 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SLES 15 SP3 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SLES 15 SP3 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLES 15 SP2 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SLES 15 SP2 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLES 15 SP1 gzip 1.10-150000.4.12.1 SUSE-SU-2022:1674-1, SUSE-SU-2022:1250-1
SLES 15 SP1 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLES 15 gzip 1.10-150000.4.12.1 SUSE-SU-2022:1674-1, SUSE-SU-2022:1250-1
SLES 15 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
Show 29 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES 12 SP5 gzip 1.10-4.11.3 SUSE-SU-2022:1650-1, SUSE-SU-2022:1272-1
SLES 12 SP5 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SLES 12 SP4 gzip 1.6-9.6.2 SUSE-SU-2022:1673-1, SUSE-SU-2022:1275-1
SLES 12 SP4 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SLES 12 SP3 gzip 1.6-9.6.2 SUSE-SU-2022:1673-1, SUSE-SU-2022:1275-1
SLES 12 SP3 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SLES 12 SP2 gzip 1.6-9.6.2 SUSE-SU-2022:1673-1, SUSE-SU-2022:1275-1
SLES 12 SP2 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SLES 11 SP4 xz 5.0.3-0.12.7.1 SUSE-SU-2022:14938-1
SLES for SAP 15 SP2 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SLES for SAP 15 SP2 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLES for SAP 15 SP1 gzip 1.10-150000.4.12.1 SUSE-SU-2022:1674-1, SUSE-SU-2022:1250-1
SLES for SAP 15 SP1 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLES for SAP 15 gzip 1.10-150000.4.12.1 SUSE-SU-2022:1674-1, SUSE-SU-2022:1250-1
SLES for SAP 15 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLES for SAP 12 SP5 gzip 1.10-4.11.3 SUSE-SU-2022:1650-1, SUSE-SU-2022:1272-1
SLES for SAP 12 SP5 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SLES for SAP 12 SP4 gzip 1.6-9.6.2 SUSE-SU-2022:1673-1, SUSE-SU-2022:1275-1
SLES for SAP 12 SP4 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SLES for SAP 12 SP3 gzip 1.6-9.6.2 SUSE-SU-2022:1673-1, SUSE-SU-2022:1275-1
SLES for SAP 12 SP3 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SLE Real Time 15 SP2 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SLE Real Time 15 SP2 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLE Micro 5.2 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SLE Micro 5.2 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLE Micro 5.1 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SLE Micro 5.1 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLE Micro 5.0 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SLE Micro 5.0 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLE HPC 15 SP2 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SLE HPC 15 SP2 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLE HPC 15 SP1 gzip 1.10-150000.4.12.1 SUSE-SU-2022:1674-1, SUSE-SU-2022:1250-1
SLE HPC 15 SP1 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SLE HPC 15 gzip 1.10-150000.4.12.1 SUSE-SU-2022:1674-1, SUSE-SU-2022:1250-1
SLE HPC 15 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SUSE OpenStack Cloud Crowbar 9 gzip 1.6-9.6.2 SUSE-SU-2022:1673-1, SUSE-SU-2022:1275-1
SUSE OpenStack Cloud Crowbar 9 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SUSE OpenStack Cloud Crowbar 8 gzip 1.6-9.6.2 SUSE-SU-2022:1673-1, SUSE-SU-2022:1275-1
SUSE OpenStack Cloud Crowbar 8 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SUSE OpenStack Cloud 9 gzip 1.6-9.6.2 SUSE-SU-2022:1673-1, SUSE-SU-2022:1275-1
SUSE OpenStack Cloud 9 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SUSE OpenStack Cloud 8 gzip 1.6-9.6.2 SUSE-SU-2022:1673-1, SUSE-SU-2022:1275-1
SUSE OpenStack Cloud 8 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SUSE Manager Server 4.1 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SUSE Manager Server 4.1 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SUSE Manager Retail Branch Server 4.1 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SUSE Manager Retail Branch Server 4.1 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SUSE Manager Proxy 4.1 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SUSE Manager Proxy 4.1 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SUSE Linux Enterprise Point of Sale 11 SP3 xz 5.0.3-0.12.7.1 SUSE-SU-2022:14938-1
SUSE HPE Helion OpenStack 8 gzip 1.6-9.6.2 SUSE-SU-2022:1673-1, SUSE-SU-2022:1275-1
SUSE HPE Helion OpenStack 8 xz 5.0.5-6.7.1 SUSE-SU-2022:1160-1
SUSE Enterprise Storage 7 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
SUSE Enterprise Storage 7 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
SUSE Enterprise Storage 6 gzip 1.10-150000.4.12.1 SUSE-SU-2022:1674-1, SUSE-SU-2022:1250-1
SUSE Enterprise Storage 6 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed apparmor 3.0.4-4.1 openSUSE-SU-2024:11987-1
openSUSE Tumbleweed gzip 1.12-1.1 openSUSE-SU-2024:11992-1
openSUSE Tumbleweed xz 5.2.6-1.1 openSUSE-SU-2024:12271-1
openSUSE Leap 15.4 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
openSUSE Leap 15.3 gzip 1.10-150200.10.1 SUSE-SU-2022:1617-1
openSUSE Leap 15.3 xz 5.2.3-150000.4.7.1 SUSE-SU-2022:1158-1
ReleasePackageFixed inAdvisory
Alpine v3.24 gzip 1.12-r0 —
Alpine v3.24 xz 5.2.5-r1 —
Alpine v3.23 gzip 1.12-r0 —
Alpine v3.23 xz 5.2.5-r1 —
Alpine v3.22 gzip 1.12-r0 —
Alpine v3.22 xz 5.2.5-r1 —
Alpine v3.21 gzip 1.12-r0 —
Alpine v3.21 xz 5.2.5-r1 —
Alpine v3.20 gzip 1.12-r0 —
Alpine v3.20 xz 5.2.5-r1 —
Show 8 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 gzip 1.12-r0 —
Alpine v3.19 xz 5.2.5-r1 —
Alpine v3.18 gzip 1.12-r0 —
Alpine v3.18 xz 5.2.5-r1 —
Alpine v3.17 gzip 1.12-r0 —
Alpine v3.17 xz 5.2.5-r1 —
Alpine v3.16 gzip 1.12-r0 —
Alpine v3.16 xz 5.2.5-r1 —
Alpine v3.15 gzip 1.12-r0 —
Alpine v3.15 xz 5.2.5-r1 —
Alpine v3.14 gzip 1.12-r0 —
Alpine v3.14 xz 5.2.5-r1 —
Alpine v3.13 gzip 1.12-r0 —
Alpine v3.13 xz 5.2.5-r1 —
Alpine v3.12 gzip 1.12-r0 —
Alpine v3.12 xz 5.2.5-r1 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 gzip 1.10-5.amzn2023.0.2 ALAS2023-2023-043
Amazon Linux 2023 xz +4 5.2.5-9.amzn2023.0.2 ALAS2023-2023-042
Amazon Linux 2 gzip 1.5-10.amzn2.0.1 ALAS2-2022-1782
Amazon Linux 2 xz +4 5.2.2-1.amzn2.0.3 ALAS2-2022-1782

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 2 (CBL-Mariner) gzip 1.12-1 —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 9 gzip 1.10-9.el9_0 ELSA-2022-4582
Oracle Linux 9 xz +3 5.2.5-8.el9_0 ELSA-2022-4940
Oracle Linux 8 gzip 1.9-13.el8_5 ELSA-2022-1537
Oracle Linux 8 xz +3 5.2.4-4.el8_6 ELSA-2022-4991
Oracle Linux 7 gzip 1.5-11.el7_9 ELSA-2022-2191
Oracle Linux 7 xz +4 5.2.2-2.el7_9 ELSA-2022-5052

Advisories 50

References