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

CVE-2026-92977: Real Cookie Banner WordPress XSS Vulnerability

CVE-2026-92977 is a stored XSS flaw in Real Cookie Banner WordPress plugin allowing attackers to inject malicious scripts via comments. This article covers the technical details, affected versions up to 5.3.5, and mitigation steps.

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-92977 Overview

CVE-2026-92977 is a stored Cross-Site Scripting (XSS) vulnerability [CWE-79] in the Real Cookie Banner: GDPR & ePrivacy Cookie Consent plugin for WordPress. The flaw affects all versions up to and including 5.3.5. The plugin fails to adequately sanitize and escape comment input, allowing unauthenticated attackers to inject arbitrary JavaScript that executes when users visit affected pages. Exploitation requires that an injected comment pass through the standard WordPress moderation workflow before public rendering.

Critical Impact

Unauthenticated attackers can inject persistent JavaScript into pages served to site visitors, enabling session theft, credential harvesting, or redirection, subject to comment moderation.

Affected Products

  • Real Cookie Banner: GDPR & ePrivacy Cookie Consent plugin for WordPress
  • All versions through 5.3.5
  • WordPress sites using the plugin's blocker rendering pipeline (Blocker.php, FastHtmlTag.php)

Discovery Timeline

  • 2026-10-03 - CVE-2026-92977 published to NVD
  • 2026-10-06 - Last updated in NVD database

Technical Details for CVE-2026-92977

Vulnerability Analysis

The vulnerability resides in the Real Cookie Banner plugin's content-rewriting pipeline, which processes rendered page output to inject consent-blocking logic. Attackers submit a WordPress comment containing a crafted anchor tag whose title attribute carries a JavaScript payload. WordPress's built-in kses comment filter accepts the input because the payload appears as inert attribute data at save time.

The issue surfaces at render time. When the plugin iterates matched HTML on the page, its regex-based tag parser in FastHtmlTag.php strips the closing quote delimiter around the attribute value. The payload is then promoted into executable attribute context, letting the browser treat injected content as script.

Root Cause

The root cause is a mismatch between save-time sanitization and render-time transformation. The plugin relies on a page-wide regular expression to parse HTML in Blocker.php (lines 213 and 233) and FastHtmlTag.php (line 166). Regular expressions cannot reliably tokenize HTML attribute boundaries. The resulting lossy parse removes delimiters that previously neutralized the payload, violating the output-escaping contract assumed by wp_kses.

Attack Vector

An unauthenticated attacker submits a comment on any post where comments are enabled. The comment body includes an anchor element whose title attribute contains a script payload designed to activate once its enclosing quote is stripped. After a moderator approves the comment, the plugin's output filter rewrites the surrounding markup and the payload executes in the context of every visitor's browser session. The attack succeeds without user interaction beyond visiting the page.

See the Wordfence Vulnerability Report and the plugin source references for Blocker.php Line 213, Blocker.php Line 233, and FastHtmlTag.php Line 166.

Detection Methods for CVE-2026-92977

Indicators of Compromise

  • Approved comments containing anchor tags with unusual title attribute content, including quote characters, event handlers, or javascript: strings.
  • Outbound requests from end-user browsers to unfamiliar domains originating from pages that embed the plugin's blocker output.
  • Unexpected modifications to WordPress session cookies or authenticated administrator sessions following comment approvals.

Detection Strategies

  • Scan the wp_comments table for payload markers such as onerror=, onmouseover=, javascript:, and malformed attribute delimiters inside comment_content.
  • Compare the plugin version against 5.3.5 and flag any installation at or below that release.
  • Review web server access logs for POST /wp-comments-post.php activity followed by comment approval events and subsequent anomalous page requests.

Monitoring Recommendations

  • Enable Content Security Policy (CSP) reporting to capture inline script violations on pages that render user comments.
  • Alert when administrators approve comments containing HTML attributes beyond a conservative allow-list.
  • Forward WordPress audit logs, web server logs, and client-side CSP reports to a central analytics platform such as Singularity Data Lake for correlation.

How to Mitigate CVE-2026-92977

Immediate Actions Required

  • Update the Real Cookie Banner plugin to a release later than 5.3.5 that includes the fix referenced in the WordPress Changeset Update.
  • Audit pending and recently approved comments for crafted anchor tags carrying script payloads in title attributes.
  • Rotate administrator session cookies and reset credentials if indicators suggest successful exploitation.

Patch Information

The plugin maintainers addressed the issue in a post-5.3.5 release. Review the WordPress Changeset Update for the exact code changes applied to the blocker renderer. Apply the vendor patch through the WordPress plugin updater and verify the active version after deployment.

Workarounds

  • Disable the Real Cookie Banner plugin until the patched version is deployed.
  • Require manual moderation for every comment and restrict reviewer permissions to trusted accounts.
  • Deploy a Web Application Firewall (WAF) rule to strip or reject comment submissions containing title=" sequences combined with event handler keywords.
  • Enforce a strict Content Security Policy that blocks inline script execution on front-end pages.
bash
# Configuration example: WordPress CLI update to the latest patched release
wp plugin update real-cookie-banner --path=/var/www/html
wp plugin get real-cookie-banner --field=version

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.