VDB

CVE-2022-1271

CVE-2022-1271 PUBLISHED CVSS 8.8 HIGH

Reported by redhat · Published August 31, 2022

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
xz-lzma-compatAmazon Linux5.2.5-9.amzn2023.0.2, 5.2.2-1.amzn2.0.3
xzAmazon Linux5.2.5-9.amzn2023.0.2, 5.2.2-1.amzn2.0.3
xz-libsAmazon Linux5.2.2-1.amzn2.0.3
gzipAlpine1.12-r0
xz-staticAmazon Linux5.2.5-9.amzn2023.0.2
gzipgnu1.12

Risk scores

CVSS 3.1
8.8
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected products

VendorProductVersions
n/agzip, xz-utilsFixed in gzip 1.12
amazon:2023xz-lzma-compat0
amazon:2023xz0
amazon:2xz-libs0
amazon:2xz0
alpinegzip0
amazon:2023xz-static0
amazon:2xz-lzma-compat0
n/agzip, xz-utils1.12
archxz0
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP3.1.0
amazon:2xz-compat-libs0
SiemensSIPLUS S7-1500 CPU 1518-4 PN/DP MFP3.1.0
amazon:2023xz-devel0
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP3.1.0
amazon:2gzip0
alpinexz0
amazon:2023gzip0
SiemensRUGGEDCOM APE18080
archgzip0

…and 2 more

Timeline

  • Apr 7, 2022 CVE Published
  • Sep 1, 2022 EPSS Score (30 in total, the first dated here)
  • Apr 3, 2025 PoC Published (2 in total, the first dated here)
  • Jun 2, 2026 Security Advisory (95 in total, the first dated here)
  • Jul 11, 2026 Coalition ESS Score
  • Nov 21, 2026 Distribution Patch (92 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-1271
vulnetix vdb fixes CVE-2022-1271

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-1271/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›