Skip to main content
CVE Vulnerability Database

CVE-2026-8702: GBI To Print WordPress Plugin XSS Flaw

CVE-2026-8702 is a stored cross-site scripting vulnerability in the GBI To Print WordPress plugin that allows authenticated attackers with contributor access to inject malicious scripts. This article covers technical details, affected versions, and mitigation.

Published:

CVE-2026-8702 Overview

CVE-2026-8702 is a Stored Cross-Site Scripting (XSS) vulnerability in the GBI To Print plugin for WordPress version 1.0. The flaw exists in the gbi_toprint_shortcode() function, which processes the div attribute of the gbitoprint shortcode. The function concatenates the raw shortcode attribute value directly into an HTML attribute without calling esc_attr() or any equivalent sanitization routine. Authenticated users with contributor-level access or higher can inject arbitrary JavaScript that executes when other users view the affected page. The issue is classified under CWE-79: Improper Neutralization of Input During Web Page Generation.

Critical Impact

Authenticated contributors can inject persistent JavaScript into WordPress pages, enabling session theft, administrative action hijacking, and content tampering against any visitor who loads the affected content.

Affected Products

  • GBI To Print plugin for WordPress, version 1.0
  • WordPress sites permitting contributor-level registrations
  • Any site using the gbitoprint shortcode

Discovery Timeline

  • 2026-05-27 - CVE-2026-8702 published to NVD
  • 2026-05-27 - Last updated in NVD database

Technical Details for CVE-2026-8702

Vulnerability Analysis

The GBI To Print plugin registers a shortcode handler named gbitoprint that accepts a div attribute from user-supplied content. Inside gbi_toprint_shortcode(), the plugin builds HTML by concatenating the attribute value directly into an element. Because the value is never passed through esc_attr(), wp_kses(), or comparable sanitization, an attacker can break out of the attribute context and introduce arbitrary script content. The vulnerability is exploitable across origins because the executing script runs in the security context of the WordPress site, while the affected resource and the impacted user can differ in privilege.

Root Cause

The root cause is missing output escaping in gbi_toprint_shortcode() at the point where the div shortcode attribute is rendered into the response HTML. WordPress shortcode attributes are user-controlled by design, so plugins must escape every attribute according to its output context. The plugin omits this step, allowing untrusted markup to reach the browser intact.

Attack Vector

An authenticated attacker with contributor-level privileges or higher creates or edits a post that includes the gbitoprint shortcode with a crafted div attribute. The attribute contains characters that close the surrounding HTML attribute and introduce a script payload or an event handler. When an editor, administrator, or site visitor opens the page, the browser parses the injected markup and executes the attacker's JavaScript. The payload can perform actions on behalf of the victim, including issuing privileged REST API requests if an administrator views the page.

No verified proof-of-concept code is published. See the WordPress Plugin Code Review and the Wordfence Vulnerability Report for the underlying source analysis.

Detection Methods for CVE-2026-8702

Indicators of Compromise

  • Post or page content containing the gbitoprint shortcode with div attribute values that include <script>, onerror=, onload=, or quote-breaking sequences such as " or '.
  • New or modified posts authored by contributor-level accounts shortly before unexpected JavaScript execution is observed on rendered pages.
  • Outbound browser requests from logged-in administrator sessions to unfamiliar domains after visiting plugin-generated pages.

Detection Strategies

  • Review the WordPress wp_posts table for shortcode usage matching [gbitoprint and inspect the div attribute for HTML control characters.
  • Enforce Content Security Policy (CSP) reporting to capture inline script violations originating from pages using the plugin.
  • Audit user role assignments and flag low-privilege accounts that publish or edit content containing the vulnerable shortcode.

Monitoring Recommendations

  • Alert on creation of new contributor or author accounts followed by edits to posts containing gbitoprint shortcodes.
  • Log and review WordPress admin AJAX and REST API actions performed shortly after a privileged user loads a page containing the shortcode.
  • Monitor web server access logs for repeated retrieval of the same post by different administrative sessions.

How to Mitigate CVE-2026-8702

Immediate Actions Required

  • Deactivate and remove the GBI To Print plugin until a patched version is released by the vendor.
  • Audit all posts and pages for the gbitoprint shortcode and remove or sanitize the div attribute values.
  • Restrict contributor-level and higher account creation, and review existing low-privilege users for legitimacy.

Patch Information

No fixed version is referenced in the NVD entry at the time of publication. Site operators should monitor the WordPress plugin repository and the Wordfence Vulnerability Report for an updated release that applies esc_attr() to the div shortcode attribute.

Workarounds

  • Remove the plugin entirely if the print functionality is not business-critical.
  • Restrict the unfiltered_html capability and limit which roles can publish posts to trusted users only.
  • Deploy a web application firewall rule that blocks shortcode attribute values containing HTML angle brackets or quote characters targeting gbitoprint.

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

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.