Skip to content
RCE Advisory Intermediate CVE-2023-24595

Milesight UR32L ys_thirdparty system_user_script OS command injection vulnerability

An OS command injection vulnerability exists in the user password modification functionality of the Milesight UR32L router. An attacker with valid credentials can execute arbitrary commands as a privileged user by supplying a crafted password containing shell metacharacters.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

High 7.2 View original

An OS command injection vulnerability exists in the ysthirdparty systemuserscript functionality of Milesight UR32L v32.3.0.5. A specially crafted series of network requests can lead to 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 password input is passed to a system() call without adequate sanitisation, allowing shell metacharacters to be interpreted as commands.

Impact

An attacker with valid credentials could execute arbitrary commands as a privileged user, potentially leading to full compromise of the device.

What the attacker needed

Valid credentials for the router console; target user must exist

How it was found

  1. Log in to the router console via telnet or SSH with valid credentials.
  2. Enter privileged mode with the enable command.
  3. Enter configuration mode with configure terminal.
  4. Enter the user_permission configuration mode.
  5. Run the user command to change a password, supplying a password that contains a shell command.

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 command-line interface for administrators. When an admin changes a user's password, the router builds a system command using that password without properly checking it. An attacker who can log in as an admin can put special characters in the password to run their own commands on the device.

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.