CVE-2026-65660

Microsoft SharePoint Code Injection (CVE-2026-65660) Exploitation

Initial Access Execution Last updated:

Detects exploitation of CVE-2026-65660, a code injection vulnerability (CWE-94) in Microsoft SharePoint Server that is listed in CISA KEV as actively exploited. Successful exploitation allows an attacker to inject and execute arbitrary code in the SharePoint application context, typically observed as the SharePoint IIS worker process (w3wp.exe) spawning command interpreters or writing web shells (e.g., .aspx/.ashx) into layouts/upload directories. This detection surfaces anomalous child process creation from SharePoint worker processes, suspicious file writes to SharePoint web-accessible paths, and injection indicators in SharePoint/IIS logs across multiple SIEM dialects.

Vulnerability Intelligence

KEV — Known Exploited

What is CVE-2026-65660 Microsoft SharePoint Code Injection (CVE-2026-65660) Exploitation?

Microsoft SharePoint Code Injection (CVE-2026-65660) Exploitation (CVE-2026-65660) 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 Microsoft SharePoint Code Injection (CVE-2026-65660) Exploitation, covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, DeviceProcessEvents. The queries below are rated critical severity at high 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
let sharepointProcs = dynamic(["w3wp.exe", "owstimer.exe"]);
let suspiciousChildren = dynamic(["cmd.exe", "powershell.exe", "powershell_ise.exe", "pwsh.exe", "csc.exe", "cscript.exe", "wscript.exe", "mshta.exe", "certutil.exe", "bitsadmin.exe"]);
DeviceProcessEvents
| where InitiatingProcessFileName in~ (sharepointProcs)
| where FileName in~ (suspiciousChildren)
| where isnotempty(ProcessCommandLine)
| project TimeGenerated, DeviceName, AccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, InitiatingProcessAccountName
| order by TimeGenerated desc

Identifies SharePoint IIS worker (w3wp.exe) or timer service spawning command interpreters or code-compilation tools, a strong indicator of CVE-2026-65660 code injection leading to command execution or web shell deployment.

critical severity high confidence

Data Sources

Microsoft Defender for Endpoint DeviceProcessEvents

Required Tables

DeviceProcessEvents

False Positives

  • Legitimate SharePoint solution deployments (SPSolution) that invoke csc.exe during on-the-fly ASP.NET compilation
  • Administrative maintenance scripts launched via SharePoint scheduled jobs
  • Monitoring or backup agents that legitimately spawn helper processes under the SharePoint app pool identity

Sigma rule & cross-platform mapping

The detection logic for Microsoft SharePoint Code Injection (CVE-2026-65660) Exploitation (CVE-2026-65660) 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: process_creation
  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 available with Pro.

  1. Test 1SharePoint worker spawns command interpreter

    Expected signal: Sysmon Event ID 1 / DeviceProcessEvents showing w3wp.exe as parent of cmd.exe with a whoami command line.

  2. Test 2Simulated web shell write to layouts directory

    Expected signal: Sysmon Event ID 11 / DeviceFileEvents showing .aspx creation in a LAYOUTS path.

  3. Test 3PowerShell compilation via csc invocation

    Expected signal: Process creation event for csc.exe with a /out compilation command line.


Response Playbook

Triage

  1. Confirm the source host is a SharePoint Server and identify the app pool identity of the initiating w3wp.exe process.
  2. Review the full command line of the spawned child process (cmd/powershell/csc) and any encoded or base64 payloads for malicious intent.
  3. Correlate the process event timing with IIS/SharePoint ULS logs for the corresponding inbound request (URL, ToolPane.aspx, /_layouts/ paths) to identify the injection vector.
  4. Determine whether a web shell (.aspx/.ashx) was written to a web-accessible directory such as LAYOUTS or the site content directories.

Containment

  1. Isolate the affected SharePoint server from the network to prevent lateral movement and data exfiltration.
  2. Recycle/stop the affected IIS application pool and quarantine any identified web shell files.
  3. Rotate the SharePoint machine keys (ValidationKey/DecryptionKey) and service account credentials, since KEV exploitation of this class often involves key theft for persistent forgery.

Evidence Collection

  1. Preserve IIS logs, SharePoint ULS logs, and Sysmon/EDR process telemetry from the affected server.
  2. Capture copies of any suspicious files written to /_layouts/, TEMPLATE, or content directories along with their file hashes and timestamps.
  3. Export the memory and disk image of the SharePoint worker process if advanced forensic analysis is required.

Escalation Criteria

  • ! Escalate to incident response immediately if a web shell is confirmed or if the child process executed reconnaissance, credential access, or lateral movement commands.
  • ! Escalate to CISA/regulatory reporting if the asset is in scope for BOD 26-04 or handles regulated data.
  • ! Escalate if machine key material or service account credentials are suspected compromised, requiring farm-wide key rotation.

Investigation Guide

Forensic Artifacts

  • > New or modified .aspx/.ashx files in /_layouts/, TEMPLATE, or content directories
  • > IIS access log entries for anomalous POST requests to SharePoint endpoints (e.g., ToolPane.aspx)
  • > Sysmon Event ID 1 records showing w3wp.exe as parent of interpreter/compiler processes
  • > SharePoint ULS log correlation entries around the exploitation timeframe

Tuning Guidance

Baseline legitimate csc.exe activity from ASP.NET runtime compilation and exclude the specific SharePoint temporary compilation paths to reduce noise. Whitelist known SharePoint deployment/maintenance jobs and their command lines. Prioritize alerts where the child process command line contains encoded payloads, network utilities, or file writes to web-accessible directories, and where the initiating request path matches known SharePoint exploitation endpoints.


Hunting Queries

Hunts for web shell files written into SharePoint web-accessible directories by the IIS worker process, a hallmark of post-exploitation persistence for CVE-2026-65660.

Hunting — KQL
kql
DeviceFileEvents | where InitiatingProcessFileName =~ "w3wp.exe" | where FolderPath has_any ("\\TEMPLATE\\LAYOUTS\\", "\\wwwroot\\") | where FileName endswith ".aspx" or FileName endswith ".ashx" | project TimeGenerated, DeviceName, FolderPath, FileName, InitiatingProcessAccountName
Hunting — SPL
spl
index=windows sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=11 Image="*\\w3wp.exe" (TargetFilename="*\\LAYOUTS\\*" OR TargetFilename="*\\wwwroot\\*") (TargetFilename="*.aspx" OR TargetFilename="*.ashx") | table _time host TargetFilename User

Atomic Red Team Tests

Test 1 SharePoint worker spawns command interpreter
windows

Simulates code injection outcome by having a process named like the SharePoint worker spawn cmd.exe to run reconnaissance.

Command

powershell
copy C:\Windows\System32\cmd.exe %TEMP%\w3wp.exe & %TEMP%\w3wp.exe /c "whoami & hostname"

Cleanup

powershell
del %TEMP%\w3wp.exe

Expected Telemetry

Sysmon Event ID 1 / DeviceProcessEvents showing w3wp.exe as parent of cmd.exe with a whoami command line.

Expected Detection

KQL/SPL/EQL process rules fire on SharePoint-worker-named parent spawning cmd.exe.

Test 2 Simulated web shell write to layouts directory
windows

Writes a benign .aspx file into a simulated SharePoint LAYOUTS path to test web shell file-write detection.

Command

powershell
mkdir "C:\Temp\TEMPLATE\LAYOUTS" 2>nul & echo ^<%@ Page Language="C#" %^> > "C:\Temp\TEMPLATE\LAYOUTS\test_shell.aspx"

Cleanup

powershell
del "C:\Temp\TEMPLATE\LAYOUTS\test_shell.aspx"

Expected Telemetry

Sysmon Event ID 11 / DeviceFileEvents showing .aspx creation in a LAYOUTS path.

Expected Detection

Hunting query for .aspx writes to SharePoint web-accessible directories fires.

Test 3 PowerShell compilation via csc invocation
windows

Simulates dynamic code injection by invoking csc.exe to compile arbitrary code, mimicking runtime code-injection behavior.

Command

powershell
echo public class T{public static void Main(){System.Console.WriteLine("t");}} > %TEMP%\t.cs & "%WINDIR%\Microsoft.NET\Framework64\v4.0.30319\csc.exe" /out:%TEMP%\t.exe %TEMP%\t.cs

Cleanup

powershell
del %TEMP%\t.cs %TEMP%\t.exe

Expected Telemetry

Process creation event for csc.exe with a /out compilation command line.

Expected Detection

Detection fires when csc.exe is spawned in the context of the SharePoint worker process.

Related Detections