Stored Cross-Site Scripting in WPConsent WordPress Plugin
The WPConsent WordPress plugin up to version 1.1.9 is vulnerable to stored Cross-Site Scripting (XSS) via mXSS, allowing unauthenticated attackers to execute arbitrary scripts in a user's browser session.
CVE search metadata
CVE search record: CVE-2026-97640. Severity: high. CVSS: 7.2. KEV: no. Product: WPConsent – Cookie Banner & Cookie Consent for Privacy Compliance (<= 1.1.9). Brief: Stored Cross-Site Scripting in WPConsent WordPress Plugin. Brief link: https://feed.craftedsignal.io/briefs/2026-10-wpconsent-xss/
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 (XSS) in all versions up to, and including, 1.1.9. The vulnerability arises due to insufficient input sanitization and output escaping when the "Script Blocking" feature is active. An unauthenticated attacker can exploit this via mutation XSS (mXSS), specifically by leveraging the plugin's Simple HTML DOM Parser to manipulate how content is rendered. This flaw allows an attacker to inject arbitrary web scripts into WordPress pages, which then execute when an unsuspecting user visits the affected page. The exploit requires chaining two specific comment submissions and using a debug parameter to verify injection offsets, posing a significant risk to site administrators and users.
Attack Chain
- Attacker enables or identifies a target WordPress site using the vulnerable WPConsent plugin with the "Script Blocking" feature enabled.
- Attacker performs an unauthenticated request to the site with the parameter
wpconsent_debug=1to retrieve the deterministic___noise___restoration key and determine the current injection offset. - Attacker submits the first comment containing malicious event-handler syntax (e.g.,
onmouseover) embedded inside a permitted<code>HTML element. - Attacker submits a second, coordinated comment containing the required
___noise___restoration key placed within an allowed<abbr title="">attribute. - The plugin's Simple HTML DOM Parser processes these comments, causing the stored payloads to mutate and break out of the intended HTML tag structure.
- The injected script is successfully stored on the server side as part of the comment section of a post or page.
- A legitimate user or administrator visits the page containing the malicious comments.
- The browser renders the mutated HTML, triggering the execution of the attacker's script in the context of the user's browser session.
Impact
Successful exploitation allows unauthenticated attackers to execute arbitrary JavaScript in the context of a victim's browser session. This can lead to the theft of session cookies, administrative account takeover, unauthorized modification of site content, or the redirection of users to malicious external domains. As this plugin is designed for privacy compliance, an attacker could potentially weaponize it to target users who are already providing consent, leading to significant privacy and security compromises across the affected WordPress installation.
Recommendation
- Upgrade the WPConsent plugin to the latest version immediately to remediate the insufficient sanitization of comment content.
- Disable the "Script Blocking" feature within the WPConsent plugin settings until a patch is applied if immediate updating is not possible.
- Monitor web server access logs for anomalous requests containing the
wpconsent_debug=1parameter, as this is a precursor for the attack chain. - Review comment moderation logs for suspicious activity, particularly multiple coordinated comments from the same source.
Immediate actions
Audit installed WordPress plugins for WPConsent version <= 1.1.9
Deploy the debug parameter detection rule to identify reconnaissance attempts
Mitigations
Upgrade WPConsent to the latest patched version
CVE-2026-97640
Detection coverage 1
Detect CVE-2026-97640 Exploitation - Debug Parameter Usage
mediumDetects unauthenticated requests to the site using the wpconsent_debug=1 parameter, which is a required step for calculating injection offsets in the WPConsent XSS vulnerability.
Detection queries are available on the platform. Get full rules →