Planet WGR-500 formPingCmd stack-based buffer overflow vulnerabilities
The formPingCmd function in the Planet WGR-500 router copies user-supplied HTTP parameters into fixed-size stack buffers without checking length, causing stack-based buffer overflows. An attacker could exploit these to achieve arbitrary code execution.
Originally disclosed on Cisco Talos
Multiple stack-based buffer overflow vulnerabilities exist in the formPingCmd functionality of Planet WGR-500 v1.3411b190912. A specially crafted series of HTTP requests can lead to stack-based buffer overflow.
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 code uses sprintf and strcat to copy user-controlled request parameters into fixed-size stack buffers without any length checks.
Impact
An attacker could achieve arbitrary code execution on the device, potentially leading to full compromise.
What the attacker needed
Authentication (PR:L in CVSS)
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 space than it can hold, spilling over into nearby memory. Here, the router's web interface takes input from HTTP requests and copies it into small buffers without checking size, so an attacker can send oversized input to overwrite memory and potentially 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.