Jan 30, 2026·6 min read·8 visits
Unauthenticated RCE in Sitecore 10.4. Attackers send a malicious serialized .NET object in the 'ThumbnailsAccessToken' header. The server deserializes it using the banned `BinaryFormatter`, granting the attacker a shell. Patch immediately with KB1002844.
A critical insecure deserialization vulnerability in Sitecore Experience Manager (XM) and Experience Platform (XP) 10.4 allows unauthenticated remote attackers to execute arbitrary code via the 'ThumbnailsAccessToken' HTTP header. Despite a confusingly low initial CVSS score, this is a textbook RCE leading to full system compromise.
It is the year 2025. Flying cars are still a prototype, AI writes our poetry, and yet, somehow, we are still fighting BinaryFormatter vulnerabilities in enterprise software. Enter Sitecore, the heavyweight champion of Digital Experience Platforms (DXP). It’s complex, it’s expensive, and it powers some of the biggest websites on the planet.
Recently, a researcher discovered a rather peculiar HTTP header being processed by Sitecore XM and XP versions 10.4: ThumbnailsAccessToken. To the untrained eye, this looks like a boring authentication token for fetching image previews. But to a hacker, it smells like opportunity.
The component handling this header wasn't just checking a string. It wasn't validating a JWT. It was taking whatever data you fed it, treating it as a serialized .NET object, and attempting to bring it back to life. In the security world, we call this "trusting the user to hold a loaded gun." And in this specific case, the gun was pointed directly at the server's head.
The root cause of CVE-2025-27218 is a classic case of Insecure Deserialization (CWE-502). Specifically, the application utilizes the System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class to process the contents of the ThumbnailsAccessToken header.
Microsoft has been screaming from the rooftops for years: Do not use BinaryFormatter. It is unsafe by design. There is no way to secure it. If you pass untrusted data to it, you lose. Period. Yet, legacy codebases—and occasionally new mistakes—keep this zombie alive.
When the Sitecore application receives a request with this header, it performs the following fatal dance:
BinaryFormatter.Deserialize().Because BinaryFormatter is a polymorphic serializer, it will instantiate whatever class the data stream tells it to. If an attacker sends a serialized object containing a "gadget" (a class present in the .NET framework that does something dangerous upon instantiation or property access), the deserializer obliges. It creates the object, runs the dangerous code, and hands the server keys to the attacker.
Let's look at the logic flow. While the exact proprietary source code isn't public, the behavior can be reconstructed with high accuracy based on the exploit mechanics. The vulnerability exists in how the thumbnail generation endpoint authenticates requests.
The Vulnerable Logic (Conceptual C#):
public void ProcessRequest(HttpContext context)
{
string token = context.Request.Headers["ThumbnailsAccessToken"];
if (!string.IsNullOrEmpty(token))
{
byte[] bytes = Convert.FromBase64String(token);
using (MemoryStream ms = new MemoryStream(bytes))
{
// THE KILL ZONE
BinaryFormatter formatter = new BinaryFormatter();
object trustedToken = formatter.Deserialize(ms);
// ... validate trustedToken ...
}
}
}See the issue? The code deserializes the object before it validates what the object actually is. By the time the code reaches the validation step (if it even does), the damage is already done. The act of deserialization triggers the payload execution.
The fix involves removing BinaryFormatter entirely and replacing it with a safe serialization mechanism (like JSON) or strictly validating the input before it touches any deserializer. In KB1002844, Sitecore essentially surgically removes this unsafe handling.
Exploiting this is trivially easy for anyone with a copy of ysoserial.net. The attack does not require authentication, meaning any exposed Sitecore instance is fair game.
The Attack Chain:
ysoserial.net to create a serialized object using a known gadget chain. The WindowsIdentity gadget is a popular choice for this environment.
ysoserial.exe -g WindowsIdentity -f BinaryFormatter -c "cmd.exe /c whoami > C:\Windows\Temp\pwned.txt"Visualizing the Attack:
We can see this in action in the Metasploit module exploit/windows/http/sitecore_xp_cve_2025_27218. The module automates the payload generation and header injection, turning a complex deserialization theory into a "point and click" shell.
You might notice the CVSS score is 5.3. You might look at that and think, "Medium severity? I can patch this next month."
Do not do that.
The NVD score likely reflects a misunderstanding of the impact scope or an initial classification error (perhaps confusing it with information disclosure). However, the technical reality is absolute Remote Code Execution. The attacker executes commands as the IIS user (usually NT AUTHORITY\NETWORK SERVICE or a dedicated service account).
From that foothold, an attacker can:
The EPSS score sits at the 98th percentile for a reason. This is a "drop everything and fix it" vulnerability, regardless of what the generic score says.
If you run Sitecore XM or XP 10.4, you have one job today: Install KB1002844.
This hotfix patches the vulnerability by altering how the ThumbnailsAccessToken is processed. Unlike some mitigations that just filter gadgets (which researchers eventually bypass), this patch addresses the root cause.
Defense in Depth Strategies:
ThumbnailsAccessToken header. Unless you have a very specific, verified need for it, block it. If you do need it, alert on header values that exceed typical length or contain non-alphanumeric characters (indicating Base64 blobs).w3wp.exe spawning unusual child processes. IIS worker processes shouldn't typically be launching cmd.exe or powershell.exe.CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Sitecore Experience Manager (XM) Sitecore | 10.4.0 < KB1002844 | 10.4 + KB1002844 |
Sitecore Experience Platform (XP) Sitecore | 10.4.0 < KB1002844 | 10.4 + KB1002844 |
| Attribute | Detail |
|---|---|
| CVE ID | CVE-2025-27218 |
| CWE | CWE-502 (Insecure Deserialization) |
| CVSS v3.1 | 5.3 (Official) / 9.8 (Real World Impact) |
| EPSS Score | 0.576 (98th Percentile) |
| Attack Vector | Network (HTTP Header) |
| Exploit Status | Weaponized (Metasploit Available) |
The application deserializes untrusted data without sufficiently verifying that the resulting data will be valid.