| عنوان | Panabit Panabit Smart Application Gateway TANGr7p10 OS Command Injection |
|---|
| الوصف | In Panabit Smart Application Gateway firmware TANGr7p10, ipe_httpd spawns all shell CGIs as root and exports every request parameter verbatim as a CGI_<name> environment variable. Multiple CGIs use these variables directly as local file paths with no canonicalization, no whitelist, and no ".." filtering:
Write sink — admin/cgi-bin/sac/ajax_sac_ap, import_upgrde(), line 766:
mv ${CGI_file} ${DATAPATH}/sac/${CGI_filename}
Both parameters are attacker-controlled: "file" decides WHAT is written, "filename" decides WHERE (../ traversal). A single multipart request completes a root arbitrary file write. Line 771 then sources . /${PGETC}/ifadmin.conf on the next request.
Delete sink — admin/cgi-bin/system/ajax_modkey, upload_modkey():
license=`cat ${CGI_file}` (line 57, arbitrary path read / existence oracle)
rm -rf ${CGI_file} (line 63, root arbitrary file/directory deletion)
Honest constraint: the written file is always 0644 (mv preserves the httpd temp file's mode), so a dropped CGI is NOT directly executable (GET returns 500). RCE is realized through the "write config -> source'd by a root CGI" chain, because source does not require the executable bit: overwrite ifadmin.conf via filename=../../panaetc/ifadmin.conf, then any ordinary request (e.g. action=list_sac_ap) triggers the source and executes the injected commands as root.
The CGI_file variable family appears in 36 scripts under admin/cgi-bin/; only two (system/ajax_sys_log, common/ajax_download) implement a dirname whitelist — consistent with an incomplete fix.
Verified end-to-end against the real ipe_httpd (HTTPS 18443): marker file contains uid=0(root) gid=0(root). Only non-destructive commands were used; all planted artifacts were cleaned up. |
|---|
| المصدر | ⚠️ https://github.com/nenghun/IoT/blob/main/Panabit/rce4/Authenticated%20arbitrary%20file%20writedelete%20_rce.md |
|---|
| المستخدم | nenghun (UID 102476) |
|---|
| ارسال | 24/10/2026 08:18 PM (1 شهر منذ) |
|---|
| الاعتدال | 24/11/2026 09:40 AM (1 month later) |
|---|
| الحالة | تمت الموافقة |
|---|
| إدخال VulDB | 442756 [Panabit Smart Application Gateway TANGr7p10 CGI Backend ajax_sac_ap import_upgrde/upload_modkey file/filename اجتياز الدليل] |
|---|
| النقاط | 20 |
|---|