{"id":"CVE-2022-1271","details":"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.","modified":"2026-04-16T04:32:57.027814559Z","published":"2022-08-31T16:15:09.347Z","related":["ALSA-2022:1537","ALSA-2022:4940","ALSA-2022:4991","SUSE-SU-2022:1158-1","SUSE-SU-2022:1160-1","SUSE-SU-2022:1250-1","SUSE-SU-2022:1272-1","SUSE-SU-2022:1275-1","SUSE-SU-2022:14938-1","SUSE-SU-2022:1617-1","SUSE-SU-2022:1650-1","SUSE-SU-2022:1673-1","SUSE-SU-2022:1674-1","openSUSE-SU-2024:11987-1","openSUSE-SU-2024:11992-1","openSUSE-SU-2024:12271-1"],"references":[{"type":"WEB","url":"https://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6"},{"type":"ADVISORY","url":"https://access.redhat.com/security/cve/CVE-2022-1271"},{"type":"ADVISORY","url":"https://security-tracker.debian.org/tracker/CVE-2022-1271"},{"type":"ADVISORY","url":"https://security.gentoo.org/glsa/202209-01"},{"type":"ADVISORY","url":"https://security.netapp.com/advisory/ntap-20220930-0006/"},{"type":"REPORT","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2073310"},{"type":"FIX","url":"https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html"},{"type":"FIX","url":"https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch"},{"type":"FIX","url":"https://www.openwall.com/lists/oss-security/2022/04/07/8"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.tukaani.org/xz.git","events":[{"introduced":"0"},{"fixed":"2327a461e1afce862c22269b80d3517801103c1b"}],"database_specific":{"versions":[{"introduced":"0"},{"fixed":"5.2.5"}]}}],"versions":["v4.42.2alpha","v4.999.3alpha","v4.999.5alpha","v4.999.7beta","v4.999.8beta","v4.999.9beta","v5.0.0","v5.1.0alpha","v5.1.1alpha","v5.1.2alpha","v5.1.3alpha","v5.1.4beta","v5.2.0","v5.2.1","v5.2.2","v5.2.3","v5.2.4"],"database_specific":{"unresolved_ranges":[{"events":[{"introduced":"0"},{"fixed":"1.12"}]},{"events":[{"introduced":"0"},{"last_affected":"7.0.0"}]},{"events":[{"introduced":"0"},{"last_affected":"10.0"}]}],"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-1271.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}]}