---
id: "CVE-2026-97640"
kind: "vulnerability"
aliases: ["CVE-2026-97640"]
title: "WPConsent cookie banner plugin: comment XSS via mXSS sanitizer bypass"
severity: "high"
cvss: 7.2
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["package", "self-hosted", "wordpress", "wpconsent"]
not_affected_if: ["comments-closed", "plugin-not-installed", "script-blocking-disabled"]
published_at: "2026-10-16T07:17:14+00:00"
first_seen_at: "2026-10-23T21:57:12+00:00"
updated_at: "2026-10-25T03:29:38+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-97640", "first_seen_at": "2026-10-23T21:57:12+00:00"}]
---

# WPConsent cookie banner plugin: comment XSS via mXSS sanitizer bypass

The WPConsent cookie consent plugin for WordPress, up to and including 1.1.9, fails to sanitize comment content, so an unauthenticated visitor can plant a stored mXSS payload that runs JavaScript in the browser of anyone who loads the affected page. The attack needs two coordinated comments and the Script Blocking feature turned on.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed WPConsent version in the WordPress plugins screen or `wp plugin get wpconsent --field=version`
- Confirm whether the Script Blocking feature is enabled in the plugin settings
- Check whether comments are open on pages that load the plugin

## Fix

- Update the WPConsent plugin to a version later than `1.1.9` once a patched release is available; the sources do not name a fixed version
- Until patched, disable the Script Blocking feature or deactivate the plugin

## Timeline

- 2026-10-23T21:57:12+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-97640

## From the sources

The WPConsent – Cookie Banner & Cookie Consent for Privacy Compliance (GDPR / CCPA / EU Compliance Cookie Notice) plugin for WordPress is vulnerable to Stored Cross-Site Scripting via Comment Content via Simple HTML DOM Parser Noise-Key Restoration (mXSS) in all versions up to, and including, 1.1.9 due to insufficient input sanitization and output escaping. This makes it possible for unauthenticated attackers to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page. This requires the Script Blocking feature to be enabled, and the exploit chain depends on an attacker submitting two coordinated comments — one embedding event-handler syntax inside an allowed &lt;code&gt; element and one placing the deterministic ___noise___ restoration key inside an allowed &lt;abbr title=""&gt; attribute — with the key offset confirmable via an unauthenticated wpconsent_debug=1 request.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
