CVE-2022-1271
Reported by redhat · Published August 31, 2022
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| xz-lzma-compat | Amazon Linux | 5.2.5-9.amzn2023.0.2, 5.2.2-1.amzn2.0.3 |
| xz | Amazon Linux | 5.2.5-9.amzn2023.0.2, 5.2.2-1.amzn2.0.3 |
| xz-libs | Amazon Linux | 5.2.2-1.amzn2.0.3 |
| gzip | Alpine | 1.12-r0 |
| xz-static | Amazon Linux | 5.2.5-9.amzn2023.0.2 |
| gzip | gnu | 1.12 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | gzip, xz-utils | Fixed in gzip 1.12 |
| amazon:2023 | xz-lzma-compat | 0 |
| amazon:2023 | xz | 0 |
| amazon:2 | xz-libs | 0 |
| amazon:2 | xz | 0 |
| alpine | gzip | 0 |
| amazon:2023 | xz-static | 0 |
| amazon:2 | xz-lzma-compat | 0 |
| n/a | gzip, xz-utils | 1.12 |
| arch | xz | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | 3.1.0 |
| amazon:2 | xz-compat-libs | 0 |
| Siemens | SIPLUS S7-1500 CPU 1518-4 PN/DP MFP | 3.1.0 |
| amazon:2023 | xz-devel | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | 3.1.0 |
| amazon:2 | gzip | 0 |
| alpine | xz | 0 |
| amazon:2023 | gzip | 0 |
| Siemens | RUGGEDCOM APE1808 | 0 |
| arch | gzip | 0 |
…and 2 more
Timeline
- Apr 7, 2022 CVE Published
- Sep 1, 2022 EPSS Score (30 in total, the first dated here)
- Apr 3, 2025 PoC Published (2 in total, the first dated here)
- Jun 2, 2026 Security Advisory (95 in total, the first dated here)
- Jul 11, 2026 Coalition ESS Score
- Nov 21, 2026 Distribution Patch (92 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-1271
vulnetix vdb fixes CVE-2022-1271
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-1271/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_MISC
- GLSA-202209-01 vendor-advisoryx_refsource_GENTOO
- x_refsource_CONFIRM
- https://cert-portal.siemens.com/productcert/html/ssa-398330.html url
- https://cert-portal.siemens.com/productcert/html/ssa-455250.html url