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.
CVE-2022-1271
Score 8.8 from GitHub Security Advisory (severity: HIGH) published 2022-09-01. NVD baseline CVSS 8.8; sources differ by 0.0.
- High severity, but no confirmed exploitation yet
A fix is available — apply it.
- CVSS v3
- 8.8
- EG Score
- 8.8(medium)
- EPSS
- 90.0%
- KEV
- Not listed
Published
August 31, 2022
Last Modified
June 9, 2025
References (18)
- secalert@redhathttps://access.redhat.com/security/cve/CVE-2022-1271
- secalert@redhathttps://bugzilla.redhat.com/show_bug.cgi?id=2073310
- secalert@redhathttps://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6
- secalert@redhathttps://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html
- secalert@redhathttps://security-tracker.debian.org/tracker/CVE-2022-1271
- secalert@redhathttps://security.gentoo.org/glsa/202209-01
- secalert@redhathttps://security.netapp.com/advisory/ntap-20220930-0006/
- secalert@redhathttps://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch
- secalert@redhathttps://www.openwall.com/lists/oss-security/2022/04/07/8
- af854a3a-2127-422b-91ae-364da2661108https://access.redhat.com/security/cve/CVE-2022-1271
- af854a3a-2127-422b-91ae-364da2661108https://bugzilla.redhat.com/show_bug.cgi?id=2073310
- af854a3a-2127-422b-91ae-364da2661108https://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6
- af854a3a-2127-422b-91ae-364da2661108https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html
- af854a3a-2127-422b-91ae-364da2661108https://security-tracker.debian.org/tracker/CVE-2022-1271
- af854a3a-2127-422b-91ae-364da2661108https://security.gentoo.org/glsa/202209-01
Vendor Advisories for CVE-2022-1271(14)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
- RHSA-2022:5439Red Hat Product SecurityHigh
Red Hat Security Advisory: RHV-H security update (redhat-virtualization-host) 4.3.23
- RHSA-2022:5052Red Hat Product SecurityHigh
Red Hat Security Advisory: xz security update
- RHSA-2022:4993Red Hat Product SecurityHigh
Red Hat Security Advisory: xz security update
- RHSA-2022:4991Red Hat Product SecurityHigh
Red Hat Security Advisory: xz security update
- RHSA-2022:4992Red Hat Product SecurityHigh
Red Hat Security Advisory: xz security update
- RHSA-2022:4994Red Hat Product SecurityHigh
Red Hat Security Advisory: xz security update
- RHSA-2022:4940Red Hat Product SecurityHigh
Red Hat Security Advisory: xz security update
- RHSA-2022:4896Red Hat Product SecurityHigh
Red Hat Security Advisory: Red Hat Virtualization security, bug fix, and enhancement update [ovirt-4.5.0]
- +6 more
Patch Availability(18)
| Vendor / Ecosystem | Fixed in / Patch | Released | Source |
|---|---|---|---|
| ubuntu | gzip-win32 (1.10-4ubuntu1.1) @ impish | 2026-05-25 | ubuntu |
| ubuntu | xzdec (5.1.1alpha+20120614-2ubuntu2.16.04.1+esm1) @ xenial | 2026-05-25 | ubuntu |
| ubuntu | xzdec (5.2.5-2ubuntu0.1) @ impish | 2026-05-25 | ubuntu |
| ubuntu | gzip (1.6-4ubuntu1+esm1) @ xenial | 2026-05-25 | ubuntu |
| redhat | redhat-virtualization-host-0:4.3.23-20220622.0.el7_9 | 2022-07-01 | redhat |
| redhat | xz-0:5.2.2-2.el7_9 | 2022-06-15 | redhat |
| redhat | xz-0:5.2.4-4.el8_1 | 2022-06-13 | redhat |
| redhat | xz-0:5.2.4-4.el8_2 | 2022-06-13 | redhat |
| redhat | xz-0:5.2.4-4.el8_6 | 2022-06-13 | redhat |
| redhat | xz-0:5.2.4-4.el8_4 | 2022-06-13 | redhat |
| redhat | xz-0:5.2.5-8.el9_0 | 2022-06-08 | redhat |
| redhat | redhat-virtualization-host-0:4.5.0-202205291010_8.6 | 2022-06-03 | redhat |
| redhat | gzip-0:1.10-9.el9_0 | 2022-05-17 | redhat |
| redhat | gzip-0:1.5-11.el7_9 | 2022-05-11 | redhat |
| redhat | gzip-0:1.9-13.el8_4 | 2022-05-03 | redhat |
| redhat | gzip-0:1.9-10.el8_2 | 2022-05-02 | redhat |
| redhat | gzip-0:1.9-10.el8_1 | 2022-04-26 | redhat |
| redhat | gzip-0:1.9-13.el8_5 | 2022-04-26 | redhat |
Patches are aggregated from vendor advisories (Red Hat, Microsoft, Cisco, GitHub) and package ecosystems (OSV, GHSA). Multiple rows for the same upstream release have been deduplicated.
Weakness Classification(2)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Additional Vendor Advisories
(5)
Vendors that published advisories for this CVE beyond the curated set above. Broader coverage but minimal per-row detail — click through for the original advisory.
- Microsoft MSRCCVE-2022-12712022-09-08
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.
- UbuntuUSN-5378-1MEDIUM
Gzip vulnerability
- UbuntuUSN-5378-2MEDIUM
XZ Utils vulnerability
- UbuntuUSN-5378-3MEDIUM
XZ Utils vulnerability
- UbuntuUSN-5378-4MEDIUM
Gzip vulnerability
Data Freshness Timeline
(refreshed 11× in last 7d / 45× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-21 15:22 UTCEPSS rescore
- 2026-07-20 17:05 UTCEPSS rescore
- 2026-07-19 14:29 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-19 02:27 UTCEPSS rescore
- 2026-07-18 10:02 UTCEPSS rescore
- 2026-07-16 21:04 UTCOSV refresh
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-16 17:00 UTCEPSS rescore
- 2026-07-15 16:55 UTCEPSS rescore
- 2026-07-15 01:58 UTCEPSS rescore
- 2026-07-15 01:58 UTCEPSS rescore
- 2026-07-13 22:27 UTCEPSS rescore
- 2026-07-12 05:44 UTCEPSS rescore
- 2026-07-11 08:25 UTCEPSS rescore
- 2026-07-09 19:07 UTCEPSS rescore
- 2026-07-09 19:07 UTCEPSS rescore
- 2026-07-08 15:12 UTCEPSS rescore
- 2026-07-08 15:12 UTCEPSS rescore
- 2026-07-07 13:43 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-06 16:25 UTCEPSS rescore
- 2026-07-06 02:21 UTCEPSS rescore
- 2026-07-06 02:21 UTCEPSS rescore
Show 70 moreShow fewer
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-05 02:28 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-04 06:29 UTCEPSS rescore
- 2026-07-01 15:04 UTCEPSS rescore
- 2026-06-30 23:20 UTCEPSS rescore
- 2026-06-29 14:04 UTCEPSS rescore
- 2026-06-29 14:04 UTCEPSS rescore
- 2026-06-28 20:02 UTCOSV refresh
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-28 04:54 UTCEPSS rescore
- 2026-06-27 03:07 UTCEPSS rescore
- 2026-06-27 03:06 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
- 2026-06-25 13:48 UTCEPSS rescore
- 2026-06-24 14:03 UTCEPSS rescore
- 2026-06-24 14:03 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-23 21:31 UTCEPSS rescore
- 2026-06-22 14:24 UTCEPSS rescore
- 2026-06-21 14:55 UTCEPSS rescore
- 2026-06-21 01:58 UTCEPSS rescore
- 2026-06-21 01:58 UTCEPSS rescore
- 2026-06-19 19:24 UTCEPSS rescore
- 2026-06-19 19:24 UTCEPSS rescore
- 2026-06-18 17:51 UTCEPSS rescore
- 2026-06-18 17:51 UTCEPSS rescore
- 2026-06-17 17:51 UTCEPSS rescore
- 2026-06-17 17:51 UTCEPSS rescore
- 2026-06-16 17:51 UTCEPSS rescore
- 2026-06-15 17:46 UTCEPSS rescore
- 2026-06-14 23:15 UTCEPSS rescore
- 2026-06-14 23:15 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-13 22:58 UTCEPSS rescore
- 2026-06-12 23:10 UTCEPSS rescore
- 2026-06-11 13:58 UTCEPSS rescore
- 2026-06-11 13:39 UTCOSV refresh
- 2026-06-10 22:16 UTCEPSS rescore
- 2026-06-10 13:20 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-08 14:15 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-07 15:23 UTCEPSS rescore
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-06 13:46 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-06-05 22:45 UTCEPSS rescore
- 2026-06-05 06:09 UTCEPSS rescore
- 2026-06-05 06:09 UTCEPSS rescore
- 2026-06-04 13:11 UTCEPSS rescore
- 2026-06-04 13:10 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-06-02 20:11 UTCEPSS rescore
- 2026-05-31 22:29 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-31 00:15 UTCEPSS rescore
- 2026-05-29 13:42 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-28 13:43 UTCEPSS rescore
- 2026-05-27 13:39 UTCEPSS rescore
- 2026-05-27 13:39 UTCEPSS rescore
- 2026-05-26 13:43 UTCEPSS rescore
- 2026-05-26 13:42 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-26 07:17 UTCEPSS rescore
- 2026-05-25 16:14 UTCEG score recompute
- 2026-05-25 16:14 UTCVendor advisory
- 2026-05-25 16:14 UTCGHSA enrichment
Related CVEs(same vendor + same CWE)
Same vendor
10 shownmsrc · redhat
Same CWE
10 shownCWE-20
- CVE-2002-2444EG 9.8CRITICAL
- CVE-2005-0116NVD 0.0EG 9.0EPSS 99%NONE
- CVE-2002-1359NVD 0.0EG 9.0EPSS 100%NONE
- CVE-2000-0380NVD 0.0EG 9.0EPSS 98%NONE
- CVE-2000-0258EG 7.5EPSS 97%HIGH
- CVE-2004-2771EG 0.0EPSS 93%NONE
- CVE-2002-2443EG 0.0EPSS 93%NONE
- CVE-2002-2433EG 0.0NONE
- CVE-2003-1569EG 0.0NONE
- CVE-2003-1568EG 0.0NONE
Frequently asked(5)
What is CVE-2022-1271?
When was CVE-2022-1271 disclosed?
Is CVE-2022-1271 actively exploited?
What is the CVSS score of CVE-2022-1271?
How do I remediate CVE-2022-1271?
Dependency Blast Radius
Explore the affected products and dependency analysis for CVE-2022-1271
Is Your Infrastructure Affected by CVE-2022-1271?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.