CVE-2026-50522 (CVSS 9.8): SharePoint Machine Key Theft Turns Patched Servers Into Persistent Backdoors
Patching your SharePoint servers this month? That may not be enough. Security researchers and threat intelligence teams are raising an alarm that goes beyond the usual “apply updates and move on” advisory: attackers exploiting CVE-2026-50522 are not just executing code — they are stealing cryptographic keys that let them walk back in whenever they want, even on a fully patched server. For IT leaders running on-premises SharePoint environments — a configuration extremely common across Indian enterprises, government agencies, and financial institutions — this is not a patch-and-forget moment. It is a patch-and-rotate-and-segment moment.
- CVE-2026-50522 is a CVSS 9.8 pre-authentication deserialization flaw in Microsoft SharePoint Server (Subscription Edition, 2019, 2016).
- A single unauthenticated HTTP request can steal IIS machine keys — cryptographic material that lets attackers forge trusted authentication tokens indefinitely.
- Public PoC exploit code dropped on 20 July 2026; active exploitation was captured by watchTowr’s honeypot network within hours.
- The full attack chain progresses from unauthenticated web request to Active Directory compromise via the SharePoint farm service account.
- Patching alone is insufficient: organisations must also rotate machine keys and audit for webshells dropped during the exploitation window.
- CISA has issued a hardening advisory for SharePoint following the wave of July 2026 exploitation.
What Is CVE-2026-50522 — and Why Is It Different?
Microsoft patched CVE-2026-50522 as part of its July 2026 Patch Tuesday, which addressed a staggering 570+ vulnerabilities. The advisory classified the flaw as Deserialization of Untrusted Data (CWE-502) in Microsoft Office SharePoint, carrying a CVSS base score of 9.8 with an “Exploitation More Likely” assessment. Affected versions span every currently-supported on-premises deployment:
| Product | Status |
|---|---|
| SharePoint Server Subscription Edition | 🔴 Vulnerable — patch available |
| SharePoint Server 2019 | 🔴 Vulnerable — patch available |
| SharePoint Server 2016 | 🔴 Vulnerable — patch available |
What sets this apart from the previously-covered CVE-2026-58644 — which also targeted SharePoint but required Site Owner authentication — is that CVE-2026-50522 requires zero credentials. Any internet-facing SharePoint server with the /_trust/ endpoint exposed is a sitting target. Censys and Shodan enumeration of exposed SharePoint instances has already been incorporated into attacker playbooks, per Resecurity’s threat intelligence reporting.
Technical Breakdown: From One HTTP Request to Domain Takeover
Understanding the kill chain is essential for defenders to know what indicators to hunt for. Resecurity and watchTowr have both mapped a six-stage exploitation sequence:
- Reconnaissance. Attackers enumerate exposed SharePoint instances via Shodan, Censys, or passive DNS, targeting the
/_trust/default.aspxWS-Federation endpoint. - Initial Exploitation. A crafted HTTP request delivers a malicious .NET BinaryFormatter payload embedded as a cookie inside a forged WS-Federation sign-in response. Because the deserialization code path does not validate the token origin, arbitrary code executes inside the IIS worker process (
w3wp.exe) — with no login required. - Webshell Deployment. Attackers drop ASP.NET webshells — observed filenames include
spinstall0.aspx— into SharePoint’sTEMPLATE\LAYOUTSdirectory, a location that is browsable by default and rarely monitored for file changes. - Machine Key Extraction. Using .NET reflection (
Assembly.Load,System.Reflection.Emit) from within thew3wp.exeprocess, attackers read thevalidationKeyanddecryptionKeyvalues directly from the application’s in-memory configuration — bypassing the need to touchweb.configon disk. - ViewState Forgery. Armed with the machine keys, attackers use tools like
ysoserial.netto craft serialised ViewState payloads signed and encrypted with the server’s own keys. The server cannot distinguish these from legitimate traffic. This capability survives patching: as long as the keys remain unchanged, the backdoor is open. - Lateral Movement to Active Directory. The SharePoint farm service account holds dbcreator and securityadmin roles on the SQL Server and db_owner on all SharePoint databases. With code execution under this identity, attackers pivot from the SharePoint server to the SQL tier and then to Active Directory — full enterprise compromise in a single chained exploit.
The detection signals are specific: watch for w3wp.exe spawning cmd.exe, powershell.exe, or csc.exe, and for .NET reflection activity inside the IIS worker process. Any unexpected files appearing in TEMPLATE\LAYOUTS directories should be treated as a confirmed indicator of compromise.
The Machine Key Problem: Why Simply Patching Is Not Enough
This is the detail that security teams need to internalise. ASP.NET machine keys — stored in web.config as machineKey validationKey and decryptionKey — are the root of trust for every signed or encrypted token that SharePoint issues. They protect ViewState payloads, forms authentication tickets, and session cookies. Microsoft’s own security blog has documented how known or stolen machine keys enable persistent code injection that is essentially invisible to the application layer.
Once an attacker exfiltrates these values, they hold a cryptographic pass to your SharePoint farm. They can:
- Forge authentication tokens to impersonate any user — including SharePoint administrators
- Deserialise arbitrary .NET objects on demand, executing code without any webshell
- Maintain access through patch cycles, password resets, and even server reboots
According to BleepingComputer’s reporting, watchTowr confirmed that exploitation attempts captured in their honeypot network were successfully pulling machine keys in a single unauthenticated request. The Security Affairs analysis and The Hacker News both confirm the public PoC — written by researcher Janggggg and attributed discovery to DEVCORE’s researcher “splitline” — began driving active exploitation within hours of its publication on 20 July 2026. CISA responded by issuing an urgent advisory urging SharePoint hardening across all sectors.
India Context: On-Premises SharePoint Is Everywhere
India’s enterprise IT landscape is disproportionately reliant on on-premises SharePoint. Large PSUs, government ministries, banking and financial services firms, and defence contractors all run SharePoint Server in configurations that predate the cloud migration wave. Many organisations in the Delhi NCR corridor and across Tier-1 metros are still operating SharePoint 2016 or 2019 environments that may not receive patches for weeks after release — or that are exposed directly to the internet without a Web Application Firewall in front.
The WS-Federation endpoint (/_trust/default.aspx) exploited by CVE-2026-50522 is commonly left enabled in ADFS-integrated SharePoint deployments, which are the default configuration for organisations using Windows Server AD. If your SharePoint is joined to a domain and fronted by ADFS, this endpoint is likely reachable — and likely vulnerable if July patches have not been applied.
State-sponsored and financially motivated threat actors have historically treated Indian government and enterprise SharePoint farms as high-value targets. This vulnerability is precisely the kind that ransomware affiliates and APT groups race to operationalise after a public PoC drops.
What You Should Do Right Now
Having deployed and hardened FortiGate and zero-trust architectures for enterprise clients across Delhi NCR, I can tell you that this situation calls for a layered response — not just a patch ticket.
Immediate actions (within 24 hours):
- Apply Microsoft’s July 2026 Patch Tuesday updates to all SharePoint instances — Subscription Edition, 2019, and 2016. This closes the initial deserialization vector.
- Rotate your machine keys immediately. Generate new
validationKeyanddecryptionKeyvalues for every SharePoint web application usingPowerShellorIIS Manager. This invalidates any keys an attacker may have already extracted. - Audit TEMPLATE\LAYOUTS directories across all SharePoint servers for unexpected .aspx files — particularly any files with generic or service-sounding names. Hash and compare against known-good baselines.
- Hunt for compromise indicators: search SIEM/EDR for
w3wp.exespawning shells, .NET reflection API calls from IIS worker processes, and unusual outbound connections from your SharePoint servers.
Short-term hardening (within one week):
- Restrict or disable the /_trust/ endpoint if you are not using ADFS-based claims authentication. A large number of organisations have this enabled by default but do not actively use it.
- Place a WAF in front of SharePoint — FortiGate with IPS signatures or a dedicated WAF should be inspecting all traffic to SharePoint endpoints, with anomaly detection tuned for deserialization payload patterns.
- Apply Zero Trust segmentation to the SharePoint farm’s network zone. The SharePoint service account should never have unrestricted lateral movement to SQL Server, AD controllers, or other critical infrastructure. Micro-segmentation limits the blast radius of exactly this kind of compromise. See how Zero Trust principles were the last line of defence in recent high-profile attacks.
- Rotate the SharePoint farm service account credentials if any exploitation occurred during the July 17–20 window before the PoC was public. Even undocumented pre-PoC exploitation was observed by Defused Cyber starting July 17.
- Review SQL Server permissions for the farm service account and strip dbcreator/securityadmin roles down to the minimum required for SharePoint operation.
Strategic posture: Incidents like CVE-2026-50522 illustrate why zero-trust architecture cannot be an aspiration — it has to be operational. As with the recent Fortinet FortiSandbox vulnerabilities, the pattern is consistent: a single unpatched perimeter system becomes the entry point for a full enterprise compromise. The SharePoint farm account’s SQL Server privileges are a textbook example of excessive standing access that Zero Trust principles would have contained.
Frequently Asked Questions
Does CVE-2026-50522 affect SharePoint Online (Microsoft 365)?
No. CVE-2026-50522 affects only on-premises SharePoint Server deployments (Subscription Edition, 2019, and 2016). Microsoft’s cloud-hosted SharePoint Online service is managed by Microsoft and does not expose the vulnerable WS-Federation endpoint in the same way. Organisations that have migrated entirely to SharePoint Online are not at risk from this specific CVE.
I applied the July 2026 Patch Tuesday updates — am I safe?
Patching closes the initial remote code execution vector, but it does not invalidate machine keys that were already stolen. If attackers accessed your server during the July 17–20 exploitation window (before the patch was applied), they may already hold your machine keys. You must rotate the keys and conduct a threat hunt to confirm whether a compromise occurred.
How do I rotate SharePoint machine keys without disrupting users?
In a SharePoint farm, machine keys must be consistent across all Web Front End (WFE) servers. Use the Set-SPMachineKey PowerShell cmdlet (available in SharePoint Management Shell) to generate and distribute new keys across all servers in the farm simultaneously. Schedule this during a maintenance window, as active sessions will be invalidated — users will need to log in again. Your vendor or security partner can assist with key rotation in production farms.
What SIEM rules or detection logic should I implement?
Key detection rules to build or enable: (1) w3wp.exe spawning cmd.exe, powershell.exe, csc.exe, or net.exe; (2) file creation events in %SharePointRoot%\Template\Layouts\; (3) .NET Assembly.Load or System.Reflection.Emit calls from IIS worker process; (4) outbound network connections from SharePoint server to non-authorised IPs on unusual ports; (5) SQL Server login events from the SharePoint farm account outside business hours. Correlating these in your SIEM within a 15-minute window significantly reduces mean-time-to-detect.
Is Your SharePoint Farm Protected?
CVE-2026-50522 is a reminder that on-premises infrastructure requires continuous security validation — not just patch management. If you are not certain whether your SharePoint servers are patched, your machine keys have been rotated, or your Zero Trust segmentation is limiting lateral movement, now is the time to find out.
Schedule a security assessment with Sanjay Seth →
P J Networks · Delhi NCR · Zero Trust & FortiGate Specialists · 30 Years of Enterprise Security