| Titre | GearUP Portal Pte. Ltd. GearUP Hyperev Latest, there isn't any version label OS Command Injection |
|---|
| Description | 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 |
|---|
| Utilisateur | gioppy (UID 102262) |
|---|
| Soumission | 20/10/2026 14:31 (il y a 29 jours) |
|---|
| Modérer | 18/11/2026 21:05 (29 days later) |
|---|
| Statut | Accepté |
|---|
| Entrée VulDB | 439768 [GearUP Hyperev jusqu’à 20261020 WLAN Site Survey ld/utils.lua get_wlan_sitesurvey line élévation de privilèges] |
|---|
| Points | 17 |
|---|