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...
HighCVSS 8.8
EPSS 5.9%
- Published
- Updated
- Exploit status
- No public exploit known
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.
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| debian/gzip(Debian:12) | < 1.12-1 | 1.12-1 |
| debian/gzip(Debian:13) | < 1.12-1 | 1.12-1 |
| debian/gzip(Debian:14) | < 1.12-1 | 1.12-1 |
| debian/xz-utils(Debian:12) | < 5.2.5-2.1 | 5.2.5-2.1 |
| debian/xz-utils(Debian:13) | < 5.2.5-2.1 | 5.2.5-2.1 |
| debian/xz-utils(Debian:14) | < 5.2.5-2.1 | 5.2.5-2.1 |
| Siemens RUGGEDCOM APE1808 | All versions | No fix listed |
| Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | >= V3.1.0, < V3.1.5 | V3.1.5 |
| Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | >= V3.1.0, < V3.1.5 | V3.1.5 |
| Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP | >= V3.1.0, < V3.1.5 | V3.1.5 |
| ubuntu/gzip(Ubuntu:22.04) | < 1.10-4ubuntu4 | 1.10-4ubuntu4 |
| ubuntu/xz-utils(Ubuntu:22.04) | < 5.2.5-2ubuntu1 | 5.2.5-2ubuntu1 |
| alpine/gzip(Alpine:v3.12) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.13) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.14) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.15) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.16) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.17) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.18) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.19) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.20) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.21) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.22) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.23) | < 1.12-r0 | 1.12-r0 |
| alpine/gzip(Alpine:v3.24) | < 1.12-r0 | 1.12-r0 |
Show 17 more
| Product | Affected versions | Fixed in |
|---|---|---|
| alpine/xz(Alpine:v3.12) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.13) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.14) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.15) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.16) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.17) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.18) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.19) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.20) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.21) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.22) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.23) | < 5.2.5-r1 | 5.2.5-r1 |
| alpine/xz(Alpine:v3.24) | < 5.2.5-r1 | 5.2.5-r1 |
| GNU gzip | < 1.12 | 1.12 |
| redhat jboss data grid | = 7.0.0 | No fix listed |
| debian linux | = 10.0 | No fix listed |
| tukaani xz | < 5.2.5 | 5.2.5 |
References
- Debian Security Tracker CVE-2022-1271 third-party-advisory vendor-advisory
- bugzilla.redhat.com issue-tracking third-party-advisory
- www.openwall.com mailing-list patch third-party-advisory
- lists.gnu.org mailing-list patch vendor-advisory
- tukaani.org patch third-party-advisory
- git.tukaani.org broken-link
- access.redhat.com third-party-advisory
- GLSA-202209-01 third-party-advisory vendor-advisory
- security.netapp.com third-party-advisory
- cert-portal.siemens.com
- cert-portal.siemens.com
- Ubuntu CVE tracker vendor-advisory
- USN-5378-1 vendor-advisory
- USN-5378-2 vendor-advisory
- USN-5378-3 vendor-advisory
- USN-5378-4 vendor-advisory
- www.cve.org
- security.alpinelinux.org vendor-advisory
- bugs.debian.org issue-tracking
- bugs.debian.org issue-tracking