Vulnerability · Published Aug 31, 2022 · Assigned by redhat

CVE-2022-1271

High 8.8

In plain English

A high-severity security flaw in gzip, xz-utils. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 5.5% (higher than 93% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.8High
Exploit odds (30 days)5.5%top 7.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8gzip1.9-13.el8_5ALSA-2022:1537
AlmaLinux:8xz5.2.4-4.el8_6ALSA-2022:4991
AlmaLinux:9xz5.2.5-8.el9_0ALSA-2022:4940
AlmaLinux:8xz-devel5.2.4-4.el8_6ALSA-2022:4991
AlmaLinux:9xz-devel5.2.5-8.el9_0ALSA-2022:4940
AlmaLinux:8xz-libs5.2.4-4.el8_6ALSA-2022:4991
AlmaLinux:9xz-libs5.2.5-8.el9_0ALSA-2022:4940
AlmaLinux:8xz-lzma-compat5.2.4-4.el8_6ALSA-2022:4991
AlmaLinux:9xz-lzma-compat5.2.5-8.el9_0ALSA-2022:4940
Alpine:v3.20gzip1.12-r0ALPINE-CVE-2022-1271
Alpine:v3.21gzip1.12-r0ALPINE-CVE-2022-1271
Alpine:v3.22gzip1.12-r0ALPINE-CVE-2022-1271
Alpine:v3.23gzip1.12-r0ALPINE-CVE-2022-1271
Alpine:v3.24gzip1.12-r0ALPINE-CVE-2022-1271
Alpine:v3.20xz5.2.5-r1ALPINE-CVE-2022-1271
Alpine:v3.21xz5.2.5-r1ALPINE-CVE-2022-1271
Alpine:v3.22xz5.2.5-r1ALPINE-CVE-2022-1271
Alpine:v3.23xz5.2.5-r1ALPINE-CVE-2022-1271
Alpine:v3.24xz5.2.5-r1ALPINE-CVE-2022-1271
Debian:12gzip1.12-1DEBIAN-CVE-2022-1271
Debian:13gzip1.12-1DEBIAN-CVE-2022-1271
Debian:14gzip1.12-1DEBIAN-CVE-2022-1271
Debian:12xz-utils5.2.5-2.1DEBIAN-CVE-2022-1271
Debian:13xz-utils5.2.5-2.1DEBIAN-CVE-2022-1271
Debian:14xz-utils5.2.5-2.1DEBIAN-CVE-2022-1271
Rocky Linux:8gzip0:1.9-13.el8_5RLSA-2022:1537
Rocky Linux:9gzip0:1.10-9.el9_0RLSA-2022:4582
Rocky Linux:8xz0:5.2.4-4.el8_6RLSA-2022:4991
Rocky Linux:9xz0:5.2.5-8.el9_0RLSA-2022:4940
Ubuntu:22.04:LTSgzip1.10-4ubuntu4UBUNTU-CVE-2022-1271
Ubuntu:22.04:LTSxz-utils5.2.5-2ubuntu1UBUNTU-CVE-2022-1271

Affected products (as reported)

VendorProductVersions
n/a gzip, xz-utils Fixed in gzip 1.12

Weakness: CWE-179 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References