Siretta QUARTZ-GOLD m2m DELETE_FILE cmd OS command injection vulnerability
The M2M service in the Siretta QUARTZ-GOLD router builds a shell command from a filename field in a UDP packet without validating its contents. An attacker who can send such a packet could run arbitrary commands on the device.
Originally disclosed on Cisco Talos
An OS command injection vulnerability exists in the m2m DELETEFILE cmd functionality of Siretta QUARTZ-GOLD G5.0.1.5-210720-141020. A specially-crafted network request can lead to arbitrary command execution.
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 field from the UDP packet is concatenated into a shell command and passed to system() without any sanitisation or escaping.
Impact
An unauthenticated remote attacker could execute arbitrary commands on the router, giving full compromise of confidentiality, integrity and availability.
What the attacker needed
M2M feature enabled on the device; Network access to the M2M UDP service
The fix
The vendor released a patch; the underlying fix is to validate or escape the data field before it is used in a shell command.
How it was found
- Enable the M2M feature so the m2m binary runs and listens for UDP packets.
- Craft a UDP packet in the M2M format with a DELETE_FILE command id and a data entry whose data field contains shell metacharacters.
- Send the packet to the device; the data field is placed into the rm command and executed by the shell.
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.
The router has a feature that deletes files when it receives a special network message. It takes the file name from that message and pastes it into a command it runs on the device without checking it. If the file name contains extra shell instructions, the device runs those too, letting an attacker control the router.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.