CVE-2022-1271
Summary
| CVE | CVE-2022-1271 |
|---|---|
| State | PUBLISHED |
| Assigner | redhat |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2022-08-31 16:15:09 UTC |
| Updated | 2026-10-14 13:17:17 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 8.8 HIGH from [email protected]
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Problem Types: CWE-179 | CWE-20 | CWE-179 CWE-179 - Incorrect Behavior Order: Early Validation, CWE-1173 Improper Use of Validation Framework
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Primary | 8.8 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | ADP | DECLARED | 8.8 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| 3.1 | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | Secondary | 8.8 | HIGH | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
LowUser Interaction
NoneScope
UnchangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
NVD Known Affected Configurations (CPE 2.3)
| Type | Vendor | Product | Version | Update | Edition | Language |
|---|---|---|---|---|---|---|
| Operating System | Debian | Debian Linux | 10.0 | All | All | All |
| Application | Gnu | Gzip | All | All | All | All |
| Application | Redhat | Jboss Data Grid | 7.0.0 | All | All | All |
| Application | Tukaani | Xz | All | All | All | All |
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Na | Gzip Xz-utils | affected Fixed in gzip 1.12 | Not specified |
| ADP | Siemens | RUGGEDCOM APE1808 | affected * custom | Not specified |
| ADP | Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | affected V3.1.0 V3.1.5 custom | Not specified |
| ADP | Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | affected V3.1.0 V3.1.5 custom | Not specified |
| ADP | Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | affected V3.1.0 V3.1.5 custom | Not specified |
| ADP | Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | affected V3.1.0 V3.1.5 custom | Not specified |
| ADP | Siemens | SIPLUS S7-1500 CPU 1518-4 PN/DP MFP | affected V3.1.0 V3.1.5 custom | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| cert-portal.siemens.com/productcert/html/ssa-398330.html | 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e | cert-portal.siemens.com | |
| CVE-2022-1271 | af854a3a-2127-422b-91ae-364da2661108 | security-tracker.debian.org | Third Party Advisory |
| CVE-2022-1271 GNU Gzip Vulnerability in NetApp Products | NetApp Product Security | af854a3a-2127-422b-91ae-364da2661108 | security.netapp.com | Third Party Advisory |
| Red Hat Customer Portal - Access to 24x7 support and knowledge | af854a3a-2127-422b-91ae-364da2661108 | access.redhat.com | Third Party Advisory |
| tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch | af854a3a-2127-422b-91ae-364da2661108 | tukaani.org | Patch, Third Party Advisory |
| 2073310 – (CVE-2022-1271) CVE-2022-1271 gzip: arbitrary-file-write vulnerability | af854a3a-2127-422b-91ae-364da2661108 | bugzilla.redhat.com | Issue Tracking, Third Party Advisory |
| oss-security - zgrep, xzgrep: arbitrary-file-write vulnerability | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | Mailing List, Patch, Third Party Advisory |
| cert-portal.siemens.com/productcert/html/ssa-455250.html | 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e | cert-portal.siemens.com | |
| git.tukaani.org - xz.git/commit | af854a3a-2127-422b-91ae-364da2661108 | git.tukaani.org | Broken Link |
| bug#54772: gzip-1.12 released [stable] | af854a3a-2127-422b-91ae-364da2661108 | lists.gnu.org | Mailing List, Patch, Vendor Advisory |
| GNU Gzip, XZ Utils: Arbitrary file write (GLSA 202209-01) — Gentoo security | af854a3a-2127-422b-91ae-364da2661108 | security.gentoo.org | Third Party Advisory |
| git.tukaani.org - xz.git/commit | MITRE | git.tukaani.org | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
Legacy QID Mappings
- 159764 Oracle Enterprise Linux Security Update for gzip (ELSA-2022-1537)
- 159789 Oracle Enterprise Linux Security Update for gzip (ELSA-2022-2191)
- 159889 Oracle Enterprise Linux Security Update for xz (ELSA-2022-4991)
- 159900 Oracle Enterprise Linux Security Update for xz (ELSA-2022-5052)
- 159921 Oracle Enterprise Linux Security Update for xz (ELSA-2022-4940)
- 159949 Oracle Enterprise Linux Security Update for gzip (ELSA-2022-4582)
- 179180 Debian Security Update for gzip (DLA 2976-1)
- 179184 Debian Security Update for xz-utils (DLA 2977-1)
- 179243 Debian Security Update for gzip (DSA 5122-1)
- 179244 Debian Security Update for xz-utils (DSA 5123-1)
- 183187 Debian Security Update for gzipxz-utils (CVE-2022-1271)
- 198742 Ubuntu Security Notification for Gzip Vulnerability (USN-5378-1)
- 198743 Ubuntu Security Notification for XZ Utils Vulnerability (USN-5378-2)
- 240233 Red Hat Update for gzip (RHSA-2022:1537)
- 240252 Red Hat Update for gzip (RHSA-2022:1665)
- 240257 Red Hat Update for gzip (RHSA-2022:1676)
- 240326 Red Hat Update for gzip (RHSA-2022:2191)
- 240350 Red Hat Update for gzip (RHSA-2022:4582)
- 240425 Red Hat Update for gzip (RHSA-2022:1592)
- 240453 Red Hat Update for xz (RHSA-2022:4940)
- 240461 Red Hat Update for xz (RHSA-2022:4993)
- 240462 Red Hat Update for xz (RHSA-2022:4992)
- 240463 Red Hat Update for xz (RHSA-2022:4991)
- 240469 Red Hat Update for xz (RHSA-2022:5052)
- 257169 CentOS Security Update for gzip (CESA-2022:2191)
- 257185 CentOS Security Update for xz (CESA-2022:5052)
- 353270 Amazon Linux Security Advisory for gzip, xz : ALAS2-2022-1782
- 353949 Amazon Linux Security Advisory for gzip : ALAS-2022-1590
- 353958 Amazon Linux Security Advisory for xz : ALAS-2022-1598
- 354300 Amazon Linux Security Advisory for gzip : ALAS2022-2022-188
- 354505 Amazon Linux Security Advisory for gzip, xz : ALAS2022-2022-058
- 354520 Amazon Linux Security Advisory for xz : ALAS2022-2022-187
- 354631 Amazon Linux Security Advisory for gzip : AL2012-2022-363
- 354632 Amazon Linux Security Advisory for xz : AL2012-2022-364
- 355124 Amazon Linux Security Advisory for xz : ALAS2023-2023-042
- 355166 Amazon Linux Security Advisory for gzip : ALAS2023-2023-043
- 376923 Alibaba Cloud Linux Security Update for gzip (ALINUX3-SA-2022:0030)
- 377066 Alibaba Cloud Linux Security Update for xz (ALINUX2-SA-2022:0027)
- 377072 Alibaba Cloud Linux Security Update for gzip (ALINUX2-SA-2022:0023)
- 377115 Alibaba Cloud Linux Security Update for xz (ALINUX3-SA-2022:0139)
- 500239 Alpine Linux Security Update for gzip
- 500827 Alpine Linux Security Update for xz
- 503988 Alpine Linux Security Update for gzip
- 504564 Alpine Linux Security Update for xz
- 591406 Siemens SIMATIC S7-1500 CPU GNU/Linux subsystem Multiple Vulnerabilities (SSB-439005, ICSA-22-104-13)
- 671669 EulerOS Security Update for gzip (EulerOS-SA-2022-1728)
- 671689 EulerOS Security Update for xz (EulerOS-SA-2022-1775)
- 671828 EulerOS Security Update for gzip (EulerOS-SA-2022-1892)
- 671878 EulerOS Security Update for gzip (EulerOS-SA-2022-1931)
- 671886 EulerOS Security Update for xz (EulerOS-SA-2022-1955)
- 671905 EulerOS Security Update for xz (EulerOS-SA-2022-2015)
- 671937 EulerOS Security Update for gzip (EulerOS-SA-2022-1998)
- 671949 EulerOS Security Update for gzip (EulerOS-SA-2022-1968)
- 671950 EulerOS Security Update for xz (EulerOS-SA-2022-1985)
- 671964 EulerOS Security Update for gzip (EulerOS-SA-2022-2158)
- 671978 EulerOS Security Update for gzip (EulerOS-SA-2022-2133)
- 671984 EulerOS Security Update for xz (EulerOS-SA-2022-2174)
- 672000 EulerOS Security Update for xz (EulerOS-SA-2022-2149)
- 690849 Free Berkeley Software Distribution (FreeBSD) Security Update for zgrep (b019585a-bfea-11ec-b46c-b42e991fc52e)
- 710614 Gentoo Linux GNU Gzip, XZ Utils Arbitrary file write Vulnerability (GLSA 202209-01)
- 752022 SUSE Enterprise Linux Security Update for xz (SUSE-SU-2022:1158-1)
- 752029 SUSE Enterprise Linux Security Update for xz (SUSE-SU-2022:1160-1)
- 752043 SUSE Enterprise Linux Security Update for gzip (SUSE-SU-2022:1250-1)
- 752050 SUSE Enterprise Linux Security Update for gzip (SUSE-SU-2022:1272-1)
- 752057 SUSE Enterprise Linux Security Update for gzip (SUSE-SU-2022:1275-1)
- 752115 SUSE Enterprise Linux Security Update for gzip (SUSE-SU-2022:1617-1)
- 752119 SUSE Enterprise Linux Security Update for gzip (SUSE-SU-2022:1650-1)
- 752132 SUSE Enterprise Linux Security Update for gzip (SUSE-SU-2022:1674-1)
- 752135 SUSE Enterprise Linux Security Update for gzip (SUSE-SU-2022:1673-1)
- 753229 SUSE Enterprise Linux Security Update for xz (SUSE-SU-2022:14938-1)
- 903784 Common Base Linux Mariner (CBL-Mariner) Security Update for gzip (10811) (DEPRECATED)
- 903817 Common Base Linux Mariner (CBL-Mariner) Security Update for gzip (10819)
- 904003 Common Base Linux Mariner (CBL-Mariner) Security Update for gzip (10811-1)
- 904151 Common Base Linux Mariner (CBL-Mariner) Security Update for gzip (10819-1)
- 940481 AlmaLinux Security Update for gzip (ALSA-2022:1537)
- 940955 AlmaLinux Security Update for xz (ALSA-2022:4991)
- 940956 AlmaLinux Security Update for xz (ALSA-2022:4940)
- 960246 Rocky Linux Security Update for gzip (RLSA-2022:1537)
- 960459 Rocky Linux Security Update for xz (RLSA-2022:4991)
- 960608 Rocky Linux Security Update for xz (RLSA-2022:4940)
- 960617 Rocky Linux Security Update for gzip (RLSA-2022:4582)