8.8
HIGH
CVE-2022-1271
"Apache GNU gzip zgrep Remote Arbitrary File Write Vulnerability"
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.

INFO

Published Date :

Aug. 31, 2022, 4:15 p.m.

Last Modified :

Aug. 26, 2024, 10:47 a.m.

Remotely Exploitable :

Yes !

Impact Score :

5.9

Exploitability Score :

2.8
Public PoC/Exploit Available at Github

CVE-2022-1271 has a 6 public PoC/Exploit available at Github. Go to the Public Exploits tab to see the list.

Affected Products

The following products are affected by CVE-2022-1271 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Debian debian_linux
1 Redhat jboss_data_grid
1 Gnu gzip
1 Tukaani xz
References to Advisories, Solutions, and Tools

Here, you will find a curated list of external links that provide in-depth information, practical solutions, and valuable tools related to CVE-2022-1271.

URL Resource
https://access.redhat.com/security/cve/CVE-2022-1271 Third Party Advisory
https://bugzilla.redhat.com/show_bug.cgi?id=2073310 Issue Tracking Third Party Advisory
https://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6 Broken Link
https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html Mailing List Patch Vendor Advisory
https://security-tracker.debian.org/tracker/CVE-2022-1271 Third Party Advisory
https://security.gentoo.org/glsa/202209-01 Third Party Advisory
https://security.netapp.com/advisory/ntap-20220930-0006/ Third Party Advisory
https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch Patch Third Party Advisory
https://www.openwall.com/lists/oss-security/2022/04/07/8 Mailing List Patch Third Party Advisory

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

None

Dockerfile Roff Java

Updated: 3 weeks, 6 days ago
0 stars 0 fork 0 watcher
Born at : Oct. 7, 2024, 8:52 a.m. This repo has been linked 127 different CVEs too.

Learn about 'How to check and prevent Docker's security vulnerability'

Dockerfile Java

Updated: 1 month, 1 week ago
0 stars 1 fork 1 watcher
Born at : Sept. 25, 2024, 2:31 a.m. This repo has been linked 19 different CVEs too.

None

Java HTML

Updated: 1 year, 4 months ago
5 stars 2 fork 2 watcher
Born at : April 17, 2023, 5:28 p.m. This repo has been linked 5 different CVEs too.

simplified grype CLI

scanner vulnerability vulnerability-scanners learn

Go

Updated: 1 year, 10 months ago
0 stars 0 fork 0 watcher
Born at : Nov. 21, 2022, 5:08 p.m. This repo has been linked 4 different CVEs too.

Map Vulnerabilities into Different Layers of the Container Image

Python

Updated: 1 year, 10 months ago
1 stars 0 fork 0 watcher
Born at : Oct. 5, 2022, 12:07 p.m. This repo has been linked 1276 different CVEs too.

None

Updated: 2 years, 4 months ago
1 stars 3 fork 3 watcher
Born at : April 10, 2022, 6:03 a.m. This repo has been linked 1 different CVEs too.

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2022-1271 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2022-1271 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • Modified Analysis by [email protected]

    Aug. 26, 2024

    Action Type Old Value New Value
    Changed Reference Type https://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6 No Types Assigned https://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6 Broken Link
    Added CPE Configuration OR *cpe:2.3:a:tukaani:xz:*:*:*:*:*:*:*:* versions up to (excluding) 5.2.5
  • CVE Modified by [email protected]

    May. 14, 2024

    Action Type Old Value New Value
  • CVE Modified by [email protected]

    Nov. 07, 2023

    Action Type Old Value New Value
    Added Reference Red Hat, Inc. https://git.tukaani.org/?p=xz.git%3Ba=commit%3Bh=69d1b3fc29677af8ade8dc15dba83f0589cb63d6 [No types assigned]
    Removed Reference Red Hat, Inc. https://git.tukaani.org/?p=xz.git;a=commit;h=69d1b3fc29677af8ade8dc15dba83f0589cb63d6
    Removed CWE Red Hat, Inc. CWE-1173
  • Modified Analysis by [email protected]

    Oct. 07, 2022

    Action Type Old Value New Value
    Changed Reference Type https://security.netapp.com/advisory/ntap-20220930-0006/ No Types Assigned https://security.netapp.com/advisory/ntap-20220930-0006/ Third Party Advisory
  • CVE Modified by [email protected]

    Sep. 30, 2022

    Action Type Old Value New Value
    Added Reference https://security.netapp.com/advisory/ntap-20220930-0006/ [No Types Assigned]
  • Initial Analysis by [email protected]

    Sep. 07, 2022

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    Changed Reference Type https://access.redhat.com/security/cve/CVE-2022-1271 No Types Assigned https://access.redhat.com/security/cve/CVE-2022-1271 Third Party Advisory
    Changed Reference Type https://bugzilla.redhat.com/show_bug.cgi?id=2073310 No Types Assigned https://bugzilla.redhat.com/show_bug.cgi?id=2073310 Issue Tracking, Third Party Advisory
    Changed Reference Type https://git.tukaani.org/?p=xz.git;a=commit;h=69d1b3fc29677af8ade8dc15dba83f0589cb63d6 No Types Assigned https://git.tukaani.org/?p=xz.git;a=commit;h=69d1b3fc29677af8ade8dc15dba83f0589cb63d6 Mailing List, Patch, Third Party Advisory
    Changed Reference Type https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html No Types Assigned https://lists.gnu.org/r/bug-gzip/2022-04/msg00011.html Mailing List, Patch, Vendor Advisory
    Changed Reference Type https://security.gentoo.org/glsa/202209-01 No Types Assigned https://security.gentoo.org/glsa/202209-01 Third Party Advisory
    Changed Reference Type https://security-tracker.debian.org/tracker/CVE-2022-1271 No Types Assigned https://security-tracker.debian.org/tracker/CVE-2022-1271 Third Party Advisory
    Changed Reference Type https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch No Types Assigned https://tukaani.org/xz/xzgrep-ZDI-CAN-16587.patch Patch, Third Party Advisory
    Changed Reference Type https://www.openwall.com/lists/oss-security/2022/04/07/8 No Types Assigned https://www.openwall.com/lists/oss-security/2022/04/07/8 Mailing List, Patch, Third Party Advisory
    Added CWE NIST CWE-20
    Added CPE Configuration OR *cpe:2.3:a:gnu:gzip:*:*:*:*:*:*:*:* versions up to (excluding) 1.12
    Added CPE Configuration OR *cpe:2.3:a:redhat:jboss_data_grid:7.0.0:*:*:*:*:*:*:*
    Added CPE Configuration OR *cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
  • CVE Modified by [email protected]

    Sep. 07, 2022

    Action Type Old Value New Value
    Added Reference https://security.gentoo.org/glsa/202209-01 [No Types Assigned]
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2022-1271 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2022-1271 weaknesses.

CAPEC-3: Using Leading 'Ghost' Character Sequences to Bypass Input Filters Using Leading 'Ghost' Character Sequences to Bypass Input Filters CAPEC-7: Blind SQL Injection Blind SQL Injection CAPEC-8: Buffer Overflow in an API Call Buffer Overflow in an API Call CAPEC-9: Buffer Overflow in Local Command-Line Utilities Buffer Overflow in Local Command-Line Utilities CAPEC-10: Buffer Overflow via Environment Variables Buffer Overflow via Environment Variables CAPEC-13: Subverting Environment Variable Values Subverting Environment Variable Values CAPEC-14: Client-side Injection-induced Buffer Overflow Client-side Injection-induced Buffer Overflow CAPEC-22: Exploiting Trust in Client Exploiting Trust in Client CAPEC-23: File Content Injection File Content Injection CAPEC-24: Filter Failure through Buffer Overflow Filter Failure through Buffer Overflow CAPEC-28: Fuzzing Fuzzing CAPEC-31: Accessing/Intercepting/Modifying HTTP Cookies Accessing/Intercepting/Modifying HTTP Cookies CAPEC-42: MIME Conversion MIME Conversion CAPEC-43: Exploiting Multiple Input Interpretation Layers Exploiting Multiple Input Interpretation Layers CAPEC-45: Buffer Overflow via Symbolic Links Buffer Overflow via Symbolic Links CAPEC-46: Overflow Variables and Tags Overflow Variables and Tags CAPEC-47: Buffer Overflow via Parameter Expansion Buffer Overflow via Parameter Expansion CAPEC-52: Embedding NULL Bytes Embedding NULL Bytes CAPEC-53: Postfix, Null Terminate, and Backslash Postfix, Null Terminate, and Backslash CAPEC-63: Cross-Site Scripting (XSS) Cross-Site Scripting (XSS) CAPEC-64: Using Slashes and URL Encoding Combined to Bypass Validation Logic Using Slashes and URL Encoding Combined to Bypass Validation Logic CAPEC-67: String Format Overflow in syslog() String Format Overflow in syslog() CAPEC-71: Using Unicode Encoding to Bypass Validation Logic Using Unicode Encoding to Bypass Validation Logic CAPEC-72: URL Encoding URL Encoding CAPEC-73: User-Controlled Filename User-Controlled Filename CAPEC-78: Using Escaped Slashes in Alternate Encoding Using Escaped Slashes in Alternate Encoding CAPEC-79: Using Slashes in Alternate Encoding Using Slashes in Alternate Encoding CAPEC-80: Using UTF-8 Encoding to Bypass Validation Logic Using UTF-8 Encoding to Bypass Validation Logic CAPEC-81: Web Server Logs Tampering Web Server Logs Tampering CAPEC-83: XPath Injection XPath Injection CAPEC-85: AJAX Footprinting AJAX Footprinting CAPEC-88: OS Command Injection OS Command Injection CAPEC-101: Server Side Include (SSI) Injection Server Side Include (SSI) Injection CAPEC-104: Cross Zone Scripting Cross Zone Scripting CAPEC-108: Command Line Execution through SQL Injection Command Line Execution through SQL Injection CAPEC-109: Object Relational Mapping Injection Object Relational Mapping Injection CAPEC-110: SQL Injection through SOAP Parameter Tampering SQL Injection through SOAP Parameter Tampering CAPEC-120: Double Encoding Double Encoding CAPEC-135: Format String Injection Format String Injection CAPEC-136: LDAP Injection LDAP Injection CAPEC-153: Input Data Manipulation Input Data Manipulation CAPEC-182: Flash Injection Flash Injection CAPEC-209: XSS Using MIME Type Mismatch XSS Using MIME Type Mismatch CAPEC-230: Serialized Data with Nested Payloads Serialized Data with Nested Payloads CAPEC-231: Oversized Serialized Data Payloads Oversized Serialized Data Payloads CAPEC-250: XML Injection XML Injection CAPEC-261: Fuzzing for garnering other adjacent user/sensitive data Fuzzing for garnering other adjacent user/sensitive data CAPEC-267: Leverage Alternate Encoding Leverage Alternate Encoding CAPEC-473: Signature Spoof Signature Spoof CAPEC-588: DOM-Based XSS DOM-Based XSS CAPEC-664: Server Side Request Forgery Server Side Request Forgery CAPEC-3: Using Leading 'Ghost' Character Sequences to Bypass Input Filters Using Leading 'Ghost' Character Sequences to Bypass Input Filters CAPEC-43: Exploiting Multiple Input Interpretation Layers Exploiting Multiple Input Interpretation Layers CAPEC-71: Using Unicode Encoding to Bypass Validation Logic Using Unicode Encoding to Bypass Validation Logic
Exploit Prediction

EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days.

1.24 }} 0.22%

score

0.85737

percentile

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability