CVE-2026-41940 Microsoft Sentinel · KQL

Detect CVE-2026-41940: WebPros cPanel & WHM / WP2 Missing Authentication for Critical Function in Microsoft Sentinel

CVE-2026-41940 is an actively exploited missing authentication vulnerability (CWE-306) in WebPros cPanel & WHM and WP2 (WordPress Squared). Unauthenticated remote attackers can invoke critical administrative functions without valid credentials, enabling account takeover, malicious plugin installation, privilege escalation, and full server compromise. This vulnerability is listed in CISA's Known Exploited Vulnerabilities catalog.

MITRE ATT&CK

Tactic
Initial Access Privilege Escalation Persistence

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
union isfuzzy=true
(
    W3CIISLog
    | where csUriStem has_any ("/cpsess", "/json-api", "/execute", "/wp-json", "/xmlapi")
      and (csMethod == "POST" or csMethod == "GET")
      and (csUriStem has_any ("createacct", "removeacct", "passwd", "addpkg", "suspendacct", "unsuspendacct", "installplugin", "createuser"))
      and (sc_status between (200 .. 299) or sc_status == 301)
      and isempty(csUsername) or csUsername == "-"
    | extend TargetHost = csHost, AttackerIP = cIP, RequestPath = csUriStem, ResponseCode = sc_status
    | project TimeGenerated, AttackerIP, TargetHost, RequestPath, ResponseCode, csMethod, csUserAgent
),
(
    AzureDiagnostics
    | where Category == "ApplicationGatewayAccessLog"
      and requestUri_s has_any ("/json-api", "/execute", "/xmlapi", "/wp-json")
      and requestUri_s has_any ("createacct", "passwd", "installplugin", "addpkg")
      and httpStatus_d between (200 .. 299)
    | extend AttackerIP = clientIP_s, RequestPath = requestUri_s, ResponseCode = httpStatus_d
    | project TimeGenerated, AttackerIP, RequestPath, ResponseCode
)
| summarize RequestCount = count(), DistinctPaths = dcount(RequestPath), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by AttackerIP
| where RequestCount >= 1
| extend RiskScore = iif(RequestCount >= 5, "High", "Medium")
| sort by RequestCount desc
critical severity medium confidence

Detects unauthenticated HTTP requests targeting cPanel & WHM and WP2 critical administrative API endpoints (createacct, passwd, installplugin, etc.) without valid session credentials, indicative of CVE-2026-41940 exploitation.

Data Sources

IIS Web LogsAzure Application GatewayWAF Logs

Required Tables

W3CIISLogAzureDiagnostics

False Positives & Tuning

  • Automated monitoring or uptime checks hitting cPanel health endpoints without authentication headers
  • Legitimate cPanel API integrations using token-based auth that do not populate csUsername field in IIS logs
  • Internal provisioning automation scripts that appear unauthenticated in web tier but authenticate at the application layer

Other platforms for CVE-2026-41940


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 available with Pro.

  1. Test 1CVE-2026-41940 Unauthenticated cPanel Account Creation via JSON API

    Expected signal: HTTP POST request to /json-api/createacct on port 2086 with HTTP 200 response and no Authorization header in web server access logs; corresponding cPanel audit log entry for account creation

  2. Test 2CVE-2026-41940 Unauthenticated Password Change via WHM XMLAPI

    Expected signal: HTTP GET request to /xmlapi/passwd on port 2086 with HTTP 200 response visible in cPanel access logs; no session cookie or API token in request headers; cPanel audit log records password change event

  3. Test 3CVE-2026-41940 Unauthenticated WP2 Plugin Installation via WordPress REST API

    Expected signal: HTTP GET and POST requests to /wp-json/wp/v2/plugins with HTTP 200/201 responses in web server access logs; WordPress debug log records plugin installation event; file system activity shows new directory creation under wp-content/plugins/

Unlock Pro Content

Get the full detection package for CVE-2026-41940 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections