CVE-2026-65660: SharePoint Server code injection, first labelled spoofing and now exploited
A SafeControls validation bypass in on-prem SharePoint (CVSS 8.8, on CISA KEV) gives a low-privileged user code execution. Root cause, affected builds, detection, IOCs and the fix.
CVE-2026-65660 shipped in Microsoft’s August 2026 Patch Tuesday as a medium-severity spoofing bug. On 27 August Microsoft reclassified it as remote code execution. On 25 September Microsoft said it had reliable evidence of attacks, and CISA added it to the KEV catalog the same day. If you triaged from the original advisory, you probably filed it under “next cycle”. Re-triage it now. For the wider picture, see the 2026 RCE field guide.
Scope and ethics. This post covers architecture, exposure checks, detection and remediation for SharePoint farms you own or are authorized to assess. It contains no exploit markup or crafted requests. Lab validation means confirming builds and configuration on a VM you control, not firing a PoC at a server.
At a glance
| CVE | CVE-2026-65660, “Microsoft SharePoint Server Remote Code Execution Vulnerability” |
| Severity | CVSS 3.1 8.8 High, AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (Microsoft CNA, via NVD). The original 11 Aug listing was a 6.5 spoofing rating |
| CWE | CWE-94 Improper Control of Generation of Code |
| Affected | SharePoint Server Subscription Edition, SharePoint Server 2019, SharePoint (Enterprise) Server 2016. SharePoint Online isn’t listed |
| Fixed in | SE 16.0.19725.20522 (KB5002893) · 2019 16.0.10417.20198 (KB5002894 + KB5002896) · 2016 16.0.5565.1001 (KB5002905 + KB5002906). Released 11 Aug 2026 |
| Exploited? | Yes. Microsoft confirmed attacks on 25 Sep 2026. CISA KEV added 25 Sep (federal due date 28 Sep), with forensic triage required |
| Auth / interaction | Low-privileged authenticated user / none. A separate, already-patched bug made a pre-auth chain possible on sites that allow anonymous access (details below) |
Description: how the bug works
SharePoint lets users add web parts and controls to pages, but only types on the farm’s SafeControls allowlist (the <SafeControls> section of web.config) may be loaded from page markup. That allowlist is the boundary between “a user who can edit a page” and “a user who can run arbitrary .NET code on the server”.
According to the reporter’s published analysis (summarized by The Hacker News), the problem sits in the ToolPane component. When ToolPane rebuilds Register directives from web-part markup, it doesn’t escape double quotes inside attribute values. A crafted value can break out of its attribute and inject extra directives. Those directives register .NET types after the SafeControls check has run but before the types are loaded. In other words, validation checks one thing and the loader gets another. From there, a XAML parser (XamlServices.Parse()) acts as a deserialization sink that turns attacker-chosen types into code execution in the SharePoint worker process.
That’s why Microsoft’s FAQ says an attacker needs only “low-level access” to send “a specially crafted request”. The bug was reported by Dinh Ho Anh Khoa of Viettel Cyber Security, who also showed the earlier ToolShell chain at Pwn2Own Berlin 2025.
The pre-auth chain
Previdian, which captured the in-the-wild attempts, describes a second, separate bug. Before Microsoft’s 9 June 2026 update, a WebPartPage with a web-part zone (for example AddGallery.aspx) could put ToolPane into edit mode without checking authentication, but only on sites with anonymous viewing enabled. Chained with CVE-2026-65660, that gives unauthenticated RCE. Previdian notes the delivery bug’s CVE ID is unknown. Practically: a farm that skipped June and August updates and allows anonymous access is exposed with no credentials at all.
Impact
- Code execution in the SharePoint IIS worker process (
w3wp.exe), running as the web application’s app-pool identity. - Web shells and persistence. Previdian’s 25 Sep update says exploitation drops a web shell at
/_layouts/15/sphealth.aspx. - Follow-on access. A SharePoint server normally holds service-account credentials, farm config and document content, and has trusted paths into AD and SQL. Treat a compromised farm as a domain-level incident, not a web-server incident.
Which deployments are exposed
| Deployment | Status |
|---|---|
| SharePoint Server Subscription Edition < 16.0.19725.20522 | Affected |
| SharePoint Server 2019 < 16.0.10417.20198 | Affected |
| SharePoint (Enterprise) Server 2016 < 16.0.5565.1001 | Affected (same KB for Server 2016 and Enterprise Server 2016, per Microsoft’s FAQ) |
| SharePoint Server 2013 | Not in Microsoft’s list. The reporter says it’s affected too, but it’s out of support and gets no fix |
| SharePoint Online (Microsoft 365) | Not listed as affected |
Prerequisites: network reachability to the SharePoint web application, an unpatched build, and any authenticated account with low-level access. For the pre-auth route, add: June 2026 update missing and anonymous access enabled on a site.
Identifying affected systems
Run these on farm servers you administer, in the SharePoint Management Shell as a farm admin:
# 1) Farm build: compare against the fixed builds in the table above
(Get-SPFarm).BuildVersion
# 2) Per-server patch state: look for servers that are behind or need an upgrade
Get-SPProduct -Local
Get-SPServer | Select-Object Name, Role, NeedsUpgrade
# 3) Were the specific KBs installed? (2019 and 2016 need BOTH packages)
Get-HotFix | Where-Object HotFixID -in 'KB5002893','KB5002894','KB5002896','KB5002905','KB5002906'
# If Get-HotFix shows nothing, check Programs and Features > Installed Updates;
# SharePoint updates don't always register there.
# 4) Which web applications/zones allow anonymous access? (pre-auth chain prerequisite)
Get-SPWebApplication | ForEach-Object {
$wa = $_
$wa.IisSettings.GetEnumerator() | ForEach-Object {
[pscustomobject]@{ WebApp = $wa.Url; Zone = $_.Key; Anonymous = $_.Value.AllowAnonymous }
}
}
Microsoft’s FAQ says install every package listed for your version. On 2019 and 2016 a farm with only one of the two KBs is still incomplete. After patching, run the SharePoint Products Configuration Wizard (or PSConfig.exe) on each server, then confirm NeedsUpgrade is False.
Safe validation in an isolated lab
You don’t need to trigger the bug to prove you’re covered. Test your process instead:
- On an isolated lab farm, take a snapshot at a pre-August build, then apply the August packages and PSConfig to a second snapshot.
- Run the build checks above and your vulnerability scanner against both. Only the old one should be flagged. If neither is, your scanner is reading the wrong version source.
- Toggle anonymous access on a lab web application and confirm the inventory script picks it up.
- Generate benign
w3wp.exe → cmd.exe /c whoamiactivity from a lab-only test page and confirm your EDR rule from the next section fires. Remove the page afterwards.
Detection and threat hunting
Web logs (IIS, %SystemDrive%\inetpub\logs\LogFiles\W3SVC*). Previdian’s honeypot capture (24 Sep, 12 POSTs from one source over six URL paths) suggests these hunts:
POSTto/_layouts/15/AddGallery.aspxor/_layouts/15/designgallery.aspxwithDisplayMode=Editin the query string, especially with no authenticated user (cs-username=-).- The same requests with repeated
/_layouts/or/_layouts/15/path segments. - Bursts of closely spaced POSTs from a single IP. Note that hunts tuned to the older ToolShell pattern (
ToolPane.aspx) won’t catch these.
# Read-only sweep of IIS logs for the published request pattern and web-shell path
Select-String -Path "$env:SystemDrive\inetpub\logs\LogFiles\W3SVC*\*.log" `
-Pattern 'AddGallery\.aspx|designgallery\.aspx|sphealth\.aspx' |
Where-Object { $_.Line -match 'POST|sphealth' } | Select-Object -First 200
Files. Check for the web shell and any recently written .aspx files in LAYOUTS:
$layouts = "$env:CommonProgramFiles\microsoft shared\Web Server Extensions\16\TEMPLATE\LAYOUTS"
Test-Path "$layouts\sphealth.aspx"
Get-ChildItem $layouts -Filter *.aspx -Recurse | Where-Object LastWriteTime -gt (Get-Date '2026-08-01') |
Select-Object FullName, LastWriteTime, Length
Process lineage. w3wp.exe spawning cmd.exe, powershell.exe, csc.exe, certutil.exe or rundll32.exe on a SharePoint server is the highest-signal alert. Also look for .NET assemblies loaded from temp paths by w3wp.exe.
Published IOCs (Previdian, 24–25 Sep 2026):
| Type | Value |
|---|---|
| Source IP | 169.150.248[.]21 (AS212238, Datacamp Limited) |
| User-Agent | Firefox 120 |
| Web shell | /_layouts/15/sphealth.aspx |
| Assembly | wt3k3sij.dll (391,680 bytes), SHA-256 d3faa4b443d98f272363f3484a5e6a9bab90979086aa2d31a1694c1dc8178742 |
| Assembly | 24e5mo4s.dll (4,096 bytes), SHA-256 a151a8fc193a96aac480fa749547b57c0f33116cf2cb8c82b6aa716c3c47f4b1 |
| Loader family | SdLoader (in-memory assembly loader; final payload not recovered) |
Previdian notes that one capture can’t rule out research scanning, so treat these as hunting leads, not a complete IOC set. Because exploitation is confirmed, hunt before you declare a farm clean, especially for internet-facing farms that were unpatched on 24 September.
Remediation
- Install every August 2026 package for your version: KB5002893 (SE), KB5002894 + KB5002896 (2019), KB5002905 + KB5002906 (2016). Later cumulative updates also include the fix. Then run PSConfig on every server in the farm.
- Confirm the June 2026 update is in place too. It closes the anonymous delivery route that turns this into a pre-auth bug.
- Retire SharePoint 2013. No fix is coming.
- If you find signs of compromise, treat the farm as breached: isolate it, preserve IIS logs and memory, then rotate the farm’s service-account credentials and ASP.NET machine keys before you rebuild trust. A web shell that ran as the app-pool identity could have read them.
Interim hardening (if you truly can’t patch today)
Microsoft lists no workaround for this CVE, so these only reduce exposure:
- Disable anonymous access on web applications and zones that don’t need it. That closes the published pre-auth route but does not stop an authenticated attacker.
- Take the farm off the internet or put it behind pre-authenticating access (VPN or a reverse proxy that requires sign-in).
- Audit who can edit pages. The attacker needs only low-level access, so a broad “Members can edit” model across many sites widens the pool of usable accounts.
- Add a WAF or reverse-proxy rule to alert on (or block)
DisplayMode=EditPOSTs toAddGallery.aspxanddesigngallery.aspxfrom outside your admin networks.
References
- CVE-2026-65660, Microsoft Security Update Guide · MSRC CSAF record (KBs, builds, revision history)
- CVE-2026-65660, NVD
- CISA KEV catalog entry
- Previdian: two-stage SharePoint exploitation attempts (IOCs)
- The Hacker News: SharePoint flaw initially listed as spoofing
- KB articles: 5002893 · 5002894 · 5002896 · 5002905 · 5002906
Verify every version against the vendor advisory before acting. Published 01 Nov 2026.