ToolShell, SharePoint Server zero-days used to steal ASP.NET machine keys
Attackers stole SharePoint machine keys through the ToolShell flaws.
Are you affected?
The free scanner that answers this opens soon. Until then, the steps below work by hand.
What happened
SharePoint zero-days let attackers steal machine keys. Microsoft says threat actors were attempting to exploit on-premises SharePoint Server as early as 2025-07-07 through CVE-2025-49706 (spoofing) and CVE-2025-49704 (remote code execution), and that CVE-2025-53771 and CVE-2025-53770 are the related bypasses disclosed on 2025-07-19. After exploitation, attackers dropped a web shell, spinstall0.aspx, whose script retrieves the server's MachineKey data and returns it in a GET response; CISA says the DLL payloads can also be used to obtain machine keys. Microsoft and CISA tell customers to rotate the ASP.NET machine keys and restart IIS. Microsoft names Linen Typhoon, Violet Typhoon and Storm-2603, which deployed ransomware from 2025-07-18. SharePoint Online in Microsoft 365 is not affected.
- Exposure starts
- 2025-07-07
- Exposure ends
- Not known yet (exposure ends when each server is patched and its machine keys rotated)
- Confidence
- medium
- Scope
- the ASP.NET machine keys (validation and decryption keys) of every on-premises SharePoint Server 2016, 2019 or Subscription Edition farm that was internet-facing before patching, and any secret in its web.config
What to do, in this order
- Install the July 2025 SharePoint security update (KB5002768, KB5002754 and KB5002753, or KB5002760 and KB5002759) on every server
Microsoft lists these updates as the fix; rotating keys on an unpatched server lets the attacker take the new keys too.
- Rotate the SharePoint ASP.NET machine keys with Set-SPMachineKey or the Machine Key Rotation Job in Central Administration
The spinstall0.aspx web shell retrieves MachineKey data, and CISA says the DLL payloads can obtain machine keys; Microsoft and CISA both tell customers to rotate them.
anything else stored there
- Remove malicious module entries from applicationHost.config and web.config, then run iisreset.exe on every SharePoint server
CISA says unremoved entries reload on restart, and Microsoft says the new keys take effect only after IIS restarts.
- Rotate any other secret stored in the farm's web.config files
Advisory inference. Microsoft lists debug_dev.js as holding stolen web config data, so other secrets in those files may have been read; neither Microsoft nor CISA names them.
anything else stored there
Notes
- Fixes: KB5002768 (Subscription Edition), KB5002754 plus language pack KB5002753 (2019), KB5002760 plus language pack KB5002759 (2016).
- CISA says to rotate the machine keys, apply the update, then rotate them again, and to remove malicious module entries from applicationHost.config and web.config before restarting IIS so they do not reload.
- Microsoft says that if AMSI cannot be enabled, keys must be rotated after the security update is installed.
- CISA's KEV catalog added CVE-2025-53770 on 2025-07-20 and CVE-2025-49704 and CVE-2025-49706 on 2025-07-22.
How to tell if you’re affected
- Files spinstall0.aspx, spinstall.aspx, spinstall1.aspx or spinstall2.aspx in the SharePoint layouts folders
- Files IIS_Server_dll.dll, SharpHostInfo.x64.exe, xd.exe or debug_dev.js
- POST requests to /_layouts/15/ToolPane.aspx?DisplayMode=Edit with the referrer /_layouts/SignOut.aspx
- Connections from or to 107.191.58.76, 104.238.159.149, 96.9.125.147, 131.226.2.6, 134.199.202.205, 188.130.206.168 or 65.38.121.198
Sources
- MSRC: Customer guidance for SharePoint vulnerability CVE-2025-53770
- Microsoft Security: Disrupting active exploitation of on-premises SharePoint vulnerabilities
- CISA: Microsoft releases guidance on exploitation of SharePoint vulnerabilities
- NVD CVE-2025-53770
Rotating the keys
Pro, $49 a year when it opens, plans the rotation of each affected key for this incident, in this order. Automatic rotation is in testing and included.
By hand, free: the steps above.