Siretta QUARTZ-GOLD httpd delfile.cgi directory traversal vulnerability
The router's file-deletion CGI takes a filename parameter and passes it unsanitised into a shell command, so a crafted request can delete files outside the intended upload folder. An authenticated attacker could remove arbitrary files such as the password file, which the report says would block SSH access.
Originally disclosed on Cisco Talos
A directory traversal 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 file deletion.
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 used without sanitisation in a shell command built with sprintf and run via system, so path traversal sequences escape the base folder.
Impact
An attacker with valid credentials could delete arbitrary files on the device, which the report says would prohibit SSH access.
What the attacker needed
Valid basic auth credentials; correct _http_id value
The fix
The filename parameter should be validated and confined to the upload folder, and the delete should not be run through a shell command; the vendor released a patch.
How it was found
- Send an HTTP POST request to the delfile.cgi endpoint with valid basic authentication.
- Include the _filename parameter containing a traversal path and the correct _http_id value.
- The server builds and runs a delete command using that path, removing the targeted file.
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 you uploaded. It builds a delete command by gluing your filename onto a folder path and running it in the system shell. Because the filename is never checked, typing a path that climbs up out of the folder lets you delete other files on the device.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.