SharePoint CVE-2026-56164: patch, hunt, rotate

The 2026 on-prem SharePoint exploit chain steals IIS machine keys. Patch, hunt, then rotate, in that order, or the attacker keeps their access.

Mayank Tripathi · Founder, CyberSpec

3 min read

Two paths to the same server — the patch stops the exploit path, while a second path opened by a stolen signing key runs straight past it and is closed only by a later key rotation

Updated 27 November 2026: SharePoint Server 2016 and 2019 left Microsoft support in July 2026; the post no longer calls them supported.

On 14 July 2026, CISA urged emergency hardening of on-premises SharePoint Server after a run of active exploitation covering CVE-2026-32201, CVE-2026-45659, CVE-2026-56164, CVE-2026-58644 and CVE-2026-50522. All three on-prem versions are in scope: Subscription Edition, 2019 and 2016. Microsoft's lifecycle pages for SharePoint Server 2019 and 2016 end extended support on 14 July 2026 (listed as 15 July, 06:59 Pacific time), so after that date neither gets further security updates. Subscription Edition is the only one still supported. This campaign is worth a dedicated writeup for what attackers do in the sixty seconds after the initial remote code execution, and for why a fully patched server can still belong to someone else.

Description of the vulnerability

The chain gets an attacker to unauthenticated code execution on an internet-facing SharePoint server. That much is a normal, if serious, RCE story. The post-exploitation step is the interesting part.

Once running code on the box, attackers harvest the IIS / ASP.NET machine keys: the validationKey and decryptionKey that the server uses to sign and encrypt __VIEWSTATE and other application state. Those keys are the server's trust anchor for data it hands to clients and expects back unaltered.

With the keys in hand, an attacker can forge a __VIEWSTATE payload the server will accept as genuine and deserialise, giving code execution on demand, authenticated as the application itself. That capability does not depend on the original vulnerability. Patch the RCE and the forged-key path still works, because the intrusion has been promoted from a bug you can fix to a credential you have to revoke. Operators have used it to drop webshells (the spinstall*.aspx family is the well-documented example) and deploy malware for long-term access.

Resolution steps

Order matters here more than in a routine patch cycle. Rotating keys before you have removed the attacker's key-harvesting foothold just hands them the new keys.

  1. Apply the July 2026 SharePoint updates to every on-prem instance, Subscription Edition, 2019 and 2016 alike. Microsoft's own advisory for CVE-2026-56164 lists the exact KB per version.
  2. Hunt before rotating. Look for spinstall*.aspx-class webshells and other unexpected .aspx files in the layouts directories, unsigned or anomalous __VIEWSTATE payloads in IIS logs, unexpected w3wp.exe child processes, and scheduled tasks or services created around the intrusion window.
  3. Remove every artefact you find (webshell, dropped binary, persistence entry), and only then continue.
  4. Rotate the ASP.NET machine keys on each affected server, then restart IIS so the running worker processes pick up the new material. Farm members share keys: rotate across the farm, not one node.
  5. Audit AD FS DKM ACLs if the environment federates through AD FS. The same campaign has reached for that token-signing material, and a stolen signing key outlives every SharePoint patch you apply.
  6. Reduce the exposure. On-prem SharePoint published directly to the internet is the precondition for all of the above. Put it behind an identity proxy or VPN, or move it, if the business case allows.
  7. Plan off 2016 and 2019. They are out of support, so the next SharePoint bug on those versions may never get a fix. Microsoft's lifecycle pages point to an upgrade to Subscription Edition.

Conclusion

The lesson generalises well past SharePoint: for any application whose compromise leaks signing or encryption keys, patching closes the door and leaves the old locks in place. Your remediation checklist for this class of bug needs three steps: patch, hunt, rotate. The hunt has to sit in the middle or the rotation is wasted work.

It also assumes you know that the server exists and is reachable from outside. CyberSpec's scheduled scans of the domains, IPs and ranges you have verified show which services on them answer from the internet, flag exposed admin interfaces, and map each finding to the SOC 2 and ISO 27001 control families it touches. It only sees what you add, so the asset list still has to be complete.

Related