Skip to content
RCE Advisory Intermediate CVE-2022-21178

TCL LinkHub Mesh Wifi confsrv ucloud_add_node_new OS command injection vulnerability

The confsrv service in TCL LinkHub Mesh Wifi builds an OS command using the serialNumMd5 field from a protobuffer message without sanitisation, then passes it to system(). An attacker on the same Wi-Fi network can send a crafted packet to port 9003 to execute arbitrary commands on the device.

Carl Hurd Follow

Originally disclosed on Cisco Talos

Critical 9.6 View original

An os command injection vulnerability exists in the confsrv ucloudaddnewnode functionality of TCL LinkHub Mesh Wifi MS1G0001.0014. A specially-crafted network packet can lead to arbitrary command execution.

Carl Hurd, 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 serialNumMd5 field from the protobuffer is formatted into a shell command with sprintf and passed to system() without any escaping or validation.

Impact

An attacker on the same Wi-Fi network could execute arbitrary commands on the device, leading to full compromise.

What the attacker needed

Access to the LinkHub Mesh Wi-Fi network

How it was found

  1. Connect to the Wi-Fi network provided by the LinkHub Mesh.
  2. Send a protobuffer message of type ManualNodeInfo to port 9003 with a crafted serialNumMd5 value.
  3. The ucloud binary routes the message to confsrv, which calls ucloud_add_node_new.
  4. The serialNumMd5 value is inserted into a command and executed via doSystemCmd.

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 takes a value from a network message and inserts it directly into a command that the operating system runs. Because the value is not cleaned, an attacker can add extra command characters to make the router run their own commands. This is called OS command injection.

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

View all

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