# Opti-Behavior <= 1.11.0 - Reflected Cross-Site Scripting via 'opti_assets_url' Parameter in Heatmap Capture Mode

- **ID:** WPSEC-2026-3681
- **Plugin:** Opti-Behavior – Self-Hosted Heatmaps, Funnels, A/B Testing & Smart Insights (`opti-behavior`), https://wordpress.org/plugins/opti-behavior/
- **Affected versions:** from 1.0.9 before 1.11.1
- **Fixed in:** 1.11.1 (Update to 1.11.1 or later.)
- **Severity:** Medium 6.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-11-21)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/opti-behavior
- **Fix released:** 2026-11-20
- **Published:** 2026-11-21
- **URL:** https://wpsec.com/vuln/WPSEC-2026-3681/

## Description

The Opti-Behavior plugin for WordPress is vulnerable to Reflected (DOM-based) Cross-Site Scripting via the 'opti_assets_url' parameter of the heatmap capture mode in all versions up to, and including, 1.11.0. This is due to the capture script being enqueued on any front-end page requested with 'opti_capture_mode=1', with no capability or nonce check, and the script loading a JavaScript file from a base URL taken from the page address without validation. This makes it possible for unauthenticated attackers to execute arbitrary scripts in the context of the site if they can trick a user, such as an administrator, into clicking a crafted link.

## References

- https://wpsec.com/vuln/WPSEC-2026-3681/
- https://plugins.svn.wordpress.org/opti-behavior/tags/1.11.1/
- https://wordpress.org/plugins/opti-behavior/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-3681/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
