Improper input validation in GNU Gzip

CVE-2022-1271

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.

EPSS: 0.050 (91.7th percentile) — read the EPSS interpretation.

CVSS v3 metric

CVSS v3 base score 8.8 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H.

Affected products

Weakness classification (CWE)

Public proof-of-concept exploits

References

Frequently asked questions

What is CVE-2022-1271?
CVE-2022-1271 is a high-severity vulnerability in GNU Gzip, classified under CWE-179. CVSS score: 8.8/10. Published 2022-08-31.
How severe is CVE-2022-1271?
High severity. CVSS v3 base score is 8.8 out of 10.
Is CVE-2022-1271 known to be exploited?
8 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.