CVE-2026-3995 Overview
CVE-2026-3995 is a Stored Cross-Site Scripting (XSS) vulnerability in the OPEN-BRAIN plugin for WordPress, affecting all versions up to and including 0.5.0. The flaw resides in the API Key settings field, where the plugin relies on sanitize_text_field() for input handling but fails to apply esc_attr() when rendering the value inside an HTML input element's value attribute. Authenticated attackers with Administrator-level access can inject attribute-breakout payloads that execute whenever any user visits the plugin settings page. The issue is categorized as CWE-79.
Critical Impact
Authenticated administrators can store arbitrary JavaScript that executes in the browser of any user accessing the plugin settings page, enabling session theft, account manipulation, or further attacks on the WordPress administrative interface.
Affected Products
- OPEN-BRAIN plugin for WordPress, all versions through 0.5.0
- WordPress installations using the vulnerable plugin in single-site deployments
- WordPress multisite environments where administrators have plugin settings access
Discovery Timeline
- 2026-04-16 - CVE-2026-3995 published to NVD
- 2026-04-22 - Last updated in NVD database
Technical Details for CVE-2026-3995
Vulnerability Analysis
The vulnerability is a Stored XSS flaw rooted in incorrect output context handling. The OPEN-BRAIN plugin accepts the API Key value from the settings form and processes it through sanitize_text_field(). This function strips HTML tags and newlines but does not encode characters such as double quotes, single quotes, or angle brackets that are required for safe rendering inside HTML attribute contexts.
The sanitized value is persisted via update_option() and later echoed directly into the value attribute of an <input> element on the plugin settings page without esc_attr() escaping. As a result, a payload containing a double quote followed by an event handler can break out of the attribute context and introduce executable JavaScript.
Root Cause
The root cause is a context mismatch between sanitization and output. sanitize_text_field() is appropriate for normalizing text input but is not sufficient for HTML attribute output. WordPress provides esc_attr() specifically for this context, and its absence at the rendering location allows attribute breakout. The vulnerable references are documented in the plugin source at index.php lines 128, 252, 253, and 272.
Attack Vector
Exploitation requires Administrator-level credentials on the target WordPress site. The attacker submits a crafted value to the API Key field, such as a string that closes the attribute quote and appends an event handler like onfocus or onmouseover. The malicious payload persists in the WordPress options table. When any authenticated user, including other administrators, navigates to the OPEN-BRAIN settings page, the browser parses the attribute-breakout payload and executes the injected script in the context of the WordPress admin session.
For full technical details, see the Wordfence Vulnerability Report and the WordPress Plugin Code Reference.
Detection Methods for CVE-2026-3995
Indicators of Compromise
- Values stored in the WordPress wp_options table for the OPEN-BRAIN plugin containing double quotes, angle brackets, or on* event handler strings
- Unexpected outbound requests originating from administrator browser sessions after visiting the plugin settings page
- New or modified administrator accounts created shortly after a settings page visit
- Browser console errors or unexpected script execution on /wp-admin/ pages tied to the OPEN-BRAIN plugin
Detection Strategies
- Audit the wp_options table for OPEN-BRAIN-related entries and inspect the API Key value for characters such as ", <, >, or on[a-z]+= patterns.
- Review WordPress audit logs for update_option calls targeting OPEN-BRAIN settings, correlating with the submitting user account.
- Deploy a web application firewall rule that flags POST requests to the plugin settings endpoint containing HTML-special characters in the API key parameter.
Monitoring Recommendations
- Enable WordPress activity logging plugins to record all administrator setting changes with full request bodies.
- Monitor browser-side Content Security Policy (CSP) violation reports for inline script execution within /wp-admin/.
- Alert on creation of new administrator accounts or changes to user roles following plugin settings page access.
How to Mitigate CVE-2026-3995
Immediate Actions Required
- Restrict Administrator role assignments to a minimal set of trusted users and enforce multi-factor authentication on all administrative accounts.
- Inspect and reset the OPEN-BRAIN API Key value in WordPress settings to remove any malicious payloads currently stored.
- Consider temporarily deactivating the OPEN-BRAIN plugin until a patched version is installed.
Patch Information
No fixed version is referenced in the available advisory data. Site administrators should monitor the Wordfence Vulnerability Report and the WordPress plugin repository for an update beyond version 0.5.0 that introduces esc_attr() escaping on the API key output.
Workarounds
- Manually clear the stored API key value via the WordPress admin or database if attribute-breakout characters are present.
- Apply a web application firewall rule to block requests to the plugin settings page containing payloads matching "\s*on\w+\s*= patterns.
- Implement a strict Content Security Policy that disallows inline event handlers across the WordPress admin interface.
- Limit access to the OPEN-BRAIN plugin settings page using role-restriction plugins until a fixed release is available.
# Example: search the WordPress database for suspicious stored values
wp db query "SELECT option_name, option_value FROM wp_options \
WHERE option_name LIKE '%open_brain%' \
AND (option_value LIKE '%onerror=%' \
OR option_value LIKE '%onfocus=%' \
OR option_value LIKE '%<script%');"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

