Skip to content
RCE Write-up Intermediate

Changing the SSID name on a Wi-Fi repeater leads to a CVE!?

The Wi-Fi repeater's captive portal inserts the extender SSID name unescaped into a shell script that runs at reboot. An attacker within Wi-Fi range can inject shell commands that execute as root, leading to full system compromise.

medium.com

Published on medium.com

“An unauthenticated OS command injection vulnerability exists in the Shenzhen Aitemi M300 Wi-Fi Repeater (hardware model MT02). When configuring the device in Extender mode via its captive portal, the extap2g SSID field is inserted unescaped into a reboot-time shell script.

esistdini, on medium.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The firmware writes the SSID name directly into a shell command during boot without any input sanitisation.

Impact

An attacker within Wi-Fi range could execute arbitrary commands as root, potentially gaining a reverse shell, capturing network traffic, performing man-in-the-middle attacks, or using the device for lateral movement.

What the attacker needed

Attacker within Wi-Fi range; device in Extender mode

The fix

User input should be validated or sanitised before being used in shell commands.

How it was found

  1. Connect to the repeater's default Wi-Fi network and open the captive portal.
  2. Enter a malicious SSID name containing a command substitution and save the configuration.
  3. The repeater reboots and executes the injected command as root.
  4. Observe the command output reflected in the new SSID name.

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 write-up has not been written yet. The Original tab links to the source.

A Wi-Fi repeater is a small device that extends your home Wi-Fi. Its setup page lets you choose the name of the new Wi-Fi network, but the device does not check that name carefully. By putting special characters in the name, an attacker can make the device run hidden commands when it restarts, giving them full control.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

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.