Skip to content
RCE Advisory Intermediate CVE-2023-35963CVE-2023-35960CVE-2023-35964CVE-2023-35959CVE-2023-35961CVE-2023-35962

GTKWave decompression OS command injection vulnerabilities

GTKWave passes unsanitised input file names to shell commands when decompressing gzip or bzip2 files, allowing command injection. An attacker could execute arbitrary commands if a victim opens a maliciously named wave file.

Claudio Bozzato Follow

Originally disclosed on Cisco Talos

High 7.8 View original

Multiple OS command injection vulnerabilities exist in the decompression functionality of GTKWave 3.3.115. A specially crafted wave file can lead to arbitrary command execution.

Claudio Bozzato, on Cisco Talos

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

The application concatenates an unsanitised file name into a shell command string and executes it with popen, without escaping shell metacharacters.

Impact

An attacker could execute arbitrary commands on the victim's machine with the privileges of the GTKWave process, but the victim must open a malicious file.

What the attacker needed

Victim opens a malicious file; file name contains shell metacharacters; GTKWave version 3.3.115 or earlier

The fix

The vulnerabilities were fixed in version 3.3.118.

How it was found

  1. Create a wave file with a name containing shell metacharacters and a compressed extension such as .ghw.gz or .gz.
  2. Deliver the file to the victim, for example by email, so that opening it triggers GTKWave.
  3. When the victim opens the file, GTKWave detects the compression magic or extension and builds a decompression command.
  4. The command string includes the malicious file name and is passed to popen, executing the injected commands.

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.

GTKWave is a program for viewing signal waveforms. When it opens a compressed file, it builds a shell command by pasting the file name into a decompression command. If the file name contains special shell characters, those characters are interpreted by the shell, so an attacker can make the program run their own commands.

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 Claudio Bozzato

View all

185 more disclosed reports, best first.

More from Cisco Talos

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.