CVE-2025-31413
Executive Summary
CVE-2025-31413 is a Cross-Site Request Forgery (CSRF) vulnerability affecting the Element Pack Elementor Addons WordPress plugin (slug: bdthemes-element-pack-lite) by Bdthemes, up to and including version 8.3.13. This vulnerability allows an attacker to forge requests on behalf of an authenticated administrator, potentially leading to unauthorized configuration changes, settings modifications, or other state-changing actions within the plugin. The CVSS v3.1 base score is 4.3 (Medium), with a low attack complexity and no privileges required, but user interaction is required. The EPSS score is 0.0%, indicating a low probability of exploitation in the wild at this time. No public proof-of-concept or patch details are currently available.
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 plugin distributed via the official WordPress plugin repository. The plugin is not an NPM, PyPI, Go, or Ruby package, but it is a critical component of the WordPress supply chain. Users are advised to monitor the plugin's update channel and apply any security patches as soon as they become available.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The attack can be launched remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – The attacker does not need to be authenticated.
- User Interaction (UI): Required (R) – The victim must click a link or visit a malicious page.
- Scope (S): Unchanged (U) – The vulnerable component and the impacted component are the same.
- 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 likelihood of automated exploitation, but the low complexity and network vector make it a viable phishing target.
Deep Dive & Mechanics
The vulnerability stems from a missing or insufficient anti-CSRF token (nonce) validation in one or more administrative actions of the Element Pack Elementor Addons plugin. In WordPress, CSRF protection is typically implemented using a nonce (number used once) that is embedded in forms and validated on the server side. If the plugin fails to check this nonce for certain AJAX or POST requests, an attacker can craft a malicious HTML page that, when visited by an authenticated administrator, will execute unauthorized actions.
The affected plugin provides extended widgets and functionality for the Elementor page builder. The CSRF flaw likely exists in a settings page, import/export function, or widget configuration endpoint. An attacker could exploit this to:
- Change plugin settings (e.g., enable/disable features).
- Modify widget configurations.
- Import malicious data or templates.
- Reset plugin options to default.
Since the vulnerability is in a WordPress plugin, the attack surface is limited to the WordPress admin area, but any state-changing action that lacks nonce validation is exploitable.
Vulnerable vs. Patched Code
No official patch has been released at the time of this analysis. The vulnerable code likely resides in a PHP file handling admin AJAX requests or form submissions. A typical vulnerable pattern is:
// Vulnerable: No nonce check
add_action('wp_ajax_element_pack_save_settings', 'element_pack_save_settings');
function element_pack_save_settings() {
// Process and save settings without checking nonce
update_option('element_pack_settings', $_POST['settings']);
}
A patched version would include a nonce verification:
// Patched: Nonce check added
add_action('wp_ajax_element_pack_save_settings', 'element_pack_save_settings');
function element_pack_save_settings() {
// Verify nonce
if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'element_pack_settings_nonce')) {
wp_die('Security check failed.');
}
// Process and save settings
update_option('element_pack_settings', $_POST['settings']);
}
Without access to the exact vulnerable file, this is a representative example. The fix must be applied to all admin-facing endpoints that perform state changes.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress site with the vulnerable plugin (<= 8.3.13) installed and activated.
- An authenticated administrator session (the victim).
- The attacker must host a malicious HTML page or inject a CSRF payload into a site the victim visits.
Exploitation Steps:
Identify the vulnerable endpoint. Use browser developer tools or proxy (e.g., Burp Suite) to capture an admin action (e.g., saving plugin settings). Look for a POST request that lacks a
_wpnonceor_ajax_nonceparameter.Craft the CSRF payload. Create an HTML page that auto-submits a form to the vulnerable endpoint with the desired parameters.
<html>
<body>
<form action="http://target-site.com/wp-admin/admin-ajax.php" method="POST" id="csrf_form">
<input type="hidden" name="action" value="element_pack_save_settings">
<input type="hidden" name="settings[enable_feature]" value="0">
<!-- Add other parameters as needed -->
</form>
<script>
document.getElementById('csrf_form').submit();
</script>
</body>
</html>
Deliver the payload. Send the malicious link to the victim (e.g., via email, social engineering) or host it on a site they trust.
Execute. When the victim, logged in as an admin, visits the page, the form auto-submits, and the action is performed without their consent.
Note: No public exploit code is available for this CVE. The above is a generic CSRF exploitation technique.
Blue Team (Detection & Prevention)
Detection:
- Monitor for unexpected POST requests to
admin-ajax.phpor plugin-specific admin pages from non-admin IPs or with unusual parameters. - Look for missing
_wpnonceparameters in admin AJAX requests. - Use web application firewalls (WAF) to block requests that lack expected CSRF tokens.
Prevention:
- Ensure the plugin is updated to the latest version once a patch is released.
- Implement a Content Security Policy (CSP) that restricts form submission origins.
- Use the
X-Frame-Options: DENYheader to prevent clickjacking. - Educate administrators about phishing attacks and the importance of not clicking suspicious links while logged in.
Indicators of Compromise (IOCs)
- Network:
- POST requests to
/wp-admin/admin-ajax.phpwithactionparameter set to plugin-specific actions (e.g.,element_pack_save_settings) without a valid nonce. - Referer header pointing to an external or unexpected domain.
- POST requests to
- Host:
- Unexpected changes to plugin settings in the
wp_optionstable (e.g.,element_pack_settings). - Modified widget configurations or imported templates.
- Unexpected changes to plugin settings in the
- Logs:
- WordPress debug log entries showing failed nonce checks (if logging is enabled).
- Web server access logs with POST requests to admin AJAX endpoints from unusual user agents or IPs.
Detection Engineering
YARA Rule
rule CVE_2025_31413_CSRF_WordPress_Plugin {
meta:
description = "Detects potential CSRF exploitation attempts against Element Pack Elementor Addons plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-31413"
strings:
$ajax_action = "element_pack_" ascii wide nocase
$admin_ajax = "admin-ajax.php" ascii wide nocase
$nonce_missing = /_wpnonce|_ajax_nonce/ ascii wide nocase
condition:
$ajax_action and $admin_ajax and not $nonce_missing
}
Sigma Rule
title: CVE-2025-31413 CSRF Exploitation Attempt
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects HTTP POST requests to WordPress admin-ajax.php with Element Pack plugin actions missing CSRF nonce
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
c-uri|contains: '/wp-admin/admin-ajax.php'
cs-uri-query|contains: 'action=element_pack_'
filter:
cs-uri-query|contains: '_wpnonce'
condition: selection and not filter
falsepositives:
- Legitimate plugin updates or custom integrations
level: medium
tags:
- attack.t1204
- cve.2025.31413
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-31413 CSRF Exploitation Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=element_pack_"; http_client_body; pcre:"/^(?!.*_wpnonce).*$/"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if it is not critical to operations until a patch is released.
- Implement a Web Application Firewall (WAF) rule to block POST requests to
admin-ajax.phpthat containaction=element_pack_but lack a valid nonce. - Restrict admin access to trusted IP addresses only.
- Enable WordPress debug logging to monitor for suspicious activity.
Long-Term Fix:
- Apply the official patch from Bdthemes as soon as it is released.
- If you are a developer, manually add nonce verification to all admin AJAX handlers in the plugin. Example fix:
// In the plugin's main file or relevant AJAX handler
add_action('wp_ajax_element_pack_save_settings', 'element_pack_save_settings');
function element_pack_save_settings() {
// Add nonce check
if (!isset($_POST['_wpnonce']) || !wp_verify_nonce($_POST['_wpnonce'], 'element_pack_nonce')) {
wp_send_json_error('Invalid nonce.');
wp_die();
}
// Original code here
}
Workarounds:
- Use a security plugin (e.g., Wordfence, Sucuri) that adds CSRF protection to all admin actions.
- Educate users to never click suspicious links while logged into WordPress admin.
Valters IT
Securing Digital Frontiers
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.