| عنوان | D-Link R95 (BE9500) R95A1_FW101B06 OS Command Injection |
|---|
| الوصف | The D-Link R95 (BE9500) Wi-Fi 7 router (firmware R95A1_FW101B06) runs /bin/ssi, the DHMAPI SOAP handler dispatched by lighttpd 1.4.71 via cgi.assign, as root. For the eight Bluetooth-family actions (GetBluetoothAdapterSettings, GetBluetoothBloodPressure, GetBluetoothDeviceList, GetBluetoothScanDeviceList, SetBluetoothAdapterSettings, SetBluetoothUnpairDevice, SetTriggerBluetoothScan, SetBluetoothPairDevice), /bin/ssi builds a command line at request-parse time as:
snprintf(buf, ..., "sh -c \"%s '%s'\"", helper_name, inner_xml);
system(buf);
where helper_name is selected by the API-ACTION header and inner_xml is the ENTIRE raw inner XML of the action element, copied with no escaping, no allow-list, and no length limit. A single apostrophe (') in any child element closes the single-quoted region and injects arbitrary commands executed as root. The sink lives in the action-family wrapper layer, so the parameter NAME does not matter: <A>x';id>/www/T1;#</A>, <Foo>...</Foo> and <Bar>...</Bar> all hit.
Reproducible request (post-login):
POST /DHMAPI/ with API-ACTION: SetTriggerBluetoothScan and body containing
<A>x';id >/www/T_bt;#</A>
A subsequent GET /T_bt returns "uid=0(root) gid=0(root)". The dhm_* helper scripts do not exist in this build, so the helper call fails and the request returns HTTP 500 — this does NOT mean the injection failed: ";" is unconditional sequencing and the injected command still runs. The marker file, not the status code, is the criterion.
Authentication: the DHMAPI action is rejected with HTTP 401 without a valid session (verified: removing the Cookie header yields 401 and no marker). The factory account "Admin" has an EMPTY password; the two-step HMAC-SHA256 challenge login (public key "withoutloginkey" hard-coded in the firmware JS) completes programmatically without any user interaction. This is a default-credential precondition, not an authentication bypass.
Verified end-to-end under qemu-arm chroot emulation of the official firmware image (2026-10-18). Only non-destructive commands (id/echo/uname/sleep) were used; no vendor cloud service was contacted. |
|---|
| المصدر | ⚠️ https://github.com/nenghun/IoT/blob/main/D-link%20R95/rce.md |
|---|
| المستخدم | nenghun (UID 102476) |
|---|
| ارسال | 24/10/2026 08:04 PM (1 شهر منذ) |
|---|
| الاعتدال | 24/11/2026 09:37 AM (1 month later) |
|---|
| الحالة | تمت الموافقة |
|---|
| إدخال VulDB | 442752 [D-Link R95 101B06 DHMAPI SOAP /bin/ssi inner_xml تجاوز الصلاحيات] |
|---|
| النقاط | 20 |
|---|