Skip to content
RCE Advisory Intermediate CVE-2022-1271

Tukaani XZ Utils xzgrep Argument Injection Remote Code Execution Vulnerability

The xzgrep script failed to properly validate user-supplied strings containing special characters before passing them to a system command. An attacker could exploit this to run arbitrary code on a system where the script is used.

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 Tukaani XZ Utils. 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 script built a shell command from unvalidated user input, so special characters in that input were interpreted by the shell rather than treated as plain text.

Impact

An attacker could execute arbitrary code on affected installations, though the text notes that interaction with the script is required and that attack vectors may vary.

What the attacker needed

Interaction with the xzgrep script

The fix

The vendor issued an update to correct the 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.

xzgrep is a small helper script that searches inside compressed files. It passed part of what the user typed straight into a command the computer runs, without checking it first. Because of that, someone could sneak in extra commands and get them executed on the machine.

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.