Microsoft’s SharePoint on‑premises ecosystem is at the center of a high‑urgency security crisis: a cluster of remote code execution (RCE) and authentication‑bypass issues — widely tracked under CVE identifiers such as CVE‑2025‑49704, CVE‑2025‑49706 and the emergent “ToolShell” chain (CVE‑2025‑53770 / CVE‑2025‑53771) — has been actively exploited in the wild, leading to web‑shell deployment, theft of ASP.NET machineKey material, forged __VIEWSTATE persistence, and ransomware follow‑on activity; the specific CVE you provided (CVE‑2025‑59237) does not appear in public vendor records at the time of writing and should be treated as unverified until confirmed against Microsoft’s Security Update Guide.
SharePoint Server (on‑premises) is a high‑value target: it runs inside IIS, often with broad access to enterprise files and services. The recently observed attack cluster combines two practical classes of weaknesses — an authentication/spoofing bypass and an unsafe deserialization path — that together enable unauthenticated or low‑privilege attackers to achieve arbitrary code execution in the SharePoint worker process (w3wp.exe). Attackers then drop web shells, extract cryptographic keys, and forge signed payloads for persistent access. This is not hypothetical: Microsoft, CISA and multiple industry responders confirm active exploitation and provide hunting/remediation guidance.
Why this matters: code executed in the IIS worker process frequently runs with elevated privileges or has access to domain resources. Stolen ASP.NET machineKey values (ValidationKey / DecryptionKey) let attackers create valid‑looking __VIEWSTATE or forms‑auth tokens — a powerful persistence mechanism that can survive partial mitigations if keys are not rotated. Multiple incident responders have observed ransomware and high‑impact post‑exploit tooling following SharePoint compromise.
For defenders the practical priorities are clear and urgent: patch now, rotate machine keys, hunt for web shells, and assume persistence until proven otherwise.
Source: MSRC Security Update Guide - Microsoft Security Response Center
Background / Overview
SharePoint Server (on‑premises) is a high‑value target: it runs inside IIS, often with broad access to enterprise files and services. The recently observed attack cluster combines two practical classes of weaknesses — an authentication/spoofing bypass and an unsafe deserialization path — that together enable unauthenticated or low‑privilege attackers to achieve arbitrary code execution in the SharePoint worker process (w3wp.exe). Attackers then drop web shells, extract cryptographic keys, and forge signed payloads for persistent access. This is not hypothetical: Microsoft, CISA and multiple industry responders confirm active exploitation and provide hunting/remediation guidance. Why this matters: code executed in the IIS worker process frequently runs with elevated privileges or has access to domain resources. Stolen ASP.NET machineKey values (ValidationKey / DecryptionKey) let attackers create valid‑looking __VIEWSTATE or forms‑auth tokens — a powerful persistence mechanism that can survive partial mitigations if keys are not rotated. Multiple incident responders have observed ransomware and high‑impact post‑exploit tooling following SharePoint compromise.
What changed now: the observable facts
- Active exploitation is confirmed for an exploited chain dubbed “ToolShell” that enables unauthenticated RCE against on‑prem SharePoint servers. The chain is real and weaponized.
- Microsoft released emergency security updates and customer guidance; SharePoint Online (Microsoft 365) is not affected by these on‑prem vulnerabilities.
- The incident is broad: public scanning shows thousands of SharePoint instances exposed to the Internet; many organizations have been targeted and at least some compromises escalated to ransomware.
Technical anatomy: how the exploit chain works
The two core primitives
- Authentication/spoofing bypass — Attackers craft requests that trick SharePoint’s request validation (for example, manipulating Referer headers or using specific layout endpoints) to permit file writes into trusted directories (like TEMPLATE\LAYOUTS). This enables placement of attacker files (web shells) on disk.
- Unsafe deserialization — SharePoint deserializes attacker‑controlled blobs (ViewState or other serialized objects) without adequate validation. During deserialization, objects can invoke code paths that result in arbitrary command execution. This is the mechanism behind the RCE when combined with the ability to write files or influence object construction.
Typical exploit flow (observed in multiple incidents)
- Internet‑facing SharePoint farms are discovered via automated scanning.
- The attacker sends crafted POST requests to layout endpoints (commonly /_layouts/15/ToolPane.aspx or similar) while spoofing or manipulating specific headers to bypass checks.
- A specially‑crafted serialized payload (often encoded in ViewState or in a POST body) is deserialized by SharePoint and triggers server‑side code that writes an ASPX web shell (example observed name: spinstall0.aspx) into the Layouts directory.
- Using the web shell, the attacker reads files like web.config, extracts ASP.NET machineKey values (ValidationKey/DecryptionKey) and exfiltrates them.
- With the machineKey, the attacker can forge validly‑signed __VIEWSTATE entries, enabling persistent, stealthy code execution even after partial patches.
Confirmed impact and observed actor behavior
- Attackers have installed web shells and used them to deploy additional tooling including credential harvesters and ransomware. Multiple security vendors and public incident notifications corroborate this behavior.
- The intrusion set includes both financially motivated ransomware gangs and state‑linked threat groups; Microsoft’s threat intelligence traces activity to groups it tracks with varying confidence.
- Attackers exploited gaps in early mitigations: initial patches for related CVEs were incomplete in some configurations and were chained into new bypasses, producing second‑order CVEs (the reason multiple CVE numbers and re‑patches appeared in July 2025 reporting). This explains the rapid evolution of the advisory landscape.
Practical immediate actions: a prioritized checklist
These steps reflect vendor guidance and incident‑response best practice. Apply them in the order below when feasible:- Patch now: install Microsoft’s published SharePoint security updates for your exact build and language pack. Security updates are cumulative — ensure the correct KBs for your product version are applied.
- Rotate ASP.NET machineKey values immediately after patching, and again after full remediation, on every SharePoint server in the farm. Use Update‑SPMachineKey / Set‑SPMachineKey or the Central Administration Machine Key Rotation job, then restart IIS. Do not skip this — it’s essential to invalidate forged tokens.
- Enable AMSI and enterprise antimalware: configure the Antimalware Scan Interface (AMSI) in Full Mode and deploy Microsoft Defender Antivirus (or an enterprise equivalent) on all SharePoint nodes to detect script and payloads delivered via HTTP bodies.
- Hunt for artifacts: search the Layouts folder for unauthorized files (e.g., spinstall0.aspx), inspect IIS logs for suspicious POSTs to ToolPane.aspx or other layout endpoints, and run EDR hunts for w3wp.exe spawning cmd.exe/powershell.exe or Base64‑encoded command invocations.
- Isolate and preserve evidence if compromise is suspected: isolate affected hosts, collect memory dumps and web.config fragments, and plan for image‑based rebuilds where necessary. Assume machineKey and other secrets may be exfiltrated.
- Apply perimeter compensating controls: place exposed SharePoint servers behind an authenticated gateway or WAF, restrict inbound access to trusted IP ranges, and consider temporary removal of public exposure until remediation is complete. Test WAF rules in detection mode to avoid service disruption.
- Apply the correct SharePoint KB(s) for your build.
- Rotate machine keys (Update‑SPMachineKey or Central Admin job).
- Restart IIS (iisreset.exe) on every server.
- Hunt for web shells and IoCs; rebuild if compromise is confirmed.
Detection guidance — what to look for
- Unusual POST requests to layout endpoints (ToolPane.aspx) with abnormal Referer headers (for example, Referer set to /_layouts/SignOut.aspx).
- Files appearing in TEMPLATE\LAYOUTS that are not part of your deployment (example: spinstall0.aspx).
- w3wp.exe spawning PowerShell or cmd with encoded payloads, and EDR alerts for in‑memory execution patterns.
- Signs of web.config reads, unexpected network exfiltration from SharePoint nodes, or anomalous service token usage that could indicate machineKey theft.
Why “patch and forget” is not enough
Two operational realities make these intrusions more dangerous than a routine patch cycle:- MachineKey persistence — If an attacker has extracted the ASP.NET machineKey, they can forge signed tokens and regain access even after a software patch is applied unless keys are rotated farm‑wide and IIS is restarted. Microsoft and multiple agencies explicitly require key rotation as part of remediation.
- Patch bypasses and chained faults — In some cases attackers chained an authentication bypass with deserialization to create unauthenticated RCE; early fixes closed one primitive but left the chain intact until follow‑up emergency updates were released. This means defenders must validate patch status, re‑scan for indicators of compromise, and not assume a single update fully remediates a previously exploited farm.
Operational risks and long‑term mitigation
- Internet‑facing SharePoint farms: treat these as highest priority. If you must run an internet‑facing farm, restrict management endpoints and enforce multi‑factor authentication and network‑level controls.
- Legacy/unsupported versions: SharePoint 2010/2013 and other unsupported builds will not receive fixes. If you cannot upgrade, isolate these deployments behind strict access controls or migrate content to supported platforms.
- DevOps hygiene: do not embed static machineKey values in public repos; migrate to automatic key rotation and secure key storage approaches to reduce the window of vulnerability. Microsoft documentation now describes automatic machineKey rotation and PowerShell cmdlets (Set‑SPMachineKey / Update‑SPMachineKey) to manage keys.
- Reduced exposure to forged ViewState / token attacks.
- Faster recovery and lower operational costs after incidents.
- Better telemetry and hunting capability to detect novel exploitation attempts.
What we could not verify (and why it matters)
- The exact CVE number you provided (CVE‑2025‑59237) does not appear in Microsoft’s published advisory pages or major third‑party vulnerability trackers at the time of this reporting; multiple public advisories and community trackers show differing CVE mappings and evolving identifiers for this cluster of flaws. Treat ambiguous CVE labels as unverified until you confirm the mapping against Microsoft’s Security Update Guide and corresponding KB numbers for your build. Rely on the vendor’s KB mapping rather than a numeric label alone when scheduling patch windows.
- Microsoft intentionally avoids publishing exploit‑level details that would help attackers; technical writeups by researchers and vendors fill the gap but sometimes diverge on exact endpoint names, exploit payload formats, or PoC availability. Use vendor detection guidance and EDR signatures rather than third‑party PoC code as the primary remediation path.
Crisis checklist for SOCs and administrators (actionable, immediate)
- Identify all SharePoint farms and enumerate versions and patch levels (scriptable via PowerShell).
- Confirm whether farms are internet‑facing; if yes, prioritize remediation.
- Apply Microsoft’s SharePoint security updates that correspond to your build and language pack.
- After patching, run Update‑SPMachineKey (or Set‑SPMachineKey) for each web application or trigger the Central Admin “Machine Key Rotation” job. Restart IIS on every node.
- Deploy/enable AMSI Full Mode and ensure Defender/EDR coverage on nodes.
- Hunt for web shells and suspicious POST requests; collect logs and forensic artifacts if compromised. Plan rebuilds where necessary.
Final assessment: strengths and risks of the public response
Strengths- Coordinated vendor and government response: Microsoft, CISA and other national authorities published clear, operational guidance and detection queries within days of observing exploitation. That coordination provided SOCs with prioritized actions (patch → rotate keys → hunt).
- Defenders have practical mitigations: AMSI, EDR hunts, WAF rules and machineKey rotation are effective, implementable controls that materially reduce exploit success and persistence.
- Rapid exploitation and scale: Internet‑facing SharePoint farms were scanned and targeted en masse, and many installations were found exposed; the breadth of exposures increases the chance of undetected intrusions.
- Patch‑rotation complexity: rotating machine keys farm‑wide, restarting IIS, and ensuring no malicious modules persist across applicationHost.config/web.config requires careful orchestration — mistakes can leave services down or leave persistence in place. Incident responders repeatedly warn that patching alone is insufficient.
- CVE mapping confusion: inconsistent CVE labels across trackers create operational friction; always map advisories to vendor KBs and builds before remediating at scale.
Bottom line
The SharePoint on‑premises RCE campaigns represent a high‑severity, actively exploited risk that demands immediate, coordinated action: apply Microsoft’s published SharePoint security updates that match your build, rotate ASP.NET machineKey values farm‑wide, enable AMSI + enterprise antimalware, deploy WAF/EDR hunting rules, and assume compromise where internet‑facing servers were unpatched. Do not trust a single applied patch to be the end of the story — validate, hunt, and rotate keys. Confirm the exact CVE ↔ KB mapping in your ticketing and automation systems before scheduling mass rollouts; the CVE number you provided (CVE‑2025‑59237) was not found in vendor records and should be verified.For defenders the practical priorities are clear and urgent: patch now, rotate machine keys, hunt for web shells, and assume persistence until proven otherwise.
Source: MSRC Security Update Guide - Microsoft Security Response Center