{"id":"CVE-2022-1271","published":"2022-08-31T15:33:00Z","modified":"2026-10-14T12:25:51Z","title":"An arbitrary file write vulnerability was found in GNU gzip's zgrep utility","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.05868,"percentile":0.9338,"provenance":"source"},"cwes":[{"id":"CWE-179","name":"Incorrect Behavior Order: Early Validation"}],"references":[{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2073310","tags":["x_refsource_MISC"]},{"url":"https://www.openwall.com/lists/oss-security/2022/04/07/8","tags":["x_refsource_MISC"]},{"url":"https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html","tags":["x_refsource_MISC"]},{"url":"https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch","tags":["x_refsource_MISC"]},{"url":"https://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6","tags":["x_refsource_MISC"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-1271","tags":["x_refsource_MISC"]},{"url":"https://access.redhat.com/security/cve/CVE-2022-1271","tags":["x_refsource_MISC"]},{"url":"https://security.gentoo.org/glsa/202209-01","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://security.netapp.com/advisory/ntap-20220930-0006/","tags":["x_refsource_CONFIRM"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","tags":[]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-455250.html","tags":[]}],"priority":{"score":24.8,"factors":[{"name":"EPSS percentile","points":18.68},{"name":"CVSS severity","points":6.16}]},"affectedVersions":[{"vendor":"n/a","product":"gzip, xz-utils","versions":["Fixed in gzip 1.12"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-06-09T14:55:46.489089Z","from":"CISA ADP","provenance":"source"},"summary":{"text":"An arbitrary file write flaw exists in GNU gzip's zgrep utility, caused by insufficient validation of file names containing two or more newlines, where attacker-selected content and target file names are embedded in crafted multi-line names. A remote, low-privileged attacker who can get zgrep to process such a crafted file name can overwrite attacker-chosen content into arbitrary files on the system, with no user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:35:00Z"},"euvd":{"id":"EUVD-2022-24604","exploited":false,"provenance":"source"}}