Fiona Jackson
2025-07-21 12:32:00
www.techrepublic.com
A critical remote code execution (RCE) vulnerability in Microsoft SharePoint is being actively exploited in the wild. If successful, attackers can gain full access to SharePoint content, deploy malicious code, and potentially move laterally to other Windows services, such as Outlook, Teams, and OneDrive.
While Microsoft patched the two vulnerabilities that made ToolShell possible in July’s Patch Tuesday rollout on July 18, Eye Security noticed that dozens of systems were being actively compromised with ToolShell. The giveaway was that attackers were writing files to the server for a RCE attack without prior authentication, and they utilised two new zero-day vulnerabilities that bypassed Microsoft’s patches.
How the ToolShell RCE attack works
Attackers send an HTTP request containing the malicious payload spinstall0.aspx to an on-premises SharePoint Server, either version 2016 or 2019. The request targets a vulnerable endpoint (CVE-2025-53770) that processes serialised data before performing any authentication checks, allowing the attacker to send it without needing valid credentials.
The spinstall0.aspx web shell extracts SharePoint’s MachineKey configuration, including the ValidationKey, using a simple GET request, exploiting the CVE-2025-53771 vulnerability. The MachineKey material, along with a specialised tool called ysoserial, can be used by the attacker to generate __VIEWSTATE payloads that appear to come from an authenticated user.
Any malicious code embedded into these valid payloads will be accepted by the server, potentially allowing the attacker to exfiltrate data, install additional backdoors, or modify site content. This RCE process has been named ToolShell.
ToolShell was first identified as a potential exploit chain at the Pwn2Own hacking competition at OffensiveCon Berlin in May by Dinh Ho Anh Khoa of Viettel Cyber Security. This was later reproduced in a proof-of-concept by the German cyber security firm CODE WHITE.
How to protect your SharePoint server from compromise
- Deploy the appropriate out-of-band security updates from Microsoft for SharePoint Server Subscription Edition and SharePoint Server 2019. One is not available for SharePoint Server 2016 at the time of publication.
- Monitor for indicators of compromise, such as POSTs to /_layouts/15/ToolPane.aspx?DisplayMode=Edit and the malicious IP addresses 107.191.58[.]76, 104.238.159[.]149, 96.9.125[.]147.
- Adjust the intrusion prevention system and web application firewall to block serialised payload patterns and forged __VIEWSTATE requests.
- Minimise layout and administrative privileges within the SharePoint environment.
- Configure Antimalware Scan Interface (AMSI) in SharePoint and deploy Microsoft Defender Antivirus on all SharePoint services.
- If AMSI is not possible, disconnect public-facing services from the internet until appropriate mitigation measures are implemented.
- If no appropriate mitigations are provided, either discontinue the use of the products or follow the applicable BOD 22-01 guidance for cloud services.
What to do if you suspect your SharePoint server has been compromised
If you suspect your company’s SharePoint server has been compromised, you should:
- Isolate or shut down the affected SharePoint servers.
- Renew all credentials, cryptographic material, and other system information that could have been exposed via the spinstall0.aspx.
- Engage a cyber security team to check if the attackers have maintained persistence through backdoors or other methods. They can also scan for historic indicators of compromise as well as update firewall rules and the intrusion prevention system.
Microsoft patched 137 flaws in July’s Patch Tuesday rollout; however, if your Azure virtual machine is failing to launch, one of those patches may be the reason.
Keep your entertainment at your fingertips with the Amazon Fire TV Stick 4K! Enjoy streaming in 4K Ultra HD with access to top services like Netflix, Prime Video, Disney+, and more. With an easy-to-use interface and voice remote, it’s the ultimate streaming device, now at only $21.99 — that’s 56% off!
With a 4.7/5-star rating from 43,582 reviews and 10K+ bought in the past month, it’s a top choice for home entertainment! Buy Now for $21.99 on Amazon!
Help Power Techcratic’s Future – Scan To Support
If Techcratic’s content and insights have helped you, consider giving back by supporting the platform with crypto. Every contribution makes a difference, whether it’s for high-quality content, server maintenance, or future updates. Techcratic is constantly evolving, and your support helps drive that progress.
As a solo operator who wears all the hats, creating content, managing the tech, and running the site, your support allows me to stay focused on delivering valuable resources. Your support keeps everything running smoothly and enables me to continue creating the content you love. I’m deeply grateful for your support, it truly means the world to me! Thank you!
BITCOIN bc1qlszw7elx2qahjwvaryh0tkgg8y68enw30gpvge Scan the QR code with your crypto wallet app |
DOGECOIN D64GwvvYQxFXYyan3oQCrmWfidf6T3JpBA Scan the QR code with your crypto wallet app |
ETHEREUM 0xe9BC980DF3d985730dA827996B43E4A62CCBAA7a Scan the QR code with your crypto wallet app |
Please read the Privacy and Security Disclaimer on how Techcratic handles your support.
Disclaimer: As an Amazon Associate, Techcratic may earn from qualifying purchases.