{"id":"CVE-2022-1271","state":"PUBLISHED","title":"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 o","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.","publishedAt":"2022-08-31T15:33:00.000Z","updatedAt":"2026-10-14T12:25:51.618Z","severity":{"score":8.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"CISA-ADP"},"assigner":"redhat","products":["n/a gzip, xz-utils"],"affected":[{"vendor":"n/a","product":"gzip, xz-utils","versions":[{"version":"Fixed in gzip 1.12","status":"affected"}]}],"references":["https://bugzilla.redhat.com/show_bug.cgi?id=2073310","https://www.openwall.com/lists/oss-security/2022/04/07/8","https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html","https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch","https://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6","https://security-tracker.debian.org/tracker/CVE-2022-1271","https://access.redhat.com/security/cve/CVE-2022-1271","https://security.gentoo.org/glsa/202209-01","https://security.netapp.com/advisory/ntap-20220930-0006/","https://cert-portal.siemens.com/productcert/html/ssa-398330.html","https://cert-portal.siemens.com/productcert/html/ssa-455250.html"],"weaknesses":["CWE-179"],"ingestedAt":"2026-10-29T19:49:29.138Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/1xxx/CVE-2022-1271.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-1271","state":"PUBLISHED","datePublished":"2022-08-31T15:33:00.000Z","dateUpdated":"2026-10-14T12:25:51.618Z","assignerShortName":"redhat","assignerOrgId":"53f830b8-0a3f-465b-8143-3b8a9948e749","dateReserved":"2022-04-07T00:00:00.000Z"},"containers":{"cna":{"descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"n/a","product":"gzip, xz-utils","versions":[{"version":"Fixed in gzip 1.12","status":"affected"}]}],"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","name":"GLSA-202209-01","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://security.netapp.com/advisory/ntap-20220930-0006/","tags":["x_refsource_CONFIRM"]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-179","description":"CWE-179 - Incorrect Behavior Order: Early Validation, CWE-1173 Improper Use of Validation Framework","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"redhat","dateUpdated":"2022-09-30T15:06:11.000Z","orgId":"53f830b8-0a3f-465b-8143-3b8a9948e749"},"x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"secalert@redhat.com","ID":"CVE-2022-1271","STATE":"PUBLIC"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"gzip, xz-utils","version":{"version_data":[{"version_value":"Fixed in gzip 1.12"}]}}]},"vendor_name":"n/a"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-179 - Incorrect Behavior Order: Early Validation, CWE-1173 Improper Use of Validation Framework"}]}]},"references":{"reference_data":[{"name":"https://bugzilla.redhat.com/show_bug.cgi?id=2073310","refsource":"MISC","url":"https://bugzilla.redhat.com/show_bug.cgi?id=2073310"},{"name":"https://www.openwall.com/lists/oss-security/2022/04/07/8","refsource":"MISC","url":"https://www.openwall.com/lists/oss-security/2022/04/07/8"},{"name":"https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html","refsource":"MISC","url":"https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html"},{"name":"https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch","refsource":"MISC","url":"https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch"},{"name":"https://git.tukaani.org/?p=xz.git;a=commit;h=69d1b3fc29677af8ade8dc15dba83f0589cb63d6","refsource":"MISC","url":"https://git.tukaani.org/?p=xz.git;a=commit;h=69d1b3fc29677af8ade8dc15dba83f0589cb63d6"},{"name":"https://security-tracker.debian.org/tracker/CVE-2022-1271","refsource":"MISC","url":"https://security-tracker.debian.org/tracker/CVE-2022-1271"},{"name":"https://access.redhat.com/security/cve/CVE-2022-1271","refsource":"MISC","url":"https://access.redhat.com/security/cve/CVE-2022-1271"},{"name":"GLSA-202209-01","refsource":"GENTOO","url":"https://security.gentoo.org/glsa/202209-01"},{"name":"https://security.netapp.com/advisory/ntap-20220930-0006/","refsource":"CONFIRM","url":"https://security.netapp.com/advisory/ntap-20220930-0006/"}]}}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2073310","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://www.openwall.com/lists/oss-security/2022/04/07/8","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2022-1271","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://access.redhat.com/security/cve/CVE-2022-1271","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://security.gentoo.org/glsa/202209-01","name":"GLSA-202209-01","tags":["vendor-advisory","x_refsource_GENTOO","x_transferred"]},{"url":"https://security.netapp.com/advisory/ntap-20220930-0006/","tags":["x_refsource_CONFIRM","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-02T23:55:24.665Z"}},{"title":"CISA ADP Vulnrichment","metrics":[{"cvssV3_1":{"scope":"UNCHANGED","version":"3.1","baseScore":8.8,"attackVector":"NETWORK","baseSeverity":"HIGH","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","integrityImpact":"HIGH","userInteraction":"NONE","attackComplexity":"LOW","availabilityImpact":"HIGH","privilegesRequired":"LOW","confidentialityImpact":"HIGH"}},{"other":{"type":"ssvc","content":{"timestamp":"2025-06-09T14:55:46.489089Z","id":"CVE-2022-1271","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-06-09T14:56:35.875Z"}},{"affected":[{"vendor":"Siemens","product":"RUGGEDCOM APE1808","defaultStatus":"unknown","versions":[{"version":"0","status":"affected","lessThan":"*","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.0","status":"affected","lessThan":"V3.1.5","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.0","status":"affected","lessThan":"V3.1.5","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.0","status":"affected","lessThan":"V3.1.5","versionType":"custom"}]},{"vendor":"Siemens","product":"SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.0","status":"affected","lessThan":"V3.1.5","versionType":"custom"}]},{"vendor":"Siemens","product":"SIPLUS S7-1500 CPU 1518-4 PN/DP MFP","defaultStatus":"unknown","versions":[{"version":"V3.1.0","status":"affected","lessThan":"V3.1.5","versionType":"custom"}]}],"references":[{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html"},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-455250.html"}],"providerMetadata":{"shortName":"siemens-SADP","orgId":"0b142b55-0307-4c5a-b3c9-f314f3fb7c5e","dateUpdated":"2026-10-14T12:25:51.618Z"},"x_adpType":"supplier"}]}}}