ZTE MF971R STK_PROCESS stack-based buffer overflow vulnerability
A stack-based buffer overflow in the STK_PROCESS API of the ZTE MF971R router allows an attacker to overwrite the return address and potentially achieve remote code execution. The attacker must provide a crafted URL to a logged-in victim, leveraging existing XSS and referer bypass techniques.
Originally disclosed on Cisco Talos
An exploitable Stack Based Buffer Overflow vulnerability exists in ZTE MF971R LTE router version wainnerversion:BDPLKPLMF971R1V1.0.0B06. A specially-crafted HTTP request can cause a stack-based buffer overflow and leads to remote code execution.
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 stk_content parameter is copied into a fixed-size stack buffer using memcpy without validating its length, leading to a stack-based buffer overflow.
Impact
An attacker could achieve remote code execution on the router, but the victim must be logged in and the attacker may need to leverage additional vulnerabilities such as XSS and referer bypass.
What the attacker needed
Victim logged in to web panel; attacker provides crafted URL; may require XSS and referer bypass
The fix
The vendor patched the vulnerability, likely by adding length validation for the stk_content parameter before copying it into the buffer.
How it was found
- The attacker crafts a URL containing the STK_PROCESS API with an overly long stk_content parameter.
- The attacker calculates a proper AD value and obtains the RD parameter, possibly using XSS and referer bypass.
- The attacker sends the crafted URL to a logged-in victim.
- The victim visits the URL, causing the router to process the request.
- The router's handler copies the stk_content into a fixed-size buffer, overflowing the stack.
- The overflow can overwrite the return address, potentially leading to remote code execution.
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 report describes a memory corruption bug in a router's web interface. When the router processes a special request containing a very long value, it copies that value into a fixed-size memory area without checking the length, causing data to spill over and crash the router. An attacker could use this to run their own code on the device, but the victim must be logged in and tricked into clicking a link.
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.