Skip to content
RCE Advisory Intermediate

GNU Gzip zgrep Argument Injection Remote Code Execution Vulnerability

The zgrep script in GNU Gzip fails to validate user-supplied strings containing special characters before using them in a system command. An attacker could exploit this to execute arbitrary code on the system, though interaction with the script is required.

cleemy desu wayo Follow

Originally disclosed on Zero Day Initiative

High 7.0 View original

This vulnerability allows remote attackers to execute arbitrary code on affected installations of GNU Gzip. Interaction with this script is required to exploit this vulnerability but attack vectors may vary depending on the implementation.

cleemy desu wayo, on the Zero Day Initiative

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely, the zgrep script fails to properly sanitise user-supplied input before incorporating it into a shell command, leading to argument injection.

Impact

An attacker could execute arbitrary code on the system, but interaction with the script is required and attack vectors may vary.

What the attacker needed

Interaction with the zgrep script

The fix

GNU has issued an update to correct this vulnerability.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This is a flaw in a command-line tool called zgrep, which is part of GNU Gzip. The tool takes input from the user and passes it to the system without checking for dangerous characters, so an attacker could trick the system into running harmful commands. However, the attacker needs to interact with the script in some way to exploit it.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by cleemy desu wayo

View all

1 more disclosed report, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.