Skip to content
Memory corruption Advisory Advanced CVE-2023-25091CVE-2023-25107CVE-2023-25113CVE-2023-25120CVE-2023-25122CVE-2023-25082CVE-2023-25095CVE-2023-25117CVE-2023-25121CVE-2023-25115CVE-2023-25118CVE-2023-25124CVE-2023-25101CVE-2023-25123CVE-2023-25102CVE-2023-25084CVE-2023-25093CVE-2023-25097CVE-2023-25103CVE-2023-25096CVE-2023-25090CVE-2023-25085CVE-2023-25106CVE-2023-25104CVE-2023-25086CVE-2023-25088CVE-2023-25105CVE-2023-25112CVE-2023-25089CVE-2023-25098CVE-2023-25081CVE-2023-25094CVE-2023-25100CVE-2023-25110CVE-2023-25109CVE-2023-25099CVE-2023-25119CVE-2023-25083CVE-2023-25087CVE-2023-25116CVE-2023-25092CVE-2023-25108CVE-2023-25111CVE-2023-25114

Milesight UR32L vtysh_ubus sprintf pattern buffer overflow vulnerabilities

Multiple stack-based buffer overflows exist in the vtysh_ubus binary of Milesight UR32L v32.3.0.5 because user-controlled JSON values are passed to sprintf without length checks. An authenticated high-privilege attacker can send crafted HTTP requests to crash the service and potentially execute arbitrary code.

Francesco Benvenuto Follow

Originally disclosed on Cisco Talos

High 7.2 View original

Multiple buffer overflow vulnerabilities exist in the vtyshubus binary of Milesight UR32L v32.3.0.5 due to the use of an unsafe sprintf pattern. A specially crafted HTTP request can lead to arbitrary code 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 vtysh_ubus binary uses sprintf to copy user-supplied JSON string values into a fixed-size stack buffer without bounds checking.

Impact

An attacker with high privileges could crash the vtysh_ubus service and potentially execute arbitrary code on the router.

What the attacker needed

High-privilege authenticated user; network access to the router's web interface

How it was found

  1. Send a POST request to the /cgi endpoint with JSON data containing a core, function, and values.
  2. Include a value field with a long string (e.g., 0x300 bytes) for a vulnerable key such as src, dmz, old_ip, old_mac, ip, mac, description, to_dst, dport, to_dport, interface, class_name, rule_name, or attach_class.
  3. The vtysh_ubus binary parses the JSON and passes the string to sprintf, causing a buffer overflow.

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.

A buffer overflow happens when a program writes more data into a fixed-size memory area than it can hold, corrupting nearby memory. Here, the router's web interface takes long text from a logged-in admin and copies it into a small buffer without checking the length, which can crash the router or let an attacker run their own code.

What is Memory corruption?

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.

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.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.