Skip to content
RCE Advisory Intermediate CVE-2022-40969

Siretta QUARTZ-GOLD httpd delfile.cgi OS command injection vulnerability

The delfile.cgi endpoint of the Siretta QUARTZ-GOLD router's web server takes a filename parameter and inserts it unsanitised into a shell command, allowing an authenticated attacker to execute arbitrary OS commands. An attacker could send a crafted HTTP request to run commands on the device, such as rebooting it.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

High 7.2 View original

An os command injection vulnerability exists in the httpd delfile.cgi functionality of Siretta QUARTZ-GOLD G5.0.1.5-210720-141020. A specially-crafted HTTP request can lead to arbitrary command execution.

Francesco Benvenuto, 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 `_filename` parameter is passed directly into a shell command via `sprintf` and `system` without sanitisation or escaping.

Impact

An authenticated attacker could execute arbitrary OS commands on the device, leading to full compromise.

What the attacker needed

Valid Basic authentication credentials; correct _http_id value

The fix

The vendor released a patch on 2022-11-24.

How it was found

  1. Send an HTTP POST request to /delfile.cgi with valid Basic authentication.
  2. Include the _filename parameter containing shell metacharacters and a command.
  3. Include the correct _http_id parameter.
  4. The device executes the injected command, causing it to reboot.

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 router has a web page for deleting files. When you ask it to delete a file, it builds a command for the underlying operating system using the name you supplied. Because it does not check that the name is safe, someone who can log in can include extra commands in the name, and the router will run them.

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 Francesco Benvenuto

View all

152 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.