Critical SharePoint RCE (CVE-2026-50522, CVSS 9.8) Under Active Exploitation — Attackers Are Stealing Machine Keys
A deserialization flaw in on-premises SharePoint Server lets unauthenticated attackers execute code remotely, and attackers are using it to steal machine keys for persistent access even after patching. Microsoft's July 14 patch alone isn't enough.
CVE-2026-50522, a critical remote code execution flaw in on-premises Microsoft SharePoint Server, is under active exploitation following the release of a public proof-of-concept. WatchTowr logged exploitation attempts starting July 20, and attackers are using the bug for more than one-off code execution — they’re stealing machine keys to maintain persistent access even after a server gets patched.
The vulnerability: insufficient validation before deserializing user-supplied data inside the SessionSecurityTokenHandler class. The public exploit chain forges a SecurityContextToken inside a WS-Federation sign-in response, embeds a malicious .NET BinaryFormatter payload in the token’s cookie, and posts it to SharePoint’s /_trust/default.aspx endpoint. If the server’s deserialization path processes it, the attacker gets arbitrary code execution — no authentication required. CVSS score: 9.8.
Affected versions: SharePoint Server 2016, Server 2019, and Subscription Edition (on-premises). SharePoint Online in Microsoft 365 is not affected — this is a self-hosted-only problem.
Why patching isn’t the end of it: once attackers get code execution, they extract the server’s machine keys in a single request. Machine keys are what SharePoint uses to validate ViewState and other cryptographic tokens — stealing them lets an attacker forge valid authentication tokens and maintain access to the farm indefinitely, even after the underlying RCE is patched. If your farm was internet-facing and unpatched between July 14 and now, assume compromise and rotate machine keys as a separate remediation step, not an afterthought.
What to do right now, in order:
- Apply Microsoft’s July 14, 2026 SharePoint security update immediately if you haven’t. Treat any internet-facing farm as an emergency change, not routine patch cadence.
- Rotate SharePoint machine keys on every affected farm regardless of patch timing — assume the keys are already compromised if the server was exposed.
- Audit for indicators of the WS-Federation exploit chain: unexpected traffic to
/_trust/default.aspx, anomalousSecurityContextTokencookies, and unfamiliar service accounts or scheduled tasks created after July 14. - If you can’t patch immediately, restrict external access to
/_trust/default.aspxat the network layer as a stopgap — not a fix.
This is the second major SharePoint on-prem RCE this year to get chained with credential theft post-exploitation, reinforcing that self-hosted SharePoint farms exposed to the internet remain one of the highest-value, most consistently targeted entry points in enterprise environments.
Sources
Related reading
- Cybersecurity Microsoft's Biggest Patch Tuesday Ever: 198 CVEs, Three Zero-Days, One Actively Exploited Defender Flaw
- Cybersecurity Broadcom Patches Two Critical vCenter Flaws (CVSS 9.8) and an ESXi VM-Escape Bug — No Workarounds Available
- Cybersecurity Microsoft Launches Project Perception, an Agentic Security Platform to Fight AI-Operated Attacks