CVE-2024-5939
Executive Summary
CVE-2024-5939 is a vulnerability in the GiveWP – Donation Plugin and Fundraising Platform for WordPress, affecting all versions up to and including 3.13.0. The issue stems from a missing capability check on the setup_wizard function, allowing unauthenticated attackers to access setup wizard administrative pages. This results in unauthorized data disclosure, potentially exposing sensitive configuration details. The CVSS score is 5.3 (Medium), with a low EPSS score of 0.0%, indicating low exploitation likelihood currently. No public proof-of-concept or patch details are available at this time.
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
WordPress Ecosystem Context
This vulnerability is specific to the GiveWP WordPress plugin. It does not affect the core WordPress software or web server components like Apache or Nginx. The attack vector is network-based, requiring no authentication, and targets the plugin's administrative setup wizard functionality.
CVSS Breakdown & Threat Level
- CVSS Score: 5.3 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Attack Vector: Network (AV:N) – exploitable remotely.
- Attack Complexity: Low (AC:L) – no special conditions required.
- Privileges Required: None (PR:N) – unauthenticated access.
- User Interaction: None (UI:N) – no user action needed.
- Scope: Unchanged (S:U) – impact confined to the vulnerable component.
- Confidentiality Impact: Low (C:L) – limited data exposure.
- Integrity Impact: None (I:N) – no data modification.
- Availability Impact: None (A:N) – no service disruption.
Threat Level: Medium. While the CVSS score is moderate, the lack of authentication requirement and potential exposure of sensitive setup data (e.g., API keys, database credentials) could be leveraged for further attacks.
Deep Dive & Mechanics
The vulnerability resides in the setup_wizard function within the GiveWP plugin. This function is intended to guide administrators through initial plugin configuration. However, due to a missing capability check (CWE-862), the function does not verify that the requesting user has administrative privileges. As a result, any unauthenticated user can access the setup wizard pages, which may contain sensitive information such as:
- Plugin configuration settings
- API keys for payment gateways (e.g., Stripe, PayPal)
- Database connection details
- Email server settings
The function is typically registered via WordPress AJAX or REST API hooks, making it accessible via HTTP requests. An attacker can craft a simple GET or POST request to the vulnerable endpoint to retrieve this data.
Root Cause: The developer failed to include a current_user_can('manage_options') or similar capability check before executing the setup wizard logic.
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical comparison based on the vulnerability description.
Vulnerable Code (<= 3.13.0):
add_action('wp_ajax_give_setup_wizard', 'give_setup_wizard_callback');
add_action('wp_ajax_nopriv_give_setup_wizard', 'give_setup_wizard_callback');
function give_setup_wizard_callback() {
// Missing capability check
$step = $_GET['step'] ?? 'welcome';
// ... render setup wizard page with sensitive data
wp_die();
}
Patched Code (Hypothetical):
add_action('wp_ajax_give_setup_wizard', 'give_setup_wizard_callback');
// Remove the nopriv hook to require authentication
function give_setup_wizard_callback() {
// Add capability check
if (!current_user_can('manage_options')) {
wp_die('Unauthorized', 403);
}
$step = $_GET['step'] ?? 'welcome';
// ... render setup wizard page
wp_die();
}
The patch removes the wp_ajax_nopriv_ hook (which allows unauthenticated access) and adds a capability check to ensure only administrators can access the function.
Exploitation & Lab Setup
Red Team
Prerequisites:
- Target WordPress site with GiveWP plugin version <= 3.13.0
- Network access to the site
Exploitation Steps:
- Identify the vulnerable endpoint. The AJAX action is typically
give_setup_wizard. - Send a GET request to the WordPress AJAX handler:
GET /wp-admin/admin-ajax.php?action=give_setup_wizard&step=welcome HTTP/1.1 Host: target-site.com - Alternatively, use a REST API endpoint if applicable (e.g.,
/wp-json/give/v1/setup-wizard). - Parse the response for sensitive data (e.g., API keys, configuration values).
Example cURL Command:
curl -v "http://target-site.com/wp-admin/admin-ajax.php?action=give_setup_wizard&step=welcome"
Expected Output: The response will contain HTML or JSON with setup wizard content, potentially including sensitive configuration data.
Blue Team
Detection:
- Monitor for requests to
/wp-admin/admin-ajax.phpwithaction=give_setup_wizardfrom unauthenticated users. - Look for anomalous access patterns to the GiveWP setup wizard endpoint.
Hunting:
- Search web server logs for
admin-ajax.phprequests withaction=give_setup_wizardand no authentication cookie. - Use the Sigma rule provided in Detection Engineering to identify suspicious activity.
Mitigation:
- Apply the hypothetical patch by adding capability checks.
- Restrict access to the setup wizard via web application firewall (WAF) rules.
- Disable the vulnerable function if not needed.
Indicators of Compromise (IOCs)
- Network Indicators:
- HTTP requests to
/wp-admin/admin-ajax.php?action=give_setup_wizardfrom unauthenticated sources. - Unusual GET/POST parameters containing
stepvalues likewelcome,settings,payments, etc.
- HTTP requests to
- File Indicators:
- Modified
give.phporclass-give-setup-wizard.phpfiles (if attacker attempts to patch).
- Modified
- Log Indicators:
- Web server logs showing
admin-ajax.phprequests withaction=give_setup_wizardand HTTP 200 responses without prior authentication.
- Web server logs showing
Detection Engineering
YARA Rule
rule CVE_2024_5939_GiveWP_Setup_Wizard_Access {
meta:
description = "Detects attempts to exploit CVE-2024-5939 in GiveWP plugin"
author = "Valters IT"
date = "2025-04-17"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-5939"
strings:
$ajax_action = "action=give_setup_wizard"
$step_param = "step="
$admin_ajax = "admin-ajax.php"
condition:
all of them
}
Sigma Rule
title: CVE-2024-5939 GiveWP Setup Wizard Unauthenticated Access
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects unauthenticated access to GiveWP setup wizard endpoint
author: Valters IT
date: 2025-04-17
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-query|contains: "action=give_setup_wizard"
cs-uri-query|contains: "admin-ajax.php"
cs-uri-query|contains: "step="
condition: selection
falsepositives:
- Legitimate admin access (should be rare)
level: medium
tags:
- attack.initial_access
- attack.t1190
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-5939 GiveWP Setup Wizard Unauthenticated Access"; flow:to_server; content:"admin-ajax.php"; http_uri; content:"action=give_setup_wizard"; http_uri; content:"step="; http_uri; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the vulnerable function: If possible, remove or comment out the
wp_ajax_nopriv_give_setup_wizardhook in the plugin code. - Apply virtual patching: Use a WAF to block requests to
/wp-admin/admin-ajax.phpwithaction=give_setup_wizardfrom unauthenticated users. - Restrict access: Limit access to the WordPress admin area via IP whitelisting or VPN.
Long-term Fix:
- Wait for an official patch from the GiveWP vendor. Monitor their changelog at givewp.com.
- Implement a capability check in the
setup_wizardfunction as shown in the patched code example. - Regularly update the plugin to the latest version.
Workarounds:
- Use a security plugin (e.g., Wordfence) to add custom firewall rules.
- Disable the setup wizard entirely by defining a constant in
wp-config.php:define('GIVE_DISABLE_SETUP_WIZARD', true);
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.