CVE-2022-1271

HIGH

GNU gzip - Arbitrary File Write via Crafted Multi-Line Filename

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 1 public exploit for CVE-2022-1271. PoCs published by greydoubt.

AI-analyzed exploit summary This repository contains test files and scripts related to the xz library, including references to CVE-2022-1271 (xzgrep filename handling). It includes fuzzing tests, coverage scripts, and test file generators but lacks direct exploit code for the CVE.

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.

Exploits (1)

nomisec WRITEUP
by greydoubt · poc
https://github.com/greydoubt/xz

This repository contains test files and scripts related to the xz library, including references to CVE-2022-1271 (xzgrep filename handling). It includes fuzzing tests, coverage scripts, and test file generators but lacks direct exploit code for the CVE.

Classification
Writeup 90%
Attack Type
Other
Complexity
Moderate
Reliability
Theoretical
Target: xz (liblzma)
No auth needed
Prerequisites: xz library installation · test environment setup
devstral-2 · analyzed Apr 10, 2026 Full analysis →

References (9)

Core 9
Core References
Issue Tracking, Third Party Advisory x_refsource_misc
https://bugzilla.redhat.com/show_bug.cgi?id=2073310
Mailing List, Patch, Third Party Advisory x_refsource_misc
https://www.openwall.com/lists/oss-security/2022/04/07/8
Mailing List, Patch, Vendor Advisory x_refsource_misc
https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html
Patch, Third Party Advisory x_refsource_misc
https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch
Third Party Advisory x_refsource_misc
https://security-tracker.debian.org/tracker/CVE-2022-1271
Third Party Advisory x_refsource_misc
https://access.redhat.com/security/cve/CVE-2022-1271
Third Party Advisory vendor-advisory x_refsource_gentoo
https://security.gentoo.org/glsa/202209-01
Third Party Advisory x_refsource_confirm
https://security.netapp.com/advisory/ntap-20220930-0006/

Scores

CVSS v3 8.8
EPSS 0.0430
EPSS Percentile 89.9%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation none
Automatable no
Technical Impact total

Details

CWE
CWE-179 CWE-20
Status published
Products (4)
debian/debian_linux 10.0
gnu/gzip < 1.12
redhat/jboss_data_grid 7.0.0
tukaani/xz < 5.2.5
Published Aug 31, 2022
Tracked Since Feb 18, 2026