Someone left the vault door open and labeled the combination on a sticky note taped to the handle
CVE-2026-50522 is an unauthenticated remote code execution vulnerability in on-premises Microsoft SharePoint Server caused by insecure use of .NET BinaryFormatter deserialization in the /_trust/default.aspx WS-Federation endpoint. An attacker sends a crafted SecurityContextToken cookie containing a malicious serialized object graph; the SharePoint SessionSecurityTokenHandler deserializes it without validation, triggering arbitrary code execution under the SharePoint application pool identity — typically a highly-privileged domain service account. Affected versions are SharePoint Enterprise Server 2016 (before 16.0.5561.1001), SharePoint Server 2019 (before 16.0.10417.20175), and SharePoint Server Subscription Edition (before 16.0.19725.20434). SharePoint Online is not affected.
Microsoft's CRITICAL / 9.8 rating is accurate and, if anything, undersells the real-world impact. The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) correctly captures the zero-friction attack surface. What the score alone does *not* convey is the post-exploitation persistence problem: attackers are extracting IIS machineKey values in the same request that achieves RCE, enabling them to forge ASP.NET authentication tokens that survive patching. This means the standard patch-and-move-on playbook is insufficient — you must also rotate machine keys and hunt for web shells. The vulnerability was discovered by DEVCORE researcher *splitline* and demonstrated at Pwn2Own Berlin 2026 (ZDI-26-412). A public PoC by researcher *Janggggg* appeared on July 20, and watchTowr's honeypot network recorded exploitation attempts within hours. CISA added CVE-2026-50522 to the KEV catalog on July 22, 2026 with a remediation deadline of July 25 for FCEB agencies.
6 steps from start to impact.
Identify target SharePoint instance
MicrosoftSharePointTeamServices HTTP header or /_layouts/15/ paths. Censys identifies approximately 1,500–3,300 self-hosted instances. For internal targets, any network position that reaches the SharePoint web front-end suffices — no VPN or proxy bypass is needed beyond initial network access.- Network reachability to the SharePoint web front-end (port 80/443)
- Only ~1,500-3,300 on-prem instances are internet-facing; vast majority are internal-only
- Some deployments sit behind WAFs or reverse proxies that strip identifying headers
MicrosoftSharePointTeamServices header. Defenders can monitor for scanning of /_trust/default.aspx in IIS logs.Craft BinaryFormatter deserialization payload
ysoserial.net, the attacker generates a .NET BinaryFormatter gadget chain (e.g., TypeConfuseDelegate or TextFormattingRunProperties) targeting arbitrary command execution. The payload is embedded into a forged SecurityContextToken cookie. The public PoC by 4minx on GitHub automates this entire step, including bulk-scan mode with OOB callback verification.- Access to ysoserial.net or the public PoC tool (github.com/4minx/CVE-2026-50522)
- Knowledge of target SharePoint version (optional — payload is version-agnostic)
- Antivirus may flag ysoserial.net during download or execution on the attacker's machine
- Some EDR products detect known ysoserial gadget chains in transit
/_trust/default.aspx.Deliver payload to /_trust/default.aspx
/_trust/default.aspx WS-Federation endpoint with the malicious SecurityContextToken cookie. The SessionSecurityTokenHandler deserializes the cookie without authentication checks, triggering the gadget chain. Code executes in the context of the IIS application pool identity, which is typically a domain service account (e.g., DOMAIN\sp_farm).- No authentication required
- No user interaction required
- Target must be running an unpatched SharePoint version
- A WAF with .NET deserialization rules *may* block the payload, but most WAFs do not inspect cookie-level serialized objects by default
- Rate-limiting or geo-blocking on the endpoint could slow but not prevent targeted attacks
/_trust/default.aspx from unexpected sources. watchTowr confirmed their honeypot captures showed zero authentication material in the exploit requests.Extract machine keys and establish persistence
machineKey values (validationKey and decryptionKey) from SharePoint's web.config file. These keys allow forging valid ASP.NET ViewState and authentication tokens, enabling persistent access that survives patching. Concurrently, a web shell (e.g., ASPX-based) is dropped into a SharePoint directory for ongoing C2 access.- Successful RCE from step 3
- The SharePoint service account has read access to web.config (it always does)
- EDR/AV on the SharePoint server may detect web shell writes or config file reads
- Application-level file integrity monitoring would alert on web.config access
web.config. Hunt for new .aspx files in SharePoint directories. Microsoft Defender for Endpoint detects known web shell patterns.Pivot to domain compromise
dbcreator and securityadmin SQL Server roles, plus various AD permissions. From this foothold, the attacker can: dump credentials from the SharePoint configuration database, access SQL Server instances, use the service account's Kerberos tickets for lateral movement, or leverage the forged authentication tokens to impersonate any SharePoint user including site collection administrators. Resecurity documented complete domain compromise chains originating from this exact exploitation pattern.- SharePoint service account has typical domain privileges (near-universal in enterprise deployments)
- Active Directory is reachable from the SharePoint server (always true for domain-joined servers)
- Network segmentation between SharePoint and domain controllers would slow lateral movement
- Privileged Access Workstations (PAWs) and tiered administration reduce the blast radius
- Credential Guard on the SharePoint server limits credential theft
Maintain access post-patch
- Machine keys were not rotated after patching
- Web shells were not identified and removed during incident response
- Organizations that follow CISA's guidance to rotate keys AND hunt for artifacts close this loop
- AMSI-aware SharePoint deployments may detect web shell execution
machineKey values against pre-patch baseline. Scan for unauthorized .aspx files. Monitor for authentication events using tokens with unexpected issuance timestamps.validationKey and decryptionKey in SharePoint's web.config and propagate across the farm. This invalidates any stolen machine keys and prevents the attacker from forging authentication tokens post-patch. Microsoft's guidance and watchTowr both emphasize this step. Without it, a patched server remains compromised if keys were exfiltrated. Deploy immediately after patching — within 3 days of patch application..aspx, .ashx, and .asmx files. Compare against a known-good baseline. Use Microsoft Defender for Endpoint's web shell detection or manual file integrity checks. Any web shell found indicates prior compromise and requires full incident response. Conduct within 3 days.- MFA on SharePoint logins — the vulnerability is pre-authentication; MFA is never invoked because the attacker exploits the deserialization endpoint before any authentication decision occurs.
- TLS/SSL encryption — the payload is delivered over a standard HTTPS connection; encryption protects the transport but does nothing to prevent the server from deserializing malicious content.
- SharePoint farm passphrase rotation — the farm passphrase secures farm-join operations, not the IIS machine keys used for ViewState and token validation; rotating it does not invalidate stolen
machineKeyvalues. - Disabling anonymous access in SharePoint site settings — the vulnerable endpoint (
/_trust/default.aspx) is an IIS-level handler that processes requests before SharePoint's own authentication layer evaluates them; site-level anonymous access settings are irrelevant.
The supporting signals.
| In-the-Wild Exploitation | Confirmed active. watchTowr honeypots captured exploitation within hours of PoC release (July 20, 2026). CISA added to KEV on 2026-07-22 with a 3-day FCEB remediation deadline (July 25). Resecurity documented full domain compromise chains in the wild. |
|---|---|
| Proof-of-Concept | Multiple public PoCs. Primary: 4minx/CVE-2026-50522 (44 stars, 17 forks) — a mass-scan exploit using ysoserial.net payloads against /_trust/default.aspx. Secondary: ChPratik/CVE-2026-50522 (threat intel documentation). Original PoC by researcher Janggggg released July 20. Discovery credited to DEVCORE researcher splitline via Pwn2Own Berlin 2026 (ZDI-26-412). |
| EPSS | 0.03042 (96th+ percentile) — indicates a ~3% probability of exploitation in the next 30 days, which is extremely high relative to the general CVE population and consistent with confirmed active exploitation. |
| KEV Status | Listed. Added 2026-07-22. CISA BOD compliance deadline: 2026-07-25. Binding on all FCEB agencies. |
| CVSS Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H — network-accessible, low complexity, no privileges, no user interaction, full CIA impact. This is the maximum-severity profile for an unauthenticated RCE. |
| Affected Versions | SharePoint Enterprise Server 2016 (<16.0.5561.1001), SharePoint Server 2019 (<16.0.10417.20175), SharePoint Server Subscription Edition (<16.0.19725.20434). SharePoint Online is NOT affected (Microsoft-managed). |
| Fixed Versions | SharePoint 2016: 16.0.5561.1001, SharePoint 2019: 16.0.10417.20175, SharePoint SE: 16.0.19725.20434 — all released July 14, 2026 Patch Tuesday. Post-patch, machine key rotation is additionally required. |
| Scanning & Exposure | Censys observes ~334,000 SharePoint web properties globally, of which ~1,500–3,300 are self-hosted on-premises instances. Predominantly SharePoint 2019. Largest concentrations: United States, Germany, France, Canada. Many additional instances behind reverse proxies are not enumerable. |
| Discovery & Disclosure | Discovered by DEVCORE researcher splitline; demonstrated at Pwn2Own Berlin 2026 (ZDI-26-412). Reported to Microsoft; patched July 14, 2026. Public PoC by Janggggg appeared July 20. Active exploitation confirmed by watchTowr and Defused (as early as July 17). |
| Related Vulnerabilities | Part of a July 2026 SharePoint vulnerability cluster including CVE-2026-58644 (also 9.8, deserialization, actively exploited), CVE-2026-56164, CVE-2026-45659, CVE-2026-32201, CVE-2026-55040. SecurityWeek reported this as the *fourth* SharePoint vulnerability exploited in the same month's wave of attacks. |
Sources.
- CISA KEV Catalog Entry
- Help Net Security — Patch then rotate machine keys
- SOCRadar — PoC Fuels SharePoint Attacks
- Censys Advisory — SharePoint Server RCE
- SecurityWeek — Fourth SharePoint Vulnerability Exploited
- Resecurity — From Web Request to Domain Compromise
- 4minx PoC Repository
- CISA SharePoint Hardening Alert
Why this verdict
- Zero-friction pre-auth RCE: The attack requires no credentials, no user interaction, and low complexity. A single HTTP POST to
/_trust/default.aspxachieves code execution. The CVSS vector correctly captures maximum attacker accessibility — there is no friction discount to apply here. - Active exploitation with weaponized tooling: KEV-listed since July 22, 2026. Public PoC (4minx) supports mass-scan mode with OOB verification. watchTowr confirmed exploitation within hours of PoC release. This is not theoretical — it is being used in the wild right now.
- Machine key theft creates a persistence problem that survives patching: Unlike a typical RCE where patching closes the door, here the attacker extracts
machineKeyvalues that allow indefinite token forgery. Organizations that patch but do not rotate keys remain fully compromised. This amplifies the effective impact beyond what CVSS captures. - Role multiplier — SharePoint as a domain-compromise pivot: SharePoint servers are domain-joined Windows servers running under service accounts with significant AD privileges (typically
dbcreator/securityadminon SQL, plus various domain permissions). Resecurity documented complete domain-compromise chains originating from this CVE. The blast radius is not limited to the SharePoint farm — it extends to the entire Active Directory domain. This is a *domain-scale* outcome on a component where the high-value role (enterprise collaboration server with domain service account) represents ≥90% of the on-premises installed base — virtually every on-prem SharePoint is domain-joined. The verdict floor is CRITICAL by the deployment-role rule. - Role multiplier — data tier access: SharePoint databases typically contain sensitive enterprise documents (legal, HR, financial, regulated data). Compromise grants immediate access to this data tier without additional lateral movement, making the confidentiality impact fleet-scale even before domain pivot.
- Internal exposure dwarfs internet exposure: While only ~1,500–3,300 instances are internet-facing, the vast majority of on-premises SharePoint deployments are reachable from the internal network. Any attacker with initial network access (phishing, VPN compromise, compromised workstation) can exploit this with zero additional friction. The limited internet-facing count does NOT materially reduce severity for enterprise defenders managing internal assets.
Why not higher?
A 9.8 is already the practical ceiling for CVSS 3.1 base scores. The post-patch persistence via machine key theft could arguably push the *effective* severity beyond what the scoring system captures, but within the 0–10 scale, 9.8 is the correct maximum for an unauthenticated network RCE with full CIA impact.
Why not lower?
Every downgrade consideration fails the friction test. Internet exposure is limited (~1,500–3,300), but internal exposure is near-universal for on-prem SharePoint. WAFs *might* block the payload, but most do not inspect cookie-level deserialization by default. EDR *might* detect web shells, but the initial RCE executes in the IIS worker process context before any file-write detection triggers. The confirmed active exploitation, KEV listing, public weaponized tooling, and documented domain-compromise chains eliminate any basis for downgrade. The deployment-role floor is CRITICAL because SharePoint is canonically a domain-joined enterprise server with privileged service accounts in ≥90% of on-prem installations.
Crowdsourced verification payload.
Run this on each SharePoint server as a local administrator. It checks the installed SharePoint build number against the patched versions. Example: .\Check-CVE-2026-50522.ps1 from an elevated PowerShell prompt. No network access or credentials beyond local admin are required.
#Requires -RunAsAdministrator
<#
Check-CVE-2026-50522.ps1
Checks whether the local SharePoint installation is patched for CVE-2026-50522.
Exit codes: 1 = VULNERABLE, 0 = PATCHED, 2 = UNKNOWN
#>
try {
$spSnap = Get-PSSnapin -Name Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
if (-not $spSnap) {
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction Stop
}
} catch {
# Fallback: check registry for SharePoint version
$regPaths = @(
'HKLM:\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\16.0',
'HKLM:\SOFTWARE\Microsoft\Office Server\16.0'
)
$found = $false
foreach ($rp in $regPaths) {
if (Test-Path $rp) {
$found = $true
break
}
}
if (-not $found) {
Write-Host 'UNKNOWN - SharePoint does not appear to be installed on this host.'
exit 2
}
}
try {
$farm = [Microsoft.SharePoint.Administration.SPFarm]::Local
if (-not $farm) {
Write-Host 'UNKNOWN - Unable to connect to local SharePoint farm.'
exit 2
}
$buildVersion = $farm.BuildVersion
$major = $buildVersion.Major
$minor = $buildVersion.Minor
$build = $buildVersion.Build
$rev = $buildVersion.Revision
$fullVersion = "$major.$minor.$build.$rev"
Write-Host "Detected SharePoint build: $fullVersion"
} catch {
# Fallback: read version from SharePoint DLL
$dllPath = "${env:CommonProgramFiles}\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.dll"
if (Test-Path $dllPath) {
$ver = (Get-Item $dllPath).VersionInfo.FileVersion
Write-Host "Detected SharePoint DLL version: $ver"
$parts = $ver.Split('.')
$major = [int]$parts[0]
$minor = [int]$parts[1]
$build = [int]$parts[2]
$rev = [int]$parts[3]
$fullVersion = $ver
} else {
Write-Host 'UNKNOWN - Cannot determine SharePoint version.'
exit 2
}
}
# Patched builds (July 2026 Patch Tuesday):
# SP 2016: 16.0.5561.1001
# SP 2019: 16.0.10417.20175
# SP SE: 16.0.19725.20434
$vulnerable = $false
$product = 'Unknown'
if ($build -ge 19000) {
$product = 'SharePoint Server Subscription Edition'
if ($build -lt 19725 -or ($build -eq 19725 -and $rev -lt 20434)) {
$vulnerable = $true
}
} elseif ($build -ge 10000) {
$product = 'SharePoint Server 2019'
if ($build -lt 10417 -or ($build -eq 10417 -and $rev -lt 20175)) {
$vulnerable = $true
}
} elseif ($build -ge 5000) {
$product = 'SharePoint Server 2016'
if ($build -lt 5561 -or ($build -eq 5561 -and $rev -lt 1001)) {
$vulnerable = $true
}
} else {
Write-Host "UNKNOWN - Unrecognized SharePoint build: $fullVersion"
exit 2
}
Write-Host "Product: $product"
Write-Host "Build: $fullVersion"
if ($vulnerable) {
Write-Host 'VULNERABLE - This SharePoint server is NOT patched for CVE-2026-50522.'
Write-Host 'ACTION: Apply the July 2026 Patch Tuesday update immediately and rotate machine keys.'
exit 1
} else {
Write-Host 'PATCHED - This SharePoint server has the fix for CVE-2026-50522.'
Write-Host 'REMINDER: Ensure IIS machine keys have been rotated if the server was exposed pre-patch.'
exit 0
}