| 제목 | GearUP Portal Pte. Ltd. GearUP Hyperev Latest, there isn't any version label OS Command Injection |
|---|
| 설명 | After the vuln found in: Submit #1045341
You can overwrite /tmp/login.txt (or read the /tmp/factory_info.txt) and be logged as admin of the webserver, by that there's an OS Command Injection in an endpoint following this path:
- (ld/utils.lua:126)
function is_login()
local mac = cgi.get_mac()
for lin in io.lines("/tmp/login.txt") do
if lin:match(mac) then
pprint("true")
return true
end
end
pprint("false")
return false
end
- (ld/uu.lua:96)
['GET /wlan/sitesurvey'] = ldapis.get_wlan_sitesurvey, -- 20. 获取扫描WIFI
- (ld/apis.lua:370)
function get_wlan_sitesurvey()
return 0, "success", ldutils.get_wlan_sitesurvey()
end
- (ld/utils.lua:1716)
function get_wlan_sitesurvey()
-- ..
for index, ifname in ipairs({"ra0", "rax0"}) do
local scanlist = util.execi("iwpriv " .. ifname .. " get_site_survey")
for line in (scanlist or {}) do
v = survey_format(line)
-- ..
end
- (ld/utils.lua:1734)
function survey_format(line)
-- ..
if line and line ~= "" then
local ssid, bssid, security, signal, mode, extch, nt, wps, dpid, match
local channel = 0
line = util.exec('echo "' .. line .. '" | tr -s " " | tr -d "\n"')
-- ..
end
as you can see, in the last snippet of code there's an unsanitized line variable that contains SSID (and other information) of the near available networks, by that if you make a GET request to /api/wlan/sitesurvey you can inject an OS command.
I know is an authenticated endpoint but as you can see in the first snippet the login is that you need to have the MAC written in the /tmp/login.txt that is possible from the vuln i reported before in Submit #1045341 |
|---|
| 사용자 | gioppy (UID 102262) |
|---|
| 제출 | 2026. 10. 20. PM 02:31 (29 날 ago) |
|---|
| 모더레이션 | 2026. 11. 18. PM 09:05 (29 days later) |
|---|
| 상태 | 수락 |
|---|
| VulDB 항목 | 439768 [GearUP Hyperev 까지 20261020 WLAN Site Survey ld/utils.lua get_wlan_sitesurvey line 권한 상승] |
|---|
| 포인트들 | 17 |
|---|