CVE-2024-37413
Executive Summary
CVE-2024-37413 is a Cross-Site Request Forgery (CSRF) vulnerability in the Rarathemes Preschool and Kindergarten WordPress theme, affecting versions up to and including 1.2.1. This vulnerability allows an attacker to perform unauthorized actions on behalf of an authenticated administrator, such as modifying theme settings or injecting malicious content, without the victim's consent. The vulnerability is classified as a WordPress ecosystem issue, as it resides in a WordPress theme. The CVSS score is 4.3 (Medium), with a low EPSS score of 0.0%, indicating low exploitation likelihood in the wild. No public proof-of-concept (PoC) or exploit code is currently available, and the patch status remains unknown.
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, it is not managed via NPM, PyPI, Go, or Ruby packages. However, administrators should verify the integrity of the theme file by checking checksums or using WordPress's built-in update mechanism. No known supply chain compromise has been reported.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The attack is launched remotely over the network.
- Attack Complexity (AC): Low (L) – No special conditions are required for the attack.
- Privileges Required (PR): None (N) – The attacker does not need prior authentication.
- User Interaction (UI): Required (R) – The victim must click a malicious link or visit a crafted page.
- Scope (S): Unchanged (U) – The vulnerability does not affect other components.
- Confidentiality Impact (C): None (N) – No data disclosure.
- Integrity Impact (I): Low (L) – Limited modification of data or settings.
- Availability Impact (A): None (N) – No denial of service.
Threat Level: Medium. The requirement for user interaction reduces the risk, but the lack of a patch and the potential for social engineering attacks make this a concern for WordPress site administrators.
Deep Dive & Mechanics
The vulnerability is a classic CSRF flaw in the WordPress theme "Preschool and Kindergarten." The theme likely fails to implement nonce validation on certain administrative actions, such as saving theme options, importing/exporting settings, or performing AJAX requests. An attacker can craft a malicious HTML page or email that, when visited by an authenticated administrator, triggers a forged request to the WordPress admin area. This request can modify theme settings, inject JavaScript, or change site appearance without the administrator's knowledge.
The attack flow:
- The attacker identifies a vulnerable endpoint in the theme (e.g.,
/wp-admin/admin-post.php?action=save_theme_options). - The attacker crafts a CSRF exploit (e.g., an auto-submitting form or an image tag with a crafted URL).
- The attacker lures an authenticated administrator to the exploit page.
- The victim's browser sends the forged request with their session cookies.
- The theme processes the request without verifying the origin, leading to unauthorized changes.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code is presumed to lack nonce verification. A typical vulnerable pattern in WordPress themes is:
// Vulnerable: No nonce check
function save_theme_options() {
update_option('theme_options', $_POST['options']);
}
add_action('admin_post_save_theme_options', 'save_theme_options');
A patched version would include a nonce check:
// Patched: Nonce verification added
function save_theme_options() {
if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'save_theme_options_nonce')) {
wp_die('Security check failed.');
}
update_option('theme_options', $_POST['options']);
}
add_action('admin_post_save_theme_options', 'save_theme_options');
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site running the vulnerable theme (<= 1.2.1).
- An authenticated administrator session.
Exploitation Steps:
- Identify a CSRF-vulnerable endpoint. For example, the theme might have an option to change the site title or logo.
- Create a malicious HTML file (
csrf_exploit.html) that auto-submits a form to the vulnerable endpoint:
<html>
<body>
<form action="http://target-site.com/wp-admin/admin-post.php?action=save_theme_options" method="POST">
<input type="hidden" name="options[site_title]" value="Hacked by Attacker">
<input type="submit" value="Click me">
</form>
<script>document.forms[0].submit();</script>
</body>
</html>
- Host the file on an attacker-controlled server or send it via email.
- Lure the administrator to visit the page. The form auto-submits, changing the site title.
Alternative: Use an image tag with a crafted URL:
<img src="http://target-site.com/wp-admin/admin-post.php?action=save_theme_options&options[site_title]=Hacked" width="1" height="1">
Blue Team
Detection:
- Monitor for unexpected changes to theme settings or site appearance.
- Review server logs for requests to
admin-post.phpwith unusual parameters. - Use a Web Application Firewall (WAF) to block requests lacking a valid nonce.
Prevention:
- Ensure all admin actions include nonce verification.
- Implement CSRF tokens in all forms and AJAX requests.
- Educate administrators about phishing and social engineering attacks.
Indicators of Compromise (IOCs)
- Network IOCs:
- Requests to
/wp-admin/admin-post.phpwith parameters likeaction=save_theme_optionsor similar. - Referer headers from unexpected domains.
- Requests to
- File IOCs:
- Modified theme files (e.g.,
functions.php) with added malicious code. - New entries in the
wp_optionstable with suspicious values.
- Modified theme files (e.g.,
- Behavioral IOCs:
- Unauthorized changes to site title, tagline, or logo.
- Unexpected redirects or injected JavaScript in the frontend.
Detection Engineering
YARA Rule
rule CVE_2024_37413_CSRF_WordPress_Theme {
meta:
description = "Detects vulnerable CSRF patterns in Preschool and Kindergarten theme"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-37413"
strings:
$vuln_func = "admin_post_" nocase
$no_nonce = "wp_verify_nonce" nocase
$theme_slug = "preschool-and-kindergarten" nocase
condition:
$theme_slug and $vuln_func and not $no_nonce
}
Sigma Rule
title: CVE-2024-37413 CSRF Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects potential CSRF attacks against Preschool and Kindergarten theme
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/admin-post.php'
cs-uri-query|contains: 'action=save_theme_options'
condition: selection
falsepositives:
- Legitimate admin actions
level: medium
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (
msg:"CVE-2024-37413 CSRF Attempt - Preschool and Kindergarten Theme";
flow:to_server,established;
content:"POST"; http_method;
content:"/wp-admin/admin-post.php"; http_uri;
content:"action=save_theme_options"; http_uri;
sid:1000001;
rev:1;
reference:cve,2024-37413;
classtype:attempted-recon;
priority:2;
)
Remediation & Mitigation
Immediate Actions:
- Disable the theme until a patch is available. Switch to a different, actively maintained theme.
- Implement a Web Application Firewall (WAF) rule to block requests to
admin-post.phpwithout a valid nonce. - Educate administrators to avoid clicking suspicious links or visiting untrusted sites while logged into WordPress.
Long-term Fix:
- The vendor (Rarathemes) should release a patched version (>= 1.2.2) that includes proper nonce verification on all admin actions.
- If no patch is forthcoming, consider forking the theme and adding nonce checks manually, or migrating to a different theme.
Workaround:
- Use a security plugin like Wordfence or Sucuri that adds CSRF protection to WordPress admin actions.
- Restrict admin access to trusted IP addresses only.
Valters IT
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.