Skip to main content
Vulnerability Database/CVE-2026-95809

CVE-2026-95809: Opti-Behavior WordPress Plugin XSS Vulnerability

CVE-2026-95809 is a stored DOM-based cross-site scripting flaw in the Opti-Behavior WordPress plugin that allows unauthenticated attackers to inject malicious scripts. This post covers technical details, affected versions, security impact, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-95809 Overview

CVE-2026-95809 is a stored DOM-based Cross-Site Scripting (XSS) vulnerability in the Opti-Behavior WordPress plugin, which provides self-hosted heatmaps, session recordings, funnels, A/B testing, and smart insights. All versions up to and including 1.9.2.1 are affected. The flaw resides in the handling of the country_name location parameter submitted to the heatmap recording endpoint. Insufficient input sanitization and output escaping allow unauthenticated attackers to inject arbitrary JavaScript that executes when administrators or users load the affected pages.

Critical Impact

Unauthenticated attackers can inject persistent JavaScript that executes in the browser context of site administrators viewing heatmap analytics, enabling session theft, administrative action hijacking, and further site compromise.

Affected Products

  • Opti-Behavior – Self-Hosted Heatmaps, Session Recordings, Funnels, A/B Testing & Smart Insights plugin for WordPress
  • All versions up to and including 1.9.2.1
  • WordPress sites exposing the opti_behavior_refresh_nonces AJAX action to unauthenticated visitors

Discovery Timeline

  • 2026-10-16 - CVE-2026-95809 published to NVD
  • 2026-10-16 - Last updated in NVD database

Technical Details for CVE-2026-95809

Vulnerability Analysis

The vulnerability is a stored DOM-based XSS [CWE-79] triggered through the country_name parameter sent to the plugin's heatmap recording endpoint. The plugin accepts location metadata associated with heatmap and session recording events, persists that data, and later renders it inside the WordPress admin interface and metabox analytics views without adequate sanitization or escaping. Because the injected payload is written into the DOM via client-side JavaScript rather than reflected server-side, standard output filters do not neutralize the content.

When an administrator opens the heatmap analytics metabox for an affected post, the stored country_name value is parsed and inserted into the page. Any script content embedded in that field executes in the administrator's authenticated session context. This enables account takeover primitives such as cookie exfiltration, nonce theft, and arbitrary REST or admin-ajax calls under the administrator's identity.

Root Cause

Two defects combine to produce the vulnerability. First, the client-side renderer in assets/js/metabox-analytics.js writes attacker-controlled country_name content into the DOM without escaping. Second, the recording endpoint handled by class-opti-behavior-heatmap-ajax-handler.php and class-opti-behavior-heatmap-session.php does not sanitize the incoming field before storage.

Attack Vector

The heatmap recording endpoint is reachable by unauthenticated requests and is protected only by a nonce. The nonce can be freely retrieved by any visitor through the public opti_behavior_refresh_nonces AJAX action, which eliminates the nonce as a meaningful access control. An attacker fetches a valid nonce, submits a crafted heatmap event containing a JavaScript payload in country_name, and waits for a privileged user to view the analytics view where the payload is rendered.

Technical details of the vulnerable code paths are published in the Wordfence Vulnerability Report and the plugin source files in the WordPress Plugin Repository.

Detection Methods for CVE-2026-95809

Indicators of Compromise

  • Requests to admin-ajax.php invoking the opti_behavior_refresh_nonces action from unauthenticated clients, followed shortly by heatmap recording submissions from the same source.
  • Stored heatmap session records where the country_name field contains HTML tags, <script>, onerror=, javascript: URIs, or encoded script fragments.
  • Unexpected outbound requests from administrator browsers after loading post analytics metaboxes.

Detection Strategies

  • Inspect the plugin's heatmap and session recording database tables for country_name values that deviate from expected ISO country name strings.
  • Monitor WordPress access logs for POST requests to the Opti-Behavior AJAX endpoints originating from IPs that previously requested a nonce refresh.
  • Review browser Content Security Policy (CSP) violation reports for inline script executions on /wp-admin/ pages that load the analytics metabox.

Monitoring Recommendations

  • Enable WordPress audit logging for plugin option changes, user creation events, and administrator session activity following heatmap data ingestion.
  • Alert on administrator sessions issuing unusual REST API calls or user role modifications shortly after visiting post edit screens.
  • Track the opti_behavior_refresh_nonces AJAX action frequency; sustained unauthenticated use is a strong pre-exploitation signal.

How to Mitigate CVE-2026-95809

Immediate Actions Required

  • Deactivate the Opti-Behavior plugin on affected WordPress sites until a patched release is installed.
  • Purge stored heatmap and session recording records containing suspicious country_name values to prevent future triggers.
  • Rotate administrator passwords and invalidate active WordPress sessions if any administrator loaded post analytics while the plugin was vulnerable.

Patch Information

Site owners should upgrade to a version newer than 1.9.2.1 once the vendor publishes a fix. Review the WordPress Plugin Change Set and the Wordfence Vulnerability Report for the authoritative fixed version and remediation guidance.

Workarounds

  • Restrict access to the plugin's AJAX endpoints at the web server or Web Application Firewall (WAF) layer, blocking unauthenticated requests to opti_behavior_refresh_nonces and heatmap recording actions.
  • Enforce a strict Content Security Policy on /wp-admin/ that disallows inline script execution and unapproved script sources.
  • Limit administrator access to the post edit and analytics metabox views until the plugin is updated or removed.
bash
# Example WAF rule concept - block unauthenticated access to plugin AJAX actions
# ModSecurity-style pseudo rule
SecRule REQUEST_URI "@contains /wp-admin/admin-ajax.php" \
  "chain,deny,status:403,id:1026095809,msg:'Block Opti-Behavior unauth AJAX'"
  SecRule ARGS:action "@rx ^(opti_behavior_refresh_nonces|opti_behavior_record_heatmap)$" \
    "chain"
    SecRule &REQUEST_COOKIES:/wordpress_logged_in_/ "@eq 0"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.