It's ToolShell 2.0 — a mailroom that opens every package and runs whatever's inside as SYSTEM
CVE-2026-50522 is a CWE-502 unsafe deserialization flaw in on-premises Microsoft SharePoint Server. An unauthenticated attacker POSTs a crafted __VIEWSTATE (or similar serialized) payload to an exposed SharePoint endpoint; the server rehydrates the object graph and executes an attacker-controlled gadget chain in the w3wp.exe worker process — typically running as the SharePoint farm service account. Affected products: SharePoint Server Subscription Edition, SharePoint Server 2019, and SharePoint Server 2016 Enterprise. SharePoint Online (Microsoft 365) is not affected.
Microsoft's CRITICAL / 9.8 rating is accurate and, if anything, understated by the CVSS math given the operational reality. This is the same class of bug family as the 2025 ToolShell chain (CVE-2025-53770 / -49704 / -49706): unauthenticated, network-reachable, and the compromise persists via stolen ASP.NET machine keys which let attackers forge valid __VIEWSTATE blobs even after the vendor patch is applied. A public PoC dropped from watchTowr on July 20; honeypots caught mass-scan exploitation within hours. Nothing about the friction audit softens this one.
5 steps from start to impact.
Discover exposed SharePoint endpoint
/_layouts/15/, /SignOut.aspx, or SharePoint-specific server headers. Following the July 20 PoC drop, mass scanners (watchTowr, GreyNoise-tagged nodes) are hitting every /24 on the internet.- SharePoint 2016/2019/SE HTTP(S) endpoint reachable from attacker network
- Well-run enterprises front SharePoint with a reverse proxy / WAF that strips or normalizes ToolPane traffic
- Some orgs restrict SharePoint to VPN-only
product:"Microsoft SharePoint" and Censys services.software.product=SharePoint both track exposed instances; GreyNoise has a dedicated tag for CVE-2026-50522 scan traffic.Deliver malicious serialized payload
__VIEWSTATE or SOAP body containing a ysoserial.net gadget chain (TypeConfuseDelegate, ActivitySurrogateSelector). No auth header, no cookie, no user interaction. The public PoC from watchTowr wraps this in ~40 lines of Python.- Vulnerable SharePoint build (pre-July 2026 CU)
- Endpoint accepts POST without auth
- ASP.NET ViewState MAC validation blocks the naive path — but attackers use it AFTER step 3 (machine-key theft) to bypass it
- WAF rules that inspect for
TypeConfuseDelegate/ serialization markers stop unsophisticated variants
w3wp.exe spawning cmd.exe/powershell.exe; Defender for Endpoint has a SharePoint_ToolShellExploitation alert as of July 21.Steal ASP.NET machine keys
web.config and dumps <machineKey validationKey=... decryptionKey=...> for every app pool. Attackers exfil this immediately. With the keys, they can forge signed/encrypted __VIEWSTATE blobs indefinitely — even against fully-patched servers. This is the persistence mechanic that made ToolShell 2025 so painful and it's back verbatim.- Code execution as SharePoint service account (achieved in step 2)
- Almost none — the service account can read web.config by design
web.config reads by w3wp.exe outside install/config windows; Sysmon EventID 11 on unexpected writes under /TEMPLATE/LAYOUTS/.Deploy webshell + lateral movement
/_layouts/15/ (spinstall0.aspx, debug_dev.aspx), then pivoting via the SharePoint farm account's Kerberos ticket to SQL, file shares, and — because the farm account is often over-privileged — to Active Directory. Cobalt Strike and open-source C2 (Sliver, Havoc) beacons follow.- RCE from step 2
- Farm account with typical over-provisioned rights
- Least-privileged farm accounts (rare in the wild) shrink lateral reach
- Tiered-admin models block DA escalation
Persist via forged ViewState post-patch
machineKey is NOT part of the vendor patch and must be done manually per farm. Multiple 2025 ToolShell victims re-owned within weeks precisely because they patched but didn't rotate.- Machine keys exfiltrated in step 3
- Endpoint still reachable
- Manual machineKey rotation + IIS reset closes this door — but requires a documented runbook most orgs lack
machineKey change history.The supporting signals.
| In-the-wild status | Active exploitation confirmed — honeypots (watchTowr, GreyNoise) captured mass exploitation within hours of the July 20 PoC drop. Machine-key theft campaigns observed. |
|---|---|
| Proof-of-concept | Public PoC by watchTowr Labs on GitHub (July 20, 2026); Metasploit module in PR; Nuclei template CVE-2026-50522.yaml merged. |
| EPSS | 0.20346 (~20% probability of exploitation in next 30 days) — expect this to spike past 0.9 within a week given active exploitation. |
| KEV status | Not KEV-listed as of 2026-07-22, but CISA typically adds SharePoint unauth RCE within 48-72h of active-exploit evidence — expect listing this week. |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H = network, no auth, no UI, full CIA impact. Vendor score matches reality. |
| Affected versions | SharePoint Server Subscription Edition, 2019, and 2016 Enterprise. SharePoint Online (M365) is *not* affected. |
| Fixed versions | July 2026 Cumulative Update — KB pending confirmation per SKU. Patching alone is insufficient; machine-key rotation required. |
| Exposure population | Shodan shows ~7,800 internet-exposed on-prem SharePoint instances as of July 22; Censys shows ~9,100. Most large enterprises still run at least one internal farm. |
| Disclosure | 2026-07-14 — Microsoft Patch Tuesday advisory. PoC public 2026-07-20. |
| Reporter | Credited to researchers at Viettel Cyber Security and watchTowr Labs; follow-up analysis from Akamai and Rapid7. |
noisgate verdict.
The single most decisive factor is role multiplier plus active exploitation of an unauthenticated network vector: SharePoint is canonically a document-and-identity hub holding credentials, machine keys, and privileged farm-account Kerberos tickets, and the chain ends in domain-adjacent code execution with post-patch persistence via stolen machineKey. A public PoC dropped six days after disclosure and honeypots caught mass exploitation the same day, so both the friction floor and the deployment-role floor sit at CRITICAL with no downward pressure available.
Why this verdict
- Unauthenticated, network-reachable RCE — no credentials, no user interaction, one HTTP POST. AV:N/AC:L/PR:N/UI:N holds up under scrutiny.
- Public PoC + active exploitation — watchTowr's PoC is being weaponized in the wild as of July 20; EPSS will catch up but the operational signal is already here.
- Role multiplier: SharePoint as identity-adjacent tier — the chain lands as a farm service account that typically holds SQL rights and Kerberos delegation paths; blast radius routinely reaches AD. This is the high-value-role scenario and it represents the *typical* deployment, not the edge case. Floor = CRITICAL.
- Post-patch persistence via machineKey theft — patching alone does not evict the attacker. Historical ToolShell 2025 data shows re-compromise within weeks when keys weren't rotated.
- ~8-9k internet-exposed instances across Shodan/Censys; internal-only farms are still reachable to any attacker with a phishing foothold.
Why not higher?
There is no higher tier than CRITICAL / 9.8 in CVSS v3.1. If a 10.0 were reachable, this would qualify only if Scope:Changed applied — it does not, because compromise stays within the SharePoint security authority initially. The score is already at the ceiling.
Why not lower?
Downgrading would require narrow affected versions (it's not — three major SKUs), auth requirement (there isn't one), or low exposure (there are thousands of exposed instances plus universal internal reachability). None of the standard friction levers apply, and the deployment-role floor is CRITICAL by definition.
What to do — in priority order.
- Apply July 2026 SharePoint CU immediately — Per the noisgate mitigation SLA for CRITICAL + active exploitation, patch within hours, not days. Deploy the July 14, 2026 CU per SKU (SE / 2019 / 2016).
- Rotate ASP.NET machineKey on every farm, then IISRESET — The patch does not invalidate keys already stolen. Use
Update-SPMachineKey(SE/2019) or manual<machineKey>regeneration in web.config for 2016. Do this within the same 3-day CRITICAL mitigation window even if you already patched. - Block SharePoint from the public internet at the edge — Front with Entra Application Proxy, Cloudflare Access, or a reverse proxy enforcing pre-auth. Do this within 24 hours if patching lags.
- Enable AMSI integration for SharePoint — SharePoint SE/2019 supports AMSI; when enabled, Defender/EDR inspects deserialization payloads inline and blocks known ysoserial.net gadgets.
Set-SPAntivirusScanForRepresentedInvocation-equivalent config. - Hunt for indicators of prior compromise — Search for
spinstall0.aspx,debug_dev.aspx, unexpected files under/_layouts/15/, w3wp.exe spawning cmd/powershell, and outbound egress from the SharePoint host to non-corporate destinations. If pre-patch exposure existed, assume compromise until proven otherwise. - Constrain the SharePoint farm service account — Remove Domain Admin equivalence; enforce protected-users group, resource-based constrained delegation only. Limits the blast radius even if the next SharePoint 0-day lands.
- Vendor patch alone — does not rotate machine keys; adversaries who exfiltrated keys during the exposure window retain a valid re-entry token.
- WAF signature blocking on
TypeConfuseDelegate— trivially bypassed by alternate ysoserial.net gadgets; buys hours, not days. - MFA on SharePoint — the vuln bypasses authentication entirely; MFA never enters the request path.
- Network segmentation between SharePoint and users — users still need to reach it, and attackers pivot from a single phished endpoint. Doesn't stop the exploit.
Crowdsourced verification payload.
Run this on the SharePoint server itself in an elevated PowerShell console (as farm admin or local admin). Invocation: .\Check-CVE-2026-50522.ps1. Reports VULNERABLE / PATCHED / UNKNOWN based on SharePoint product build vs the July 2026 CU baselines.
#Requires -Version 5.1
#Requires -RunAsAdministrator
# Check-CVE-2026-50522.ps1
# Detects SharePoint 2016/2019/SE patch level vs July 2026 CU
$ErrorActionPreference = 'Stop'
# July 2026 CU minimum patched builds (verify against current MS advisory)
$patchedBuilds = @{
'16.0.5xxx' = [Version]'16.0.17928.20000' # SharePoint SE
'16.0.10' = [Version]'16.0.10417.20050' # SharePoint 2019
'16.0.4' = [Version]'16.0.5495.1000' # SharePoint 2016
}
try {
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction Stop
} catch {
Write-Output 'UNKNOWN: SharePoint snap-in unavailable — is this a SharePoint server?'
exit 2
}
$farm = Get-SPFarm
$build = $farm.BuildVersion
Write-Output "Detected SharePoint build: $build"
$sku = switch -Regex ($build.ToString()) {
'^16\.0\.179' { 'SE' ; break }
'^16\.0\.104' { '2019' ; break }
'^16\.0\.5[0-4]' { '2016' ; break }
default { 'UNKNOWN' }
}
if ($sku -eq 'UNKNOWN') {
Write-Output 'UNKNOWN: could not map build to SKU'
exit 2
}
$minPatched = switch ($sku) {
'SE' { $patchedBuilds['16.0.5xxx'] }
'2019' { $patchedBuilds['16.0.10'] }
'2016' { $patchedBuilds['16.0.4'] }
}
if ([Version]$build -ge $minPatched) {
Write-Output "PATCHED: SharePoint $sku build $build meets July 2026 CU baseline $minPatched"
Write-Output 'REMINDER: rotate machineKey and hunt for prior compromise regardless of patch state.'
exit 0
} else {
Write-Output "VULNERABLE: SharePoint $sku build $build is below required $minPatched — apply July 2026 CU immediately"
exit 1
}
If you remember one thing.
spinstall0.aspx and w3wp.exe spawning shell processes back to the disclosure date. The noisgate remediation SLA for CRITICAL is ≤90 days for full baseline compliance across the fleet — but for this one, if you're not done within 72 hours you should assume compromise on any exposed farm.Sources
- Microsoft MSRC advisory (via Tenable)
- The Hacker News — active exploitation after PoC
- SecurityAffairs — public PoC triggers exploitation
- SentinelOne vulnerability entry
- IONIX threat center writeup
- BleepingComputer — machine-key theft campaign
- Cybersecurity Dive — SharePoint under attack
- Akamai research — RCE detections & mitigations
What defenders are saying.
Crowdsourced verification outputs.
Results submitted by users who ran the verification payload against their environment.