---
title: "CVE-2022-1271"
canonical_url: "https://pkgseek.com/security/CVE-2022-1271"
locale: "en"
source: "pkgseek"
entity_type: "cve"
severity: "high"
---

# 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.

CVE-2022-1271 is rated HIGH (8.8), with 20 indexed affected package builds across 4 distributions.

- **Severity / Score**: HIGH (8.8)
- **Affected builds**: 20
- **Affected distros**: 4
- **Distros with fixed_in**: Alibaba Cloud Linux, Oracle Linux, Red Hat Enterprise Linux, Ubuntu

## Affected Packages

| Distribution | Release | Package | Version | Fixed In |
| --- | --- | --- | --- | --- |
| Alibaba Cloud Linux | 3 | gzip | 1.9-12.1.al8 | 1.9-13.al8 |
| Oracle Linux | 8 | gzip | 1.9-12.el8 | 1.9-13.el8_5 |
| Oracle Linux | 8 | xz | 5.2.4-3.el8 | 5.2.4-4.el8_6 |
| Oracle Linux | 8 | xz-devel | 5.2.4-3.el8 | 5.2.4-4.el8_6 |
| Oracle Linux | 8 | xz-libs | 5.2.4-3.el8 | 5.2.4-4.el8_6 |
| Oracle Linux | 9 | gzip | 1.10-8.el9 | 1.10-9.el9_0 |
| Oracle Linux | 9 | xz | 5.2.5-7.el9 | 5.2.5-8.el9_0 |
| Oracle Linux | 9 | xz-devel | 5.2.5-7.el9 | 5.2.5-8.el9_0 |
| Oracle Linux | 9 | xz-libs | 5.2.5-7.el9 | 5.2.5-8.el9_0 |
| Oracle Linux | 9 | xz-lzma-compat | 5.2.5-7.el9 | 5.2.5-8.el9_0 |
| Red Hat Enterprise Linux | 9.8 | gzip | 1.10-8.el9 | 1.10-9.el9_0 |
| Red Hat Enterprise Linux | 9.8 | xz | 5.2.5-7.el9 | 5.2.5-8.el9_0 |
| Red Hat Enterprise Linux | 9.8 | xz-devel | 5.2.5-7.el9 | 5.2.5-8.el9_0 |
| Red Hat Enterprise Linux | 9.8 | xz-libs | 5.2.5-7.el9 | 5.2.5-8.el9_0 |
| Red Hat Enterprise Linux | 9.8 | xz-lzma-compat | 5.2.5-7.el9 | 5.2.5-8.el9_0 |
| Ubuntu | focal | gzip | 1.10-0ubuntu4 | 1.10-0ubuntu4.1 |
| Ubuntu | focal | liblzma5 | 5.2.4-1 | 5.2.4-1ubuntu1.1 |
| Ubuntu | focal | liblzma-dev | 5.2.4-1 | 5.2.4-1ubuntu1.1 |
| Ubuntu | focal | liblzma-doc | 5.2.4-1 | 5.2.4-1ubuntu1.1 |
| Ubuntu | focal | xz-utils | 5.2.4-1 | 5.2.4-1ubuntu1.1 |
