D-Link R95 (BE9500) DHMAPI SetTimeSettings NTPServer Command Injection — CVE-2026-93958
Published: 2026-11-25 • Researcher: HackSpeak (mirror repo); original research and exploit by FoundTL (FoundTL/D-Link-R95-BE9500); CVE via VulDB
- Severity
- Critical
- CVE
- CVE-2026-93958
- Category
- web
- Affected product
- D-Link R95 (BE9500) Wi-Fi 7 Smart Router — web management DHMAPI backend /bin/ssi
- Affected versions
- Firmware BE9500_1.00.16 (per NVD description); upstream report tested firmware 1.01B06. NVD supplied no explicit product/version-range objects, so see references for the authoritative range.
- Disclosed
- 2026-11-25
- Patch status
- Unpatched
References
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-25 |
| Last Updated | 2026-09-20 |
| Author / Researcher | HackSpeak (mirror repo); original research and exploit by FoundTL (FoundTL/D-Link-R95-BE9500); CVE via VulDB |
| CVE / Advisory | CVE-2026-93958 |
| Category | web |
| Severity | Critical |
| CVSS Score | 9.1 (CVSSv3.1, per NVD/worklist; CVSSv4.0 8.5 and CVSSv2 8.3 per upstream report; vector not supplied in worklist data — see references) |
| Status | Weaponized |
| Tags | RCE, command-injection, authenticated, D-Link, router, SOAP, DHMAPI, embedded, root, IoT |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | D-Link R95 (BE9500) Wi-Fi 7 Smart Router — web management DHMAPI backend /bin/ssi |
| Versions Affected | Firmware BE9500_1.00.16 (per NVD description); upstream report tested firmware 1.01B06. NVD supplied no explicit product/version-range objects, so see references for the authoritative range. |
| Language / Platform | Target: embedded Linux (BusyBox ash) router firmware, DHMAPI over HTTPS on port 18443 or 443. Exploit: Python 3 with the requests library |
| Authentication Required | Yes — valid administrator web session plus HMAC-signed API-AUTH header |
| Network Access Required | Yes — HTTPS to the router management interface (LAN, or WAN if remote management is enabled) |
Summary
CVE-2026-93958 is an OS command injection in the D-Link R95 BE9500 Wi-Fi 7 router firmware. The SetTimeSettings SOAP handler in the root-running web management binary ssi copies the NTPServer field into the configuration database without validating shell metacharacters, and the value is later interpolated into a double-quoted shell command, so backticks or dollar-parenthesis sequences are evaluated as command substitution. An attacker holding a valid administrator session can therefore execute arbitrary commands as root and take full control of the device. The public exploit performs the login handshake, injects commands through the NTPServer field, and reads the output back from a file dropped in the web root.
Vulnerability Details
Root Cause
The DHMAPI SetTimeSettings handler in /bin/ssi (function at offset 0x6bd84 in firmware 1.01B06) copies the <NTPServer> SOAP element into a stack buffer capped at 0x3f (63) bytes and stores it verbatim into the internal configuration key time.value.NTPServer. The 63-byte cap is a buffer-size limit, not a security control: no filtering or escaping of shell metacharacters occurs. When the configuration is synchronised to UCI, ssi builds shell strings such as uci set %s="%s" > /dev/null and executes them through a system()-style call. Because the value is wrapped in double quotes, the shell still performs command substitution on embedded backticks and $(...), and because ssi runs as root the injected command inherits root privileges. The poisoned value also persists into ntpclient.@ntpserver[0].hostname and is later consumed unquoted by /bin/start_ntpclient.sh (ntpclient -s -h $HOSTNAME), a second-order gap.
Attack Vector
An authenticated attacker sends HTTPS POST requests to /DHMAPI/ with the SetTimeSettings SOAP action and a crafted <NTPServer> value such as `id > /www/m_id.txt`. Every request must carry a Cookie: uid=<session cookie> plus an API-AUTH: <UPPERHEX(HMAC-SHA256(privkey, ts+action))> <ts> header; the session and private key are obtained through the two-step DHMAPI Login exchange. The device does not validate the freshness of the timestamp, so a fixed ts value is reusable. The injected command runs synchronously while the request is handled, which is observable as a response delay for payloads such as `sleep 10`. Field length is the only practical constraint: values up to roughly 63 bytes are accepted and the ampersand character must be avoided.
Impact
Arbitrary command execution as uid=0(root) gid=0(root) on the router. The upstream research demonstrates a full root shell via a base64-fragmented reverse-shell script, and full device compromise allows reading of sensitive material such as /etc/rg_config/admin ciphertext and configuration backups, installation of persistent backdoors, and pivoting into the internal network. The upstream report notes at least seven further authenticated injection points in the same firmware (TZLocation, DeviceName, DDNS Hostname/Username, client NickName, and a second-order issue via SetNetworkSettings).
Environment / Lab Setup
OS: Any Linux host for the exploit; target is the router firmware itself
Target: D-Link R95 (BE9500), firmware BE9500_1.00.16 / 1.01B06,
management UI at https://<device-ip>:18443 (443 on a real device)
Attacker: Python 3.8+ with requests; same LAN as the device
Tools: Python 3, requests, curl, a listener such as nc for the reverse shellSetup Steps
| |
Because the vulnerability lives in the vendor firmware’s /bin/ssi, no public container or firmware image is bundled with this entry; a physical or emulated device is required. The upstream report is the authoritative lab description.
Proof of Concept
Step-by-Step Reproduction
- Obtain the login challenge — POST to
/DHMAPI/withAPI-ACTION: Login, aLoginbody carryingAction=requestand the username, signed with the staticwithoutloginkeystring. The response returnsChallenge,Cookie,PublicKeyandSaltHash. - Complete authentication — derive
privkey = UPPERHEX(HMAC-SHA256(key = PublicKey + e, msg = Challenge)), wheree = base64(PBKDF2-HMAC-SHA256(password, SaltHash, 5000, 32))(or the plain password whenSaltHashis absent), then sendAction=loginwithLoginPassword = UPPERHEX(HMAC-SHA256(privkey, Challenge)). Expect<LoginResult>success</LoginResult>. - Inject the command — send a
SetTimeSettingsrequest whose<NTPServer>value contains a backtick-wrapped command that redirects its output into the web root, e.g.`id > /www/m_id.txt`, withCookie: uid=<session cookie>and a validAPI-AUTHheader for the action. - Retrieve the output — GET
https://<device>/m_id.txtwith a browser-like User-Agent and Referer; the body contains the command output. - Optional reverse shell — because the field is limited to about 63 bytes, write a script in base64 fragments with repeated
echo -n <fragment> >> /tmp/xinjections, decode it withbase64 -d, and trigger it withsh.
Exploit Code
See
exploit_r95_ntpserver.py(the upstream EXP extracted from the report). The full upstream write-up is inupstream-analysis.mdand the mirror’s notes inupstream-README.md.
| |
Usage of the archived exploit:
| |
Expected Output
| |
Detection & Indicators of Compromise
- HTTPS POSTs to
/DHMAPI/withAPI-ACTION: SetTimeSettingswhose<NTPServer>value contains backticks,$(,;,|,>,sleep,wget,ncorbase64. - New or unexpected files in the web root (
/www), for examplem_id.txt,e, orxstyle names, followed by direct GET requests for them from the same client. - Requests to
/DHMAPI/that reuse the same millisecond timestamp across many actions, or a burst ofSetTimeSettingscalls appending base64 fragments to/tmp/x. - Configuration state showing shell metacharacters in
ntpclient.@ntpserver[0].hostnameortime.value.NTPServer, andstart_ntpclient.shinvocations with a suspicious hostname. - Outbound reverse-shell connections from the router to unusual external addresses and ports, or unexpected listening processes on the device.
- Router log entries for successful administrator logins from untrusted sources, especially repeated Login
request/loginpairs before a configuration change.
SIEM / IDS rule (example):
| |
Remediation
| Action | Detail |
|---|---|
| Patch | Apply the fixed D-Link R95/BE9500 firmware once published; confirm the version against D-Link’s advisory for CVE-2026-93958 (see references). No fixed build was confirmed in the ingested data. |
| Workaround | Disable WAN/remote management and restrict the management interface to a trusted LAN segment; rotate the administrator password and avoid default credentials, which the upstream report notes amplify the impact. |
| Config Hardening | Enforce strict allow-list validation ([A-Za-z0-9.-]) on hostname-type fields before storage, replace system() string concatenation with the libuci API or exec* calls, quote $HOSTNAME in /bin/start_ntpclient.sh, run the web management service with reduced privileges, and monitor for unexpected files in the web root. |
References
Notes
Auto-ingested from https://github.com/HackSpeak/CVE-2026-93958 on 2026-11-25. Review verdict: a genuine weaponized exploit, not a detector — the repository contains a complete Python EXP (login handshake, HMAC-signed requests, command injection, output retrieval and base64 chunking for long commands) plus a detailed upstream technical report; the exploit was not executed during ingestion.
License: MIT (HackSpeak, 2026), with attribution to the original researcher FoundTL. Limitations: exploitation requires valid administrator credentials and network access to the management interface, so it is post-authentication; the NTPServer field is limited to roughly 63 bytes and the ampersand character must be avoided; the upstream report also warns that the device does not validate API-AUTH timestamp freshness, which is itself a weakness. No fixed firmware version was confirmed from the ingested data, so the patch status should be verified with the vendor. The five upstream PNG screenshots and the report’s image references were not copied (only source and documentation files were archived), and the target device was not available for independent verification.
| |