CVE-2026-21509 Microsoft Sentinel · KQL

Detect Microsoft Office Security Feature Bypass (CVE-2026-21509) in Microsoft Sentinel

Detects exploitation of CVE-2026-21509, a security feature bypass vulnerability in Microsoft Office classified under CWE-807 (Reliance on Untrusted Inputs in a Security Decision). This vulnerability is actively exploited in the wild (CISA KEV) and allows attackers to bypass security controls within Office applications, potentially enabling malicious document execution without expected security warnings or Protected View enforcement.

MITRE ATT&CK

Tactic
Initial Access Defense Evasion

KQL Detection Query

Microsoft Sentinel (KQL)
kusto
let timeWindow = 24h;
let suspiciousOfficeProcesses = dynamic(["WINWORD.EXE", "EXCEL.EXE", "POWERPNT.EXE", "OUTLOOK.EXE", "MSPUB.EXE", "VISIO.EXE", "ONENOTE.EXE"]);
let suspiciousChildProcesses = dynamic(["cmd.exe", "powershell.exe", "wscript.exe", "cscript.exe", "mshta.exe", "rundll32.exe", "regsvr32.exe", "certutil.exe", "bitsadmin.exe", "wmic.exe"]);
union DeviceProcessEvents, SecurityEvent
| where TimeGenerated >= ago(timeWindow)
| where (ActionType == "ProcessCreated" or EventID == 4688)
| extend ParentProcess = coalesce(InitiatingProcessFileName, ParentProcessName)
| extend ChildProcess = coalesce(FileName, NewProcessName)
| where ParentProcess in~ (suspiciousOfficeProcesses)
| where ChildProcess in~ (suspiciousChildProcesses)
| project TimeGenerated, DeviceName, AccountName, ParentProcess, ChildProcess, ProcessCommandLine, InitiatingProcessCommandLine, FolderPath
| union (
    DeviceFileEvents
    | where TimeGenerated >= ago(timeWindow)
    | where InitiatingProcessFileName in~ (suspiciousOfficeProcesses)
    | where FolderPath has_any ("\\Temp\\", "\\AppData\\Roaming\\", "\\AppData\\Local\\Temp\\")
    | where FileName endswith ".exe" or FileName endswith ".dll" or FileName endswith ".ps1" or FileName endswith ".vbs"
    | project TimeGenerated, DeviceName, AccountName = InitiatingProcessAccountName, ParentProcess = InitiatingProcessFileName, ChildProcess = FileName, ProcessCommandLine = InitiatingProcessCommandLine, InitiatingProcessCommandLine, FolderPath
)
| union (
    DeviceRegistryEvents
    | where TimeGenerated >= ago(timeWindow)
    | where InitiatingProcessFileName in~ (suspiciousOfficeProcesses)
    | where RegistryKey has_any ("DisableProtectedView", "MarkOfTheWeb", "TrustCenter", "Security")
    | project TimeGenerated, DeviceName, AccountName = InitiatingProcessAccountName, ParentProcess = InitiatingProcessFileName, ChildProcess = RegistryKey, ProcessCommandLine = InitiatingProcessCommandLine, InitiatingProcessCommandLine, FolderPath = RegistryKey
)
| summarize Count = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by DeviceName, AccountName, ParentProcess, ChildProcess
| where Count >= 1
| extend AlertSeverity = "High"
| extend CVE = "CVE-2026-21509"
high severity medium confidence

Detects Microsoft Office spawning suspicious child processes or writing executable content to temp directories, indicative of CVE-2026-21509 security feature bypass exploitation. Also monitors registry changes to Office trust/security keys initiated by Office processes.

Data Sources

Microsoft Defender for EndpointMicrosoft SentinelWindows Security Events

Required Tables

DeviceProcessEventsDeviceFileEventsDeviceRegistryEventsSecurityEvent

False Positives & Tuning

  • Legitimate macro-enabled Office documents used in business workflows that spawn approved scripts
  • IT automation tools using Office COM objects to generate reports via PowerShell
  • Third-party Office add-ins that legitimately write temporary executable content
  • Developer environments testing Office automation pipelines

Other platforms for CVE-2026-21509


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 1Office Protected View Bypass via Registry Modification

    Expected signal: Registry write events (Sysmon EventID 13) targeting HKCU\Software\Microsoft\Office\16.0\Word\Security with values DisableProtectedView and VBAWarnings modified

  2. Test 2Office Spawning PowerShell Child Process

    Expected signal: Sysmon EventID 1 / Windows EventID 4688 showing WINWORD.EXE as ParentImage and powershell.exe as child Image with encoded or suspicious command-line arguments

  3. Test 3Office Dropping Executable to Temp Directory

    Expected signal: Sysmon EventID 11 (FileCreate) showing an .exe file written to %TEMP% by an Office-related initiating process; DeviceFileEvents in MDE with InitiatingProcessFileName matching an Office executable

Unlock Pro Content

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

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections