Skip to content
RCE Write-up Advanced

Sharepoint Backdoor To Doomsday

A SharePoint zero-day allowed unauthenticated remote code execution because requests with a Referer header pointing to the logout page skipped authentication and reached an insecure BinaryFormatter deserialisation path. Attackers could run code as the SharePoint service account, deploy web shells, steal machine keys and persist.

medium.com

Published on medium.com

The start of July 7, 2025 brought about the launch of a major cyber operation which would become one of the most important events of that year. The first day of exploitation of Microsoft SharePoint Server zero-day vulnerability led to the compromise of more than 400 organizations across the globe which included the…

Decoded Intel, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely a conditional authentication check that trusted the Referer header for requests appearing to come from the logout page, combined with deserialisation of untrusted data through the deprecated BinaryFormatter class.

Impact

Attackers could execute code without authentication, deploy persistent web shells and IIS modules, steal cryptographic keys and move laterally, with over 400 organisations compromised including a US nuclear security agency.

What the attacker needed

Network access to the SharePoint server; No authentication required; Target runs vulnerable on-premises SharePoint

The fix

Microsoft should remove the insecure BinaryFormatter deserialisation path and the Referer-based authentication bypass; the text notes patching alone is insufficient and recommends rotating machine keys, removing web shells and checking IIS modules, or moving to SharePoint Online.

How it was found

  1. Send an HTTP POST request to the ToolPane.aspx endpoint.
  2. Set the Referer header to the SignOut.aspx page so the request appears to come from logout.
  3. Include a .NET serialised object in the request body.
  4. The server deserialises the object with BinaryFormatter and runs attacker code as the SharePoint service identity.
  5. Deploy an ASPX web shell into SharePoint virtual directories.
  6. Harvest ValidationKeys, DecryptionKeys and CompatibilityMode settings from the configuration database and registry.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

SharePoint is a Microsoft product that organisations use to share documents and collaborate. A flaw meant that a specially crafted web request could trick the server into running the attacker's code without logging in, because the server trusted a header that said the request came from the logout page and then processed untrusted data with an unsafe .NET feature called BinaryFormatter.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.