Vulnerabilities

Vulnerability · CVE-2022-1271

An arbitrary file write vulnerability was found in GNU gzip's zgrep utility.

Published Aug 31, 2022 · catalog updated Oct 14, 2026 · An arbitrary file write

Check if you run it

No confirmed exploitation is on record for CVE-2022-1271. EPSS is 5.21%. Act only if a listed version of An arbitrary file write is installed.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (An arbitrary file write).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
Severity
High8.8
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
5.21%
Remediation
Advisory link
Affected products
cpe debian/debian linux · cpe gnu/gzip · cpe redhat/jboss data grid · cpe tukaani/xz

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.

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • cpe debian/debian linux10.0
  • cpe gnu/gzipversion unspecified
  • cpe redhat/jboss data grid7.0.0
  • cpe tukaani/xzversion unspecified

How to fix CVE-2022-1271

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2022-1271. EPSS is 5.21%. Act only if a listed version of An arbitrary file write is installed.

Which versions are affected?

Compare what you have installed with debian/debian linux 10.0; redhat/jboss data grid 7.0.0. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-179; CWE-20: Improper Input Validation. EPSS 5.21%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

No public source repository is identified for this product.

Timeline

Detection, updates, and resolution for this record.

  1. Aug 31, 2022 · NIST NVD

    Detected

    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

  2. Oct 14, 2026 · NIST NVD

    Updated

    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

Sources

  • CVE.orgVulnerability recordCVE-2022-1271

    Official CVE identifier

    cve.org
  • FIRST EPSSExploitation probabilityCVE-2022-1271

    30-day exploitation probability 5.2%

    first.org
  • NIST NVDVulnerability recordCVE-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 insuf

    nvd.nist.gov

References

Freshness

Last verified in this catalog Oct 16, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.