Skip to content
RCE Advisory Intermediate CVE-2023-22299

Milesight UR32L vtysh_ubus _get_fw_logs OS command injection vulnerability

The Milesight UR32L router's vtysh_ubus _get_fw_logs function passes a user-supplied command parameter directly into a shell command via popen, allowing an authenticated attacker to execute arbitrary OS commands. An attacker can send a crafted network request to the /cgi endpoint to trigger command execution.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

High 8.8 View original

An OS command injection vulnerability exists in the vtyshubus getfwlogs functionality of Milesight UR32L v32.3.0.5. A specially crafted network request 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 application constructs a shell command string using unsanitised user input and executes it with popen, without validating or escaping special characters.

Impact

An authenticated attacker could execute arbitrary OS commands on the router, potentially leading to full compromise.

What the attacker needed

Authentication to the router's web interface

How it was found

  1. Send a request to the /cgi endpoint with core set to yruo_debug_firewall and function set to get.
  2. Include a values array with base set to firewall_log and a command parameter containing the desired iptables arguments or injected commands.
  3. The router executes the constructed iptables command via popen, running any injected commands.

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 web interface that lets logged-in users run diagnostic commands. The software takes a value from the user and inserts it into a system command without checking it, so an attacker can add extra commands that the router will run with high privileges.

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.