Run Contests, Raffles, and Giveaways with ContestsWP <= 2.0.7 - Unauthenticated Information Exposure
Description
The Run Contests, Raffles, and Giveaways with ContestsWP plugin for WordPress is vulnerable to Sensitive Information Exposure in all versions up to, and including, 2.0.7. This makes it possible for unauthenticated attackers to extract sensitive user or configuration data.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:NTechnical Details
<=2.0.7Source Code
WordPress.org SVNPatched version not available.
Based on the vulnerability description for **CVE-2026-25023**, the plugin "Run Contests, Raffles, and Giveaways with ContestsWP" (slug: `contest-code-checker`) contains an unauthenticated information exposure vulnerability. This typically occurs when an AJAX handler or REST API endpoint intended for…
Show full research plan
Based on the vulnerability description for CVE-2026-25023, the plugin "Run Contests, Raffles, and Giveaways with ContestsWP" (slug: contest-code-checker) contains an unauthenticated information exposure vulnerability. This typically occurs when an AJAX handler or REST API endpoint intended for administrative use or restricted frontend use is registered for unauthenticated users (wp_ajax_nopriv_) and fails to implement proper capability or identity checks.
The following exploitation research plan is designed for an automated agent to identify and confirm the leak of sensitive participant or configuration data.
1. Vulnerability Summary
- Vulnerability: Unauthenticated Information Exposure.
- Plugin: Run Contests, Raffles, and Giveaways with ContestsWP (ContestsWP).
- Vulnerable Versions: <= 2.0.7.
- Root Cause: Improper access control on an AJAX action (likely registered via
wp_ajax_nopriv_) that retrieves database records containing participant details (emails, names, entry codes) or plugin settings without validating the requester's authority.
2. Attack Vector Analysis
- Endpoint:
http://localhost:8080/wp-admin/admin-ajax.php. - Action (Inferred): Likely registered as
wp_ajax_nopriv_cwp_get_entries,wp_ajax_nopriv_get_contest_data, orwp_ajax_nopriv_check_code_status. (Agent must verify the exact string in the source). - Authentication: None required (Unauthenticated).
- Preconditions: At least one contest must exist with participant entries to demonstrate "Information Exposure."
3. Code Flow (Inferred Trace)
- Entry Point: The plugin registers a hook:
add_action('wp_ajax_nopriv_[ACTION_NAME]', 'handler_function'). - Handler Execution: The
handler_functionis called when a POST request hitsadmin-ajax.phpwith the correspondingaction. - Data Fetching: The handler likely uses
$wpdbto select records from a custom table (e.g.,{$wpdb->prefix}contests_entries) orget_postswith a custom post type. - Vulnerable Sink: The code performs
echo json_encode($data)orwp_send_json($data)without checkingcurrent_user_can('manage_options')or verifying a nonce that is restricted to authorized sessions. - Output: Sensitive data (emails, PII) is returned in the HTTP response body.
4. Nonce Acquisition Strategy
If the plugin uses check_ajax_referer or wp_verify_nonce, the nonce is likely exposed to unauthenticated users on pages where the contest form or "check status" shortcode is rendered.
Step-by-step extraction:
- Identify Shortcodes: Search for
add_shortcodein the plugin directory. Common candidates:[contests_wp],[contest_code_checker], or[cw_giveaway]. - Create Discovery Page: Use WP-CLI to create a page containing the found shortcode:
wp post create --post_type=page --post_title="Contest Page" --post_status=publish --post_content='[SHORTCODE_NAME]' - Extract Nonce via Browser:
- Navigate to the new page using
browser_navigate. - Inspect
wp_localize_scriptoutput. Usebrowser_evalto find the nonce. - Likely Variable:
window.cwp_ajax?.nonceorwindow.contests_wp_vars?.nonce. (Agent must check the JS files in theassetsfolder for the localization key).
- Navigate to the new page using
5. Test Data Setup
To confirm the vulnerability, the environment must contain sensitive data to expose.
- Create a Contest: If possible via WP-CLI or by simulating the plugin's submission form.
- Insert Dummy Entries: Insert records into the plugin's database table:
# Example (Table name may vary, agent must check schema in activation hook) wp db query "INSERT INTO wp_contests_entries (name, email, entry_code) VALUES ('Target User', 'sensitive@example.com', 'SECRET123')"
6. Exploitation Strategy
The agent will perform the following steps:
- Source Code Audit:
- Search for
wp_ajax_nopriv_in the plugin folder. - Identify the handler function.
- Check if the handler takes any parameters (e.g.,
contest_id,search,page).
- Search for
- Payload Construction:
- Construct a POST request to
admin-ajax.php. - URL:
http://localhost:8080/wp-admin/admin-ajax.php - Headers:
Content-Type: application/x-www-form-urlencoded - Body:
action=[ACTION_NAME]&nonce=[NONCE_IF_REQUIRED]&contest_id=1
- Construct a POST request to
- Execution: Use the
http_requesttool. - Data Extraction: Analyze the JSON response for sensitive keys like
email,address,phone, orcode.
7. Expected Results
- Success: An HTTP 200 response containing a JSON array or object with the dummy data created in Step 5.
- Example Response:
[ {"id": "1", "name": "Target User", "email": "sensitive@example.com", "entry_code": "SECRET123"} ]
8. Verification Steps
After receiving the response via http_request, confirm the data matches the database:
- Compare the email address returned in the HTTP response to the one inserted via WP-CLI.
- Verify that the same request made without a valid nonce (if required) or with a modified action fails, confirming the specific entry point.
9. Alternative Approaches
- REST API Discovery: Check if the plugin registers routes using
register_rest_route. Ifpermission_callbackis set to__return_trueor is missing, try:GET /wp-json/contests-wp/v1/entries
- Direct Option Leak: If the AJAX action allows a
setting_nameparameter, try to requestwp_optionskeys likeadmin_emailor plugin-specific API keys. - Information Exposure via SQLi: If the AJAX action accepts an
idorsearchparameter, check if it's used in a raw$wpdb->get_resultscall, which could lead to a deeper information leak via SQL injection.
Summary
The Run Contests, Raffles, and Giveaways with ContestsWP plugin for WordPress (versions up to 2.0.7) is vulnerable to unauthenticated information exposure. This occurs because the plugin registers an AJAX handler for unauthenticated users that retrieves and displays sensitive participant information, such as emails and entry codes, without proper capability checks.
Exploit Outline
1. Identify the unauthenticated AJAX action registered via wp_ajax_nopriv_ (e.g., cwp_get_entries or check_code_status) by auditing the plugin's hooks. 2. If a nonce is required, visit a public-facing page where the contest shortcode (e.g., [contests_wp]) is rendered and extract the nonce from the localized JavaScript variables (e.g., window.cwp_ajax.nonce). 3. Send a POST request to /wp-admin/admin-ajax.php with the 'action' parameter set to the identified hook and any necessary parameters such as 'contest_id'. 4. Observe the JSON response, which will contain sensitive PII such as participant names, email addresses, and entry codes from the database.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.