9.8 CVSS v3.1 Score
CRITICAL Severity
SYSTEM Execution Context
Jul 2025 Patch Available

01 Overview

On 19–20 July 2025, Microsoft and CISA jointly confirmed active zero-day exploitation of CVE-2025-53770, a critical unauthenticated remote code execution vulnerability in on-premises Microsoft SharePoint Server. The vulnerability was being exploited in the wild before Microsoft had even published an advisory — a textbook zero-day scenario.

The flaw is the second iteration of what researchers call the "ToolShell" exploit chain — named after ToolPane.aspx, a SharePoint management endpoint that serves as the attack entry point. ToolShell was originally demonstrated at the Pwn2Own Berlin competition in May 2025 by Viettel Cyber Security, which chained two SharePoint vulnerabilities (CVE-2025-49704 and CVE-2025-49706) to achieve unauthenticated RCE. Microsoft patched those in their July 2025 Patch Tuesday rollout — but within ten days, attackers had found a bypass, and CVE-2025-53770 was born.

🚨
Why this matters immediately CVE-2025-53770 requires zero authentication, zero user interaction, and zero special configuration to exploit. An attacker with network access to your SharePoint server can achieve SYSTEM-level code execution in seconds. CISA added it to the Known Exploited Vulnerabilities catalog the same day Microsoft confirmed the bug, with a mandatory remediation deadline. Ransomware groups including Warlock have been linked to active exploitation campaigns.

In this writeup, Grey Shield's research team breaks down the complete two-bug exploit chain — the authentication bypass mechanism, the deserialization flaw, web shell deployment, observed attacker post-exploitation behavior, detection rules you can deploy today, and the exact remediation steps to take right now.

02 Background: From Pwn2Own to Mass Exploitation

To understand CVE-2025-53770, it helps to understand its predecessor. In May 2025 at Pwn2Own Berlin, researchers from Viettel Cyber Security chained two SharePoint vulnerabilities for the first time and named the chain ToolShell:

Microsoft patched both vulnerabilities on 8 July 2025 as part of the July Patch Tuesday release. The security community collectively exhaled — briefly. Within ten days, Eye Security observed real-world compromises using fresh bypasses of the two patched bugs. Microsoft assigned the bypass variants new CVE identifiers: CVE-2025-53770 (the deserialization bypass) and CVE-2025-53771 (the auth bypass variant).

May 2025 — Pwn2Own Berlin
Viettel Cyber Security demonstrates the original ToolShell chain (CVE-2025-49704 + CVE-2025-49706), achieving unauthenticated RCE on SharePoint. Chain named "ToolShell."
8 July 2025 — Patch Tuesday
Microsoft ships fixes for CVE-2025-49704 and CVE-2025-49706. Organizations begin patching.
~13 July 2025
PoC code demonstrating the original chain posted publicly on X (formerly Twitter). Active scanning begins within hours.
18 July 2025 — Zero-Day Exploitation Begins
Eye Security detects a malicious .aspx payload linked to a suspicious process chain in an endpoint alert on a legacy on-premises SharePoint server. The patch has been bypassed.
19–20 July 2025 — Microsoft Confirms & CISA Acts
Microsoft acknowledges active exploitation, assigns CVE-2025-53770 and CVE-2025-53771. CISA adds to KEV catalog the same day. Emergency patches released.
Late July 2025 — Ransomware Campaigns Confirmed
Microsoft publicly attributes ToolShell exploitation activity to Chinese state-sponsored actors, and ransomware groups including Warlock are confirmed to be leveraging the chain for initial access.

03 Affected Versions

CVE-2025-53770 exclusively affects on-premises SharePoint Server deployments. SharePoint Online (Microsoft 365) is completely unaffected — the vulnerability is in the on-premises codebase. EOL versions (SharePoint 2010 and 2013) are also vulnerable, but Microsoft has not released patches for them.

SharePoint Version Status Action Required
SharePoint Server 2010 VULNERABLE · EOL No patch. Take offline or isolate from internet immediately.
SharePoint Server 2013 VULNERABLE · EOL No patch. Take offline or isolate from internet immediately.
SharePoint Server 2016 VULNERABLE Apply July 2025 CU immediately. Patch available.
SharePoint Server 2019 VULNERABLE Apply July 2025 CU immediately. Patch available.
SharePoint Server Subscription Edition VULNERABLE Apply July 2025 CU immediately. Patch available.
SharePoint Online (Microsoft 365) NOT AFFECTED No action required. Cloud-hosted instances are safe.
ℹ️
Check your exposure in 60 seconds Run Get-SPFarm | Select-Object BuildVersion in SharePoint Management Shell. Cross-reference the build number against Microsoft's July 2025 CU release page. If your build is older than the July 2025 Cumulative Update, you are vulnerable. EOL versions show no build update path — they must be isolated.

04 Technical Deep Dive: The Two-Bug Chain

Bug 1 — Authentication Bypass via Referer Header Forgery (CVE-2025-53771)

The authentication bypass exploits a logic flaw in how SharePoint validates the origin of requests made to privileged management endpoints. When SharePoint processes a request, it performs a lightweight check of the HTTP Referer header to determine whether the request is coming from within a legitimate SharePoint session.

The flaw: if the Referer header is set to /_layouts/SignOut.aspx, SharePoint's request-handling logic treats the incoming request as originating from a valid session context — specifically, it coerces the server into executing embedded commands associated with the management endpoint. The server is tricked into treating an unauthenticated external request as if it were initiated by an authenticated internal user.

HTTP — Authentication bypass request skeleton
# Attacker crafts a POST to SharePoint's ToolPane management endpoint
POST /_layouts/15/ToolPane.aspx?DisplayMode=Edit&a=/ToolPane.aspx HTTP/1.1
Host: sharepoint.target.internal
Content-Type: application/x-www-form-urlencoded
Referer: https://sharepoint.target.internal/_layouts/SignOut.aspx
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) ...
Content-Length: [payload_size]

# The forged Referer header causes SharePoint to treat this unauthenticated
# request as originating from a valid session, granting access to the
# privileged ToolPane.aspx management endpoint.

# NOTE: This is the authentication bypass component (CVE-2025-53771).
# CVE-2025-53770 (the deserialization payload) is sent in the body.

Bug 2 — Insecure Deserialization of Untrusted Data (CVE-2025-53770)

Once authentication is bypassed, the attacker exploits the core deserialization vulnerability. SharePoint's ToolPane.aspx endpoint accepts POST data that includes serialized .NET objects. In vulnerable versions, SharePoint deserializes this data without adequate validation of its origin or contents.

The attack uses tools like ysoserial.net — a well-known .NET deserialization payload generator — to forge a signed __VIEWSTATE payload. The crafted payload embeds a malicious .NET gadget chain that, when deserialized by SharePoint's ASP.NET runtime, executes arbitrary code in the context of the SharePoint application pool — which runs as NT AUTHORITY\IUSR or higher.

The particularly dangerous aspect: SharePoint trusts the signature on the ViewState because the attacker extracts the machine key from SharePoint's configuration files (web.config) as part of the exploit chain. With the machine key in hand, the attacker can forge properly signed ViewState payloads that SharePoint accepts and deserializes without question.

PowerShell — ysoserial.net payload generation (defensive reference)
# This is what attackers use to generate the deserialization payload.
# Shown here for DEFENSIVE understanding — to recognize what security
# tools should block and what logs will contain.

# Step 1: Extract SharePoint machine key from config (requires file read access)
# Machine key is located in: C:\inetpub\wwwroot\wss\VirtualDirectories\[port]\web.config
# <machineKey validationKey="..." decryptionKey="..." />

# Step 2: Use ysoserial.net to craft signed ViewState payload
# (Attacker runs this locally after obtaining the machine key)
.\ysoserial.exe -p ViewState `
  --generator="CA0B0334" `
  --validationalg="SHA1" `
  --validationkey="[EXTRACTED_KEY]" `
  -c "powershell -enc [base64_encoded_payload]"

# Step 3: Submit forged ViewState in POST body to ToolPane.aspx
# SharePoint verifies the signature (valid, because attacker has the key),
# deserializes the .NET gadget chain, and executes the embedded command.

The Complete Exploit Chain Step by Step

STEP 01
Recon & Target
Identify internet-facing SharePoint 2016/2019/SE via Shodan/Censys. Confirm unpatched build version.
STEP 02
Auth Bypass
POST to ToolPane.aspx with forged Referer: /_layouts/SignOut.aspx. Server grants unauthenticated access.
STEP 03
Key Extraction
Read SharePoint web.config via file traversal or initial shell to extract machineKey for ViewState signing.
STEP 04
RCE via Deserialization
Submit signed ysoserial payload in POST body. SharePoint deserializes and executes arbitrary code as SYSTEM.
STEP 05
Web Shell Drop
Write ASPX web shell (e.g., spinstall0.aspx) to SharePoint system directories for persistent access.
⚠️
Post-patch persistence is real Rapid7 and other responders confirmed that attackers specifically targeted the machine key extraction step to forge authentication tokens that remain valid even after patching. Organizations that applied the patch without conducting a full incident response investigation — looking for dropped web shells, harvested keys, and forged tokens — may still have active attacker persistence on their environment.

05 Observed Attacker Behavior & Post-Exploitation

CVE-2025-53770 is not a theoretical vulnerability being hoarded by nation-state actors — it was exploited by multiple distinct threat actors within days of the original PoC being posted. Analysis of observed intrusions reveals a consistent post-exploitation playbook.

Web Shell Deployment

The first action in nearly every observed intrusion was dropping an ASPX web shell into the SharePoint web root. The most commonly observed file names include spinstall0.aspx, upload.aspx, and randomized names ending in .aspx. These web shells provide persistent, browser-accessible command execution on the server.

PowerShell — Hunt for dropped web shells in SharePoint directories
# Hunt for recently created .aspx files in SharePoint web directories
# Run on the SharePoint server itself or via a trusted admin session

# Check all SharePoint virtual directory roots for new .aspx files (last 30 days)
Get-ChildItem -Path "C:\inetpub\wwwroot\wss\" -Recurse -Filter "*.aspx" |
  Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-30) } |
  Select-Object FullName, LastWriteTime, Length |
  Sort-Object LastWriteTime -Descending

# Specifically hunt for known ToolShell web shell indicators
Get-ChildItem -Path "C:\inetpub\wwwroot\wss\" -Recurse -Include "spinstall*.aspx","upload.aspx"

# Check SharePoint 14/15/16 hive directories for planted files
Get-ChildItem -Path "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\" `
  -Recurse -Filter "*.aspx" |
  Where-Object { $_.LastWriteTime -gt (Get-Date).AddDays(-30) }

Machine Key Harvesting for Token Forgery

A distinctive element of ToolShell campaigns is the targeted extraction of SharePoint's cryptographic machine keys. With these keys, attackers can forge valid authentication tokens that are indistinguishable from legitimate ones — meaning they can re-enter the environment at any time without triggering authentication anomaly alerts, even after patching.

PowerShell — Check if machine keys have been accessed (Windows event logs)
# Check for suspicious reads of web.config (machine key location)
# Enable Object Access auditing first if not already enabled

# Search security event log for file access to web.config
Get-WinEvent -FilterHashtable @{
  LogName   = 'Security'
  Id        = 4663
} | Where-Object {
  $_.Properties[6].Value -like "*web.config*"
} | Select-Object TimeCreated, Message | Format-List

# Also check IIS logs for unusual access to the ToolPane.aspx endpoint
Get-ChildItem "C:\inetpub\logs\LogFiles\" -Recurse -Filter "*.log" |
  Select-String -Pattern "ToolPane\.aspx" |
  Select-Object -Last 100

Observed Post-Exploitation Activity

Beyond web shell planting, threat actors observed in ToolShell campaigns performed the following actions on compromised SharePoint servers:

06 Detection & Threat Hunting

ToolShell leaves several detectable signals across IIS logs, Windows event logs, and endpoint telemetry. The following detection content targets each stage of the attack chain.

IIS Log Detection — Sigma Rule

Sigma — CVE-2025-53770 SharePoint ToolShell exploitation attempt
title: CVE-2025-53770 SharePoint ToolShell Exploitation Attempt
id: a1b2c3d4-e5f6-7890-abcd-ef1234567890
status: stable
description: Detects exploitation attempts of CVE-2025-53770, the SharePoint
  deserialization RCE. Targets POST requests to ToolPane.aspx with the
  SignOut.aspx Referer bypass and suspicious payload sizes.
references:
  - https://greyshield.in/research/toolshell-cve-2025-53770/
  - https://msrc.microsoft.com/update-guide/vulnerability/CVE-2025-53770
author: Grey Shield Research Team
date: 2025/07/25
logsource:
  category: webserver
  product: iis
detection:
  selection:
    cs-method: 'POST'
    cs-uri-stem|contains: 'ToolPane.aspx'
    cs-uri-query|contains:
      - 'DisplayMode=Edit'
      - 'ToolPane.aspx'
  referer_bypass:
    cs-Referer|endswith: '/_layouts/SignOut.aspx'
  large_payload:
    cs-bytes|gte: 7000
  condition: selection and (referer_bypass or large_payload)
falsepositives:
  - Legitimate SharePoint administrative activities (rare for this endpoint/referer combo)
level: high
tags:
  - attack.initial_access
  - attack.t1190
  - cve.2025.53770

PowerShell — Quick IIS Log Hunt

PowerShell — Hunt for ToolShell exploitation indicators in IIS logs
# Hunt through IIS logs for CVE-2025-53770 indicators
# Run on the SharePoint server or access IIS log share

$logPath = "C:\inetpub\logs\LogFiles\W3SVC1\"

# Hunt 1: POST requests to ToolPane.aspx (core exploit path)
Write-Host "[*] Searching for ToolPane.aspx POST requests..."
Get-ChildItem $logPath -Filter "*.log" | ForEach-Object {
  Select-String -Path $_.FullName -Pattern "POST.*ToolPane\.aspx.*DisplayMode=Edit"
} | Select-Object -Last 50

# Hunt 2: Referer-based auth bypass (SignOut.aspx referer to management endpoint)
Write-Host "[*] Searching for SignOut.aspx Referer bypass pattern..."
Get-ChildItem $logPath -Filter "*.log" | ForEach-Object {
  Select-String -Path $_.FullName -Pattern "SignOut\.aspx"
} | Where-Object { $_ -match "POST" } | Select-Object -Last 50

# Hunt 3: Check for web shell access patterns after initial exploitation
Write-Host "[*] Checking for web shell access (spinstall, unusual .aspx 200s)..."
Get-ChildItem $logPath -Filter "*.log" | ForEach-Object {
  Select-String -Path $_.FullName -Pattern "spinstall.*aspx.*200|upload\.aspx.*POST.*200"
} | Select-Object -Last 20

Windows Event Log Indicators

Post-exploitation activity generates Windows events that complement IIS log detection. Key event IDs to monitor on SharePoint servers:

🔍
If you see w3wp.exe spawning PowerShell — stop everything This is the single most reliable indicator of successful ToolShell exploitation. In a healthy SharePoint environment, w3wp.exe (the IIS worker process) should never launch powershell.exe, cmd.exe, or any shell process. If you observe this in your EDR or Sysmon logs, treat it as a confirmed compromise and initiate your incident response process immediately.

07 Remediation & Hardening

1. Patch Immediately — Priority One

The only complete fix for CVE-2025-53770 is applying Microsoft's July 2025 Cumulative Update for your SharePoint version. Do not attempt any workaround as a substitute for patching on supported versions.

PowerShell — Verify SharePoint patch status
# Run in SharePoint Management Shell (elevated)
$farm = Get-SPFarm
Write-Host "SharePoint Build Version: $($farm.BuildVersion)"
Write-Host "Farm Products:"
$farm.Products | ForEach-Object { Write-Host "  $_" }

# Check patch status for all servers in the farm
Get-SPServer | ForEach-Object {
  $server = $_
  Write-Host "Server: $($server.Name)"
  $server.NeedsUpgrade | ForEach-Object {
    Write-Host "  NeedsUpgrade: $_"
  }
}

# Minimum safe build numbers (July 2025 CU):
# SharePoint 2016: 16.0.5517.1000 or later
# SharePoint 2019: 16.0.10413.20000 or later
# Subscription Edition: 16.0.17928.20000 or later

2. Block ToolPane.aspx at the WAF / Reverse Proxy

As an immediate mitigation while patching proceeds, block external access to the ToolPane.aspx endpoint at your WAF or web application firewall. This endpoint should never be reachable from the internet or untrusted network segments.

IIS URL Rewrite / WAF — Block ToolPane.aspx endpoint
<!-- Add to SharePoint web.config or apply at reverse proxy -->
<!-- IIS URL Rewrite rule to block ToolPane.aspx access from untrusted sources -->

<rewrite>
  <rules>
    <rule name="Block ToolPane CVE-2025-53770" stopProcessing="true">
      <match url=".*ToolPane\.aspx" />
      <conditions>
        <!-- Block if Referer is SignOut.aspx (auth bypass indicator) -->
        <add input="{HTTP_REFERER}" pattern=".*SignOut\.aspx.*" />
      </conditions>
      <action type="CustomResponse" statusCode="403"
              statusReason="Forbidden"
              statusDescription="Access Denied by Security Policy" />
    </rule>
  </rules>
</rewrite>

# Nginx equivalent (place in server block):
# location ~* /ToolPane\.aspx {
#   if ($http_referer ~* "SignOut\.aspx") { return 403; }
# }

3. Rotate Machine Keys Immediately

If there is any possibility your SharePoint server was reached by exploitation attempts — even unsuccessful ones — rotate the machine key. Attackers who extracted the key can forge auth tokens that survive patching.

PowerShell — Rotate SharePoint machine key (breaks active sessions)
# WARNING: Rotating machine keys will invalidate all active user sessions
# and ViewState. Schedule during a maintenance window.
# Run in SharePoint Management Shell (elevated, on each WFE server)

# Locate web.config (adjust path for your environment)
$webConfigPath = "C:\inetpub\wwwroot\wss\VirtualDirectories\[port]\web.config"

# Generate new random keys
$rng = [System.Security.Cryptography.RNGCryptoServiceProvider]::new()
$validationKey = New-Object byte[] 64
$decryptionKey = New-Object byte[] 24
$rng.GetBytes($validationKey)
$rng.GetBytes($decryptionKey)

$newValidationKey = [BitConverter]::ToString($validationKey).Replace("-","")
$newDecryptionKey = [BitConverter]::ToString($decryptionKey).Replace("-","")

Write-Host "New validationKey: $newValidationKey"
Write-Host "New decryptionKey: $newDecryptionKey"
Write-Host "Update web.config machineKey element with these values on ALL WFE servers."

# After updating web.config, perform IISRESET on each WFE server:
# iisreset /restart

4. Isolate EOL SharePoint Servers Immediately

SharePoint Server 2010 and 2013 will not receive patches for CVE-2025-53770. If you are running these versions and they are reachable from the internet or untrusted networks, your only safe options are to take them offline or place them behind a network control that prevents access to the /_layouts/ path from untrusted sources.

5. Additional Hardening Controls

08 Real-World Impact Assessment

CVE-2025-53770 strikes at one of the most dangerous targets in an enterprise environment: SharePoint servers sit deep inside corporate networks, often run with elevated service account privileges, hold sensitive business documents and credentials, and are frequently overlooked for patching because they are considered "internal" infrastructure.

Censys analysis at the time of disclosure identified approximately 16,000+ publicly exposed on-premises SharePoint instances globally reachable from the internet. The actual number of vulnerable instances — including those on internal networks reachable from a compromised perimeter — is far larger. Any attacker who has achieved initial network access (via phishing, VPN vulnerability, or another perimeter breach) can use ToolShell as a highly reliable lateral movement path to SharePoint servers.

The attacker access level achieved — running as NT AUTHORITY\IUSR or SYSTEM on the SharePoint host — enables:

🎯
Grey Shield field observation During post-disclosure assessments in July–August 2025, our team identified unpatched on-premises SharePoint 2019 instances on internet-facing infrastructure in multiple Indian enterprise environments — including manufacturing, legal, and financial services sectors. In each case, the SharePoint instance had direct connectivity to internal file servers and Active Directory. A single ToolShell exploitation would have yielded keys to the entire internal domain.

09 Lessons for Security Teams

ToolShell is a case study in several compounding failure modes that security teams encounter repeatedly. Here are the lessons to carry forward:

  1. Patch bypasses are expected, not exceptional: Microsoft patched the original ToolShell chain on July 8 — and it was bypassed within ten days. Treat every critical patch as "first round," monitor for bypass disclosures actively, and have a process for emergency re-patching. The attacker community invests in patch diffing as a core capability.
  2. "Internal" infrastructure has a perimeter too: Organizations justified not treating SharePoint as a priority because it was "behind the firewall." The reality: any attacker who breaches your perimeter will immediately enumerate internal SharePoint. Internal does not mean safe.
  3. EOL software is a liability with a due date: SharePoint 2010 and 2013 receiving no patch for a CVSS 9.8 zero-day is not a surprise — it is the documented outcome of running end-of-life software. If you have EOL SharePoint in your environment, the timeline for migrating off it is now measured in incident response events, not project cycles.
  4. Patch compliance is not the same as remediation: Multiple post-incident investigations found that organizations patched the vulnerability but did not investigate whether the environment had already been compromised during the zero-day window. Patch + threat hunt is the complete remediation, not patch alone.
  5. Machine keys are credentials: SharePoint machine keys are treated as configuration, not secrets. They are often in plaintext in config files, not rotated for years, and not covered by secrets management programs. After ToolShell, they must be treated as credentials that require the same rotation, access control, and monitoring as passwords.

10 References & Further Reading

Grey Shield Research Team · contact@greyshield.in · Responsible Disclosure Policy: /legal