Skip to main content
Vulnerability Database/CVE-2025-12711

CVE-2025-12711: Share to Google Classroom Plugin XSS Flaw

CVE-2025-12711 is a stored cross-site scripting vulnerability in the Share to Google Classroom WordPress plugin affecting all versions up to 1.0. This article covers the technical details, risk assessment, and mitigation.

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-2025-12711 Overview

CVE-2025-12711 is a stored Cross-Site Scripting (XSS) vulnerability in the Share to Google Classroom plugin for WordPress. The flaw affects all versions up to and including 1.0. It exists in the share_to_google shortcode, which fails to properly sanitize input and escape output on user-supplied attributes. Authenticated users with Contributor-level access or higher can inject arbitrary JavaScript that executes when other users view the affected page. The vulnerability is tracked as CWE-79.

Critical Impact

Contributor-level attackers can inject persistent JavaScript that executes in the browsers of site visitors and administrators, enabling session theft, forced administrative actions, and content defacement.

Affected Products

  • Share to Google Classroom plugin for WordPress — all versions up to and including 1.0
  • WordPress sites permitting Contributor-level registration or higher
  • Any site rendering pages that contain the share_to_google shortcode

Discovery Timeline

  • 2025-11-11 - CVE-2025-12711 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2025-12711

Vulnerability Analysis

The Share to Google Classroom plugin registers a share_to_google shortcode that accepts user-controlled attributes. The shortcode handler in share_to_google_classroom.php reads these attributes and renders them directly into page output. Because the plugin does not apply WordPress sanitization functions such as sanitize_text_field() on input or escaping functions such as esc_attr() and esc_html() on output, attacker-controlled values reach the browser as executable markup.

Any authenticated user with Contributor privileges can add a post containing the shortcode with a malicious attribute value. When an editor previews the submission, or after the post is published, the injected script executes in the context of the WordPress origin. This enables session hijacking, credential theft through injected forms, and CSRF-based privilege escalation against administrators viewing the page.

Root Cause

The root cause is insufficient input sanitization and output escaping on shortcode attributes handled by the plugin. The vulnerable rendering path is referenced in the plugin source at line 59. Attribute values pass through the shortcode callback into HTML output without invoking WordPress escaping APIs, allowing HTML and JavaScript to break out of the intended attribute context.

Attack Vector

Exploitation requires an authenticated account with Contributor privileges or higher. The attacker authors a post or page containing the share_to_google shortcode with a crafted attribute value carrying an XSS payload. Once the post is rendered — during preview, moderation, or after publication — the payload executes in the browser of every visitor to that page. The Wordfence Vulnerability Report provides additional technical context.

Detection Methods for CVE-2025-12711

Indicators of Compromise

  • Posts or pages containing share_to_google shortcode instances with attribute values that include <script>, onerror=, onload=, or javascript: tokens
  • Unexpected outbound requests from visitor browsers to attacker-controlled domains originating from pages rendering the shortcode
  • New or modified posts authored by Contributor-level accounts that embed the vulnerable shortcode

Detection Strategies

  • Query the wp_posts table for post_content values matching %[share_to_google% and inspect attribute values for HTML control characters
  • Review WordPress audit logs for Contributor and Author account activity that creates or edits posts containing the shortcode
  • Inspect server access logs for anomalous referrers or query strings tied to pages rendering the share_to_google shortcode

Monitoring Recommendations

  • Enable a Web Application Firewall (WAF) rule set that inspects post submissions for script tags within shortcode attributes
  • Alert on privilege changes or new user registrations at Contributor level and above
  • Monitor browser Content Security Policy (CSP) violation reports for inline script execution on plugin-rendered pages

How to Mitigate CVE-2025-12711

Immediate Actions Required

  • Deactivate and remove the Share to Google Classroom plugin until a fixed version is released
  • Audit all posts and pages for existing share_to_google shortcode instances and remove any containing untrusted markup
  • Restrict Contributor-level account creation and review recently registered accounts for suspicious activity

Patch Information

As of the last NVD modification date, no fixed version has been published beyond 1.0. Site administrators should monitor the Wordfence Vulnerability Report and the plugin's WordPress.org page for a security release addressing CVE-2025-12711.

Workarounds

  • Remove the plugin entirely if Google Classroom sharing is not business-critical
  • Enforce a strict Content Security Policy that disallows inline scripts on public pages
  • Downgrade untrusted Contributor accounts or require editorial review before any post rendering the share_to_google shortcode is published
bash
# Locate posts containing the vulnerable shortcode via WP-CLI
wp post list --post_status=any --format=ids \
  | xargs -I {} wp post get {} --field=content \
  | grep -l 'share_to_google'

# Deactivate the plugin
wp plugin deactivate share-to-google-classroom

# Remove the plugin
wp plugin uninstall share-to-google-classroom

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.