CVE-2023-4731
Executive Summary
CVE-2023-4731 is a Cross-Site Request Forgery (CSRF) vulnerability in the LadiApp plugin for WordPress, affecting versions up to and including 4.4. The vulnerability exists due to a missing nonce check on the init_endpoint() function, which is hooked via the init action. This allows an unauthenticated attacker to forge requests that, when triggered by a logged-in site administrator, can modify critical plugin settings. Specifically, the attacker can directly modify the ladipage_key option, enabling them to create new posts on the website and inject malicious web scripts. The CVSS score is 4.3 (Medium), with a low EPSS score of 0.0%, indicating low exploitation likelihood at the time of analysis. No official patch has been released, and no public exploit code or Nuclei templates are 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 affects the LadiApp WordPress plugin, which is distributed through the WordPress plugin repository and third-party marketplaces. Since no patch is available, users are advised to consider removing or disabling the plugin until a fix is released. The plugin's lack of CSRF protection on a critical administrative function poses a significant supply chain risk, as compromised sites could be used to distribute malware or phishing content.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N
- Base Score: 4.3 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: None (PR:N)
- User Interaction: Required (UI:R) – the attacker must trick an administrator into clicking a link or performing an action.
- Scope: Unchanged (S:U)
- Confidentiality Impact: None (C:N)
- Integrity Impact: Low (I:L) – the attacker can modify settings and inject scripts.
- Availability Impact: None (A:N)
Threat Level: Medium. While the CVSS score is moderate, the ability to inject malicious scripts and create new posts can lead to further compromise, such as defacement, phishing, or malware distribution.
Deep Dive & Mechanics
The vulnerability resides in the init_endpoint() function of the LadiApp plugin. This function is registered to run on every WordPress request via the init hook. The function processes incoming requests and modifies plugin settings, including the ladipage_key option. However, it does not include a nonce check to verify that the request originated from the legitimate admin interface. As a result, an attacker can craft a malicious link or form that, when clicked by an authenticated administrator, will execute the request with the admin's privileges.
The ladipage_key is a critical setting that controls the plugin's API key for page building. By modifying this key, an attacker can:
- Create new posts with arbitrary content.
- Inject malicious web scripts (XSS) into the site.
- Potentially escalate privileges or perform other actions depending on the plugin's functionality.
The attack flow:
- Attacker crafts a CSRF payload (e.g., a hidden form or image tag) that targets the vulnerable endpoint.
- Attacker lures an authenticated administrator to visit a page containing the payload.
- The administrator's browser sends the forged request, modifying the
ladipage_key. - The attacker then uses the modified key to create posts or inject scripts.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code remains in all versions <= 4.4. The missing nonce check is the core issue. A patched version would include a nonce verification before processing the request.
Vulnerable Code (Conceptual):
add_action('init', 'init_endpoint');
function init_endpoint() {
if (isset($_REQUEST['ladipage_key'])) {
update_option('ladipage_key', sanitize_text_field($_REQUEST['ladipage_key']));
// No nonce check
}
}
Patched Code (Conceptual):
add_action('init', 'init_endpoint');
function init_endpoint() {
if (isset($_REQUEST['ladipage_key'])) {
if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'ladipage_nonce')) {
return;
}
update_option('ladipage_key', sanitize_text_field($_REQUEST['ladipage_key']));
}
}
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with LadiApp plugin version <= 4.4.
- An authenticated administrator session.
Exploitation Steps:
- Identify the vulnerable endpoint. The
init_endpoint()function is triggered on every request, so any request with theladipage_keyparameter will be processed. - Craft a CSRF payload. For example, an HTML page with a hidden form that auto-submits:
<html>
<body>
<form action="http://target-site.com/" method="POST">
<input type="hidden" name="ladipage_key" value="attacker_controlled_key">
<input type="submit" value="Submit">
</form>
<script>document.forms[0].submit();</script>
</body>
</html>
- Host the payload on an attacker-controlled server or inject it into a page the admin visits.
- Lure the admin to the payload page (e.g., via phishing email or social engineering).
- Once the admin visits, the form auto-submits, changing the
ladipage_key. - The attacker can now use the new key to create posts or inject scripts via the plugin's API.
Note: No public exploit code is available, but the above demonstrates the attack vector.
Blue Team
Detection:
- Monitor for unexpected changes to the
ladipage_keyoption in the WordPress database. - Look for unusual POST requests to the site root with the
ladipage_keyparameter. - Check for new posts created by non-admin users or with suspicious content.
Hunting:
- Search logs for requests containing
ladipage_keyfrom external IPs. - Review administrator activity logs for unusual clicks or form submissions.
Mitigation:
- Disable or remove the LadiApp plugin until a patch is available.
- Implement a Web Application Firewall (WAF) rule to block requests with
ladipage_keyfrom non-admin IPs. - Use a CSRF protection plugin that adds nonces to all forms.
Indicators of Compromise (IOCs)
- Network:
- HTTP requests containing
ladipage_keyparameter. - Unusual POST requests to the WordPress site root.
- HTTP requests containing
- File:
- Modified
wp_optionstable with a newladipage_keyvalue.
- Modified
- Behavioral:
- New posts created by unexpected users.
- Presence of malicious scripts in post content.
- Logs:
- Access logs showing
ladipage_keyin query strings or POST data.
- Access logs showing
Detection Engineering
YARA Rule
rule CVE_2023_4731_LadiApp_CSRF {
meta:
description = "Detects CSRF exploitation attempts against LadiApp plugin"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2023-4731"
strings:
$ladipage_key = "ladipage_key"
$wpnonce = "_wpnonce" // absent in exploit
condition:
$ladipage_key and not $wpnonce
}
Sigma Rule
title: CVE-2023-4731 LadiApp CSRF Exploitation Attempt
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects HTTP requests containing ladipage_key parameter without nonce
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'ladipage_key'
filter:
cs-uri-query|contains: '_wpnonce'
condition: selection and not filter
falsepositives:
- Legitimate admin actions if nonce is present
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2023-4731 LadiApp CSRF Attempt"; flow:to_server; content:"POST"; http_method; content:"ladipage_key"; http_client_body; pcre:"/ladipage_key=[^&]+/"; reference:cve,2023-4731; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the LadiApp plugin until a patch is released.
- Remove the plugin if it is not essential.
- Change the WordPress admin password and revoke any suspicious sessions.
Long-term Mitigation:
- Monitor the LadiApp plugin page for updates and apply patches immediately.
- Implement a Content Security Policy (CSP) to mitigate XSS impacts.
- Use a WordPress security plugin that adds CSRF protection to all forms.
- Educate administrators about phishing and social engineering risks.
Workaround:
- Add a custom function to your theme's
functions.phpto block requests without nonce:
add_action('init', 'block_ladipage_csrf');
function block_ladipage_csrf() {
if (isset($_REQUEST['ladipage_key']) && !wp_verify_nonce($_REQUEST['_wpnonce'], 'ladipage_nonce')) {
wp_die('CSRF detected.');
}
}
Valters IT
Securing Digital Frontiers
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.