CVE-2025-64354 Overview
CVE-2025-64354 is a stored cross-site scripting (XSS) vulnerability affecting the Gutenberg plugin for WordPress, maintained by Matias Ventura. The flaw stems from improper neutralization of user-supplied input during web page generation, classified under [CWE-79]. Attackers with authenticated low-privilege access can inject malicious script content that persists in the database and executes when other users view affected pages. The vulnerability affects all Gutenberg versions up to and including 21.8.2. Exploitation requires user interaction and produces a scope change, allowing injected scripts to reach victims outside the initial security context.
Critical Impact
Authenticated attackers can inject persistent JavaScript payloads that execute in the browsers of site administrators and visitors, enabling session theft, privilege escalation, and content manipulation.
Affected Products
- Matias Ventura Gutenberg plugin for WordPress
- Gutenberg versions from initial release through 21.8.2
- WordPress sites using the standalone Gutenberg plugin for block editor functionality
Discovery Timeline
- 2025-10-31 - CVE-2025-64354 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-64354
Vulnerability Analysis
The Gutenberg plugin fails to properly sanitize or encode user-controlled input before rendering it in generated web pages. This allows an authenticated user with contributor-level or higher permissions to embed JavaScript payloads inside block content or block attributes. When the affected content is rendered in the editor or on the public-facing site, the browser interprets the injected markup as executable script.
Because the payload is stored server-side, every subsequent view of the affected page triggers execution. The scope change indicated by the CVSS vector reflects that scripts execute in the context of the WordPress site, potentially targeting higher-privileged administrators who load the injected content.
Root Cause
The root cause is missing or insufficient output encoding when Gutenberg processes block content containing HTML attributes, embedded URLs, or rich text fields. Input that should be treated as data is instead rendered as active markup, allowing <script> tags or event handlers such as onerror and onload to reach the DOM without neutralization.
Attack Vector
Exploitation requires network access to the WordPress site and authenticated access with content-editing privileges. The attacker crafts a block containing an XSS payload and saves it as part of a post, page, or reusable block. When an administrator previews or publishes the content, the payload executes in their browser session. See the Patchstack WordPress Vulnerability Report for additional technical context.
Detection Methods for CVE-2025-64354
Indicators of Compromise
- Unexpected <script> tags, javascript: URIs, or event handler attributes (onerror, onload, onmouseover) stored in wp_posts content columns
- Outbound requests from administrator browsers to unfamiliar domains shortly after loading the WordPress admin interface
- New administrator accounts or modified user roles created without corresponding admin activity logs
Detection Strategies
- Audit wp_posts and wp_postmeta tables for HTML content containing script tags or suspicious inline event handlers
- Monitor WordPress audit logs for content edits made by low-privilege accounts that touch published pages
- Deploy Content Security Policy (CSP) reporting to capture blocked script execution attempts from stored payloads
Monitoring Recommendations
- Enable request logging on /wp-admin/post.php and /wp-json/wp/v2/ endpoints to identify block content submissions with suspicious payloads
- Correlate authenticated user sessions with unusual DOM modifications reported by browser-side telemetry
- Track file integrity for the Gutenberg plugin directory to detect tampering or unauthorized version rollback
How to Mitigate CVE-2025-64354
Immediate Actions Required
- Update the Gutenberg plugin to a version later than 21.8.2 once the vendor releases a patched release
- Review and remove any suspicious block content submitted by contributor or author accounts since the vulnerability window
- Restrict content-editing privileges to trusted accounts and enforce multi-factor authentication for editorial roles
Patch Information
At the time of publication, the vulnerability affects Gutenberg versions through 21.8.2. Administrators should monitor the Patchstack advisory and the official Gutenberg release notes for a fixed version and apply the update immediately upon availability.
Workarounds
- Temporarily revoke block editor access for contributor and author roles until a patched version is deployed
- Deploy a strict Content Security Policy that disallows inline scripts and restricts script sources to trusted origins
- Use a web application firewall rule set that inspects and blocks XSS payloads in POST bodies to /wp-json/wp/v2/ and /wp-admin/post.php
# Example CSP header to reduce stored XSS impact
Header set Content-Security-Policy "default-src 'self'; script-src 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'self'"
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

