Child Height Predictor by Ostheimer <= 1.3 - Cross-Site Request Forgery to Settings Update via Plugin Settings Form
Description
The Child Height Predictor by Ostheimer plugin for WordPress is vulnerable to Cross-Site Request Forgery in all versions up to and including 1.3. This is due to missing nonce verification in the options() function, which handles plugin settings updates. The form template does not include a wp_nonce_field() call, and the handler never calls check_admin_referer() or wp_verify_nonce(). This makes it possible for unauthenticated attackers to trick a site administrator into clicking a link or visiting a malicious page that submits a forged POST request, causing unauthorized changes to the plugin settings such as unit preferences to be persisted to the database via update_option().
CVSS Vector Breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:NTechnical Details
<=1.3# Exploitation Research Plan - CVE-2026-6400 (Child Height Predictor by Ostheimer) ## 1. Vulnerability Summary CVE-2026-6400 identifies a Cross-Site Request Forgery (CSRF) vulnerability in the **Child Height Predictor by Ostheimer** plugin (versions <= 1.3). The vulnerability exists within the `opt…
Show full research plan
Exploitation Research Plan - CVE-2026-6400 (Child Height Predictor by Ostheimer)
1. Vulnerability Summary
CVE-2026-6400 identifies a Cross-Site Request Forgery (CSRF) vulnerability in the Child Height Predictor by Ostheimer plugin (versions <= 1.3). The vulnerability exists within the options() function, which serves as the callback for the plugin's settings page. The function processes configuration updates (persisted via update_option()) without performing any nonce verification. This allows an unauthenticated attacker to forge a request that, if executed by a logged-in administrator, modifies the plugin's settings.
2. Attack Vector Analysis
- Vulnerable Endpoint:
/wp-admin/options-general.php?page=child-height-predictor(inferred from plugin slug). - HTTP Method:
POST - Authentication Level: Requires an active session of a user with
manage_optionscapability (typically an Administrator). - Vulnerable Function:
options() - Impact: Persisted modification of plugin settings (e.g., unit preferences, display options).
3. Code Flow
- The plugin registers a settings page using
add_options_page()oradd_menu_page(), assigning the functionoptions()as the display and processing callback. - When the administrator visits the settings page or submits the form, the
options()function is executed. - Inside
options(), the code likely checks for the presence of a submit parameter:if ( isset( $_POST['submit'] ) )(inferred). - Upon finding the submit parameter, the function iterates through expected
$_POSTkeys and updates WordPress options usingupdate_option(). - Critical Failure: The function fails to include a
wp_nonce_field()in the HTML form and neglects to callcheck_admin_referer()orwp_verify_nonce()before processing theupdate_option()calls.
4. Nonce Acquisition Strategy
No nonce is required.
The vulnerability report explicitly states that the options() function lacks nonce verification and the form template does not include a wp_nonce_field(). Therefore, the request can be forged without any CSRF tokens.
5. Exploitation Strategy
The goal is to demonstrate that plugin settings can be changed via an unauthenticated POST request (simulating a CSRF attack).
Step 1: Discover Setting Parameters
Since exact parameter names are not provided in the CVE, the agent must first identify them:
- Log in as an Administrator.
- Navigate to
http://localhost:8080/wp-admin/options-general.php?page=child-height-predictor. - Execute
browser_evalto extract the names of the input fields:Array.from(document.querySelectorAll('form input, form select')).map(el => el.name)
Step 2: Forge the Settings Update Request
Once the parameter names (e.g., chp_unit, chp_precision — inferred) and the submit button name are known, use the http_request tool to perform the update.
Example Payload (Inferred):
- URL:
http://localhost:8080/wp-admin/options-general.php?page=child-height-predictor - Method:
POST - Headers:
Content-Type: application/x-www-form-urlencoded - Body:
chp_unit=cm&chp_precision=2&submit=Save+Changes(Parameter names must be verified in Step 1).
6. Test Data Setup
- Plugin Installation: Ensure
child-height-predictorversion 1.3 is installed and activated. - Shortcode Page: Create a page containing the plugin's shortcode to ensure settings are active:
wp post create --post_type=page --post_status=publish --post_content='[child_height_predictor]'(Shortcode name inferred). - Current State: Record current settings using
wp option get <option_name>once parameter names are identified.
7. Expected Results
- The
http_requestshould return a200 OK(if the handler renders the page) or a302 Redirect. - The response should NOT contain a "link you followed has expired" error (which would indicate a nonce check).
- The targeted WordPress options in the database should reflect the values sent in the forged POST request.
8. Verification Steps
After sending the http_request, verify the change using WP-CLI:
- Identify the options modified by the plugin:
wp option list --search="*chp*"(inferred prefix). - Check the specific value:
wp option get <identified_option_name>. - Confirm the value matches the payload sent in the exploitation step.
9. Alternative Approaches
If the settings page submits to options.php (standard Settings API) instead of its own URL:
- Check if
register_setting()was used without a propersanitize_callbackor if the plugin manually processesadmin-post.phphooks. - If it uses
admin-post.php, the target URL would be/wp-admin/admin-post.phpwith anactionparameter matching the hook name registered by the plugin.
Summary
The Child Height Predictor by Ostheimer plugin for WordPress is vulnerable to Cross-Site Request Forgery (CSRF) because it lacks nonce verification in its options() settings handler. This allows an unauthenticated attacker to change plugin settings, such as unit preferences, by tricking a logged-in administrator into submitting a forged POST request.
Vulnerable Code
/* In child-height-predictor.php - inferred function structure based on research plan */ function options() { if (isset($_POST['submit'])) { // Vulnerable: Missing check_admin_referer() or wp_verify_nonce() update_option('chp_unit', $_POST['chp_unit']); update_option('chp_precision', $_POST['chp_precision']); echo '<div class="updated"><p>Settings saved.</p></div>'; } ?> <form method="post" action=""> <!-- Vulnerable: Missing wp_nonce_field() --> <input type="text" name="chp_unit" value="<?php echo esc_attr(get_option('chp_unit')); ?>"> <input type="submit" name="submit" value="Save Changes"> </form> <?php }
Security Fix
@@ -1,7 +1,8 @@ function options() { - if (isset($_POST['submit'])) { + if (isset($_POST['submit'])) { + check_admin_referer('chp_save_settings', 'chp_nonce'); update_option('chp_unit', $_POST['chp_unit']); update_option('chp_precision', $_POST['chp_precision']); echo '<div class="updated"><p>Settings saved.</p></div>'; } ?> <form method="post" action=""> + <?php wp_nonce_field('chp_save_settings', 'chp_nonce'); ?> <input type="text" name="chp_unit" value="<?php echo esc_attr(get_option('chp_unit')); ?>"> <input type="submit" name="submit" value="Save Changes"> </form>
Exploit Outline
The exploit targets the settings update logic which is executed upon page load of the plugin settings menu. 1. Target Endpoint: /wp-admin/options-general.php?page=child-height-predictor 2. Method: POST 3. Authentication: The attacker needs to induce a logged-in administrator (with manage_options capabilities) to visit a malicious website or click a link that automatically triggers the POST request. 4. Payload Shape: The POST request must include the 'submit' parameter along with the settings keys the attacker wishes to modify (e.g., chp_unit=custom_value&submit=Save+Changes). Because there is no nonce check, the request will be processed by the server as a legitimate settings update.
Check if your site is affected.
Run a free security audit to detect vulnerable plugins, outdated versions, and misconfigurations.