Skip to content
RCE Advisory Advanced CVE-2022-40222

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.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

Critical 9.8 View original

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.

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

  1. Enable the M2M feature so the m2m binary runs and listens for UDP packets.
  2. Craft a UDP packet in the M2M format with a DELETE_FILE command id and a data entry whose data field contains shell metacharacters.
  3. 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.

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.