CVE-2026-21519 Microsoft Sentinel · KQL

Detect Microsoft Windows Type Confusion Vulnerability (CVE-2026-21519) in Microsoft Sentinel

Detects exploitation of CVE-2026-21519, a type confusion vulnerability (CWE-843) in Microsoft Windows. Type confusion vulnerabilities occur when code allocates or initializes a resource using one type but accesses it using an incompatible type, leading to out-of-bounds memory access, arbitrary code execution, or privilege escalation. This CVE is listed on the CISA Known Exploited Vulnerabilities catalog, indicating active exploitation in the wild.

MITRE ATT&CK

Tactic
Privilege Escalation Defense Evasion Execution

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
union SecurityEvent, DeviceProcessEvents, DeviceEvents
| where TimeGenerated >= ago(7d)
| where (EventID in (4688, 4697, 7045) or ActionType in ("ProcessCreated", "DriverLoad", "ImageLoaded"))
| extend ProcessCmdLine = coalesce(CommandLine, ProcessCommandLine, "")
| extend ParentProcessName = coalesce(ParentProcessName, InitiatingProcessFileName, "")
| where (
    (EventID == 4688 and ProcessCmdLine has_any ("SeDebugPrivilege", "SeImpersonatePrivilege", "SeAssignPrimaryTokenPrivilege"))
    or (ActionType == "DriverLoad" and not(InitiatingProcessFileName has_any ("MsMpEng.exe", "services.exe", "wininit.exe")))
    or (ActionType == "ProcessCreated" and InitiatingProcessFileName in~ ("lsass.exe", "winlogon.exe", "csrss.exe") and not(FileName in~ ("conhost.exe", "werfault.exe")))
    or (EventID == 4697 and ServiceFileName has_any (".tmp", "\\AppData\\", "\\Temp\\"))
)
| extend RiskScore = case(
    ActionType == "DriverLoad" and not(InitiatingProcessFileName has_any ("MsMpEng.exe", "services.exe")), 90,
    ActionType == "ProcessCreated" and InitiatingProcessFileName in~ ("lsass.exe", "winlogon.exe"), 85,
    EventID == 4697 and ServiceFileName has_any (".tmp", "\\AppData\\"), 80,
    60
)
| project TimeGenerated, Computer, AccountName, ProcessName = coalesce(NewProcessName, FileName, ""), ParentProcessName, ProcessCmdLine, ActionType, EventID, RiskScore
| sort by RiskScore desc, TimeGenerated desc
critical severity medium confidence

Detects indicators of Windows type confusion exploitation including abnormal privilege token manipulation, suspicious driver loads from non-system processes, unusual child processes spawned by protected system processes, and services installed from temporary locations.

Data Sources

Microsoft SentinelMicrosoft Defender for EndpointWindows Security Events

Required Tables

SecurityEventDeviceProcessEventsDeviceEvents

False Positives & Tuning

  • Legitimate driver installations from third-party security software or hardware vendors
  • System administrators manually installing services or drivers for maintenance
  • Software update processes temporarily writing executables to AppData or Temp directories
  • Debugging tools legitimately requesting SeDebugPrivilege during authorized testing

Other platforms for CVE-2026-21519


Testing Methodology

Validate this detection against 4 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 1Simulate Anomalous Child Process from Winlogon

    Expected signal: Sysmon EventID 1 showing cmd.exe or similar process with an unexpected parent, Windows Security EventID 4688 capturing the new process creation with command line arguments.

  2. Test 2Privilege Token Enumeration via Command Line

    Expected signal: Windows Security EventID 4688 with CommandLine containing privilege-related arguments, Sysmon EventID 1 capturing the full process creation with integrity level.

  3. Test 3Suspicious Service Installation from Temp Directory

    Expected signal: Windows System EventID 7045 (new service installed) with ServiceImagePath pointing to %TEMP%, Sysmon EventID 13 capturing registry writes for the new service key under HKLM\SYSTEM\CurrentControlSet\Services.

  4. Test 4Unsigned Driver Load Simulation via Sysmon

    Expected signal: Sysmon EventID 6 (DriverLoad) with the ImageLoaded path pointing to a non-standard location and the initiating process being a user-mode application rather than services.exe or wininit.exe.

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections