CVE-2022-1271

Name
CVE-2022-1271
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.
NVD Severity
unknown
Other trackers
Mailing lists
Exploits
Forges
GitHub (code, issues), Aports (code, issues)

References

Type URI
MISC https://bugzilla.redhat.com/show_bug.cgi?id=2073310
MISC https://access.redhat.com/security/cve/CVE-2022-1271
MISC https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html
MISC https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch
MISC https://www.openwall.com/lists/oss-security/2022/04/07/8
MISC https://git.tukaani.org/?p=xz.git;a=commit;h=69d1b3fc29677af8ade8dc15dba83f0589cb63d6
MISC https://security-tracker.debian.org/tracker/CVE-2022-1271
GENTOO https://security.gentoo.org/glsa/202209-01
Third Party Advisory https://security.netapp.com/advisory/ntap-20220930-0006/
https://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6

Match rules

CPE URI Source package Min version Max version
cpe:2.3:a:gnu:gzip:*:*:*:*:*:*:*:* gzip >= None < 1.12

Vulnerable and fixed packages

Source package Branch Version Maintainer Status
xz edge-main 5.2.5-r1 Natanael Copa <ncopa@alpinelinux.org> fixed
xz 3.22-main 5.2.5-r1 None fixed
xz 3.21-main 5.2.5-r1 None fixed
xz 3.20-main 5.2.5-r1 None fixed
xz 3.19-main 5.2.5-r1 None fixed
xz 3.18-main 5.2.5-r1 None fixed
xz 3.17-main 5.2.5-r1 None fixed
xz 3.12-main 5.2.5-r1 Natanael Copa <ncopa@alpinelinux.org> fixed
gzip edge-main 1.12-r0 Natanael Copa <ncopa@alpinelinux.org> fixed
gzip 3.22-main 1.12-r0 None fixed
gzip 3.21-main 1.12-r0 None fixed
gzip 3.20-main 1.12-r0 None fixed
gzip 3.19-main 1.12-r0 None fixed
gzip 3.18-main 1.12-r0 None fixed
gzip 3.17-main 1.12-r0 Natanael Copa <ncopa@alpinelinux.org> fixed
gzip 3.12-main 1.12-r0 Natanael Copa <ncopa@alpinelinux.org> fixed