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-30595 Overview
CVE-2025-30595 is a stored cross-site scripting (XSS) vulnerability in the tstafford include-file WordPress plugin. The flaw stems from improper neutralization of input during web page generation, classified under [CWE-79]. Affected versions include all releases up to and including version 1. An authenticated attacker with low privileges can inject persistent JavaScript payloads that execute in the browser context of any user who views the affected page. Because the scope changes when the payload runs in another user's session, the vulnerability can facilitate session compromise, credential theft, and unauthorized actions performed on behalf of the victim.
Critical Impact
Authenticated attackers can store malicious scripts that execute in visitor and administrator browsers, enabling account takeover and content manipulation within affected WordPress sites.
Affected Products
- tstafford include-file WordPress plugin
- All versions from n/a through <= 1
- WordPress sites with the vulnerable plugin installed and activated
Discovery Timeline
- 2025-03-24 - CVE-2025-30595 published to NVD
- 2026-06-17 - Last updated in NVD database
Technical Details for CVE-2025-30595
Vulnerability Analysis
The include-file plugin fails to sanitize or encode user-supplied input before rendering it within generated web pages. Stored XSS occurs when attacker-controlled content is persisted in the WordPress database and later returned in HTTP responses without proper output escaping. Any script the attacker stores executes in the browser of every visitor who loads the affected page.
Exploitation requires low-privilege authentication and user interaction to trigger the payload. The scope is changed, meaning the injected script executes in a different security context than the one used to inject it. This enables attackers with limited plugin access to reach higher-privileged administrator sessions.
Root Cause
The root cause is missing input validation and output encoding in a plugin field that accepts user-supplied content. WordPress provides functions such as wp_kses(), esc_html(), esc_attr(), and sanitize_text_field() for exactly this purpose. The plugin does not apply these functions to the affected input, allowing raw HTML and JavaScript to persist in the database and render unescaped in the DOM.
Attack Vector
An authenticated user with permission to interact with the plugin submits a payload containing HTML script tags or event handlers. The payload is stored in the WordPress database. When another user, including an administrator, loads a page that renders the stored content, the browser parses and executes the injected script. Consult the Patchstack WordPress XSS Vulnerability advisory for additional technical context.
Detection Methods for CVE-2025-30595
Indicators of Compromise
- Unexpected <script> tags, onerror, onload, or javascript: URIs stored in wp_posts, wp_postmeta, or plugin-specific tables.
- Outbound requests from administrator browsers to unfamiliar domains shortly after loading pages that use the include-file plugin.
- New administrator accounts or modified user roles created without corresponding legitimate admin activity.
Detection Strategies
- Audit WordPress database entries associated with the include-file plugin for HTML tags, event handler attributes, and encoded script payloads.
- Deploy a Web Application Firewall (WAF) rule set that inspects POST bodies destined for plugin endpoints for XSS payload signatures.
- Enable Content Security Policy (CSP) reporting to surface script execution from unexpected origins.
Monitoring Recommendations
- Monitor WordPress access logs for repeated POST requests to plugin administration endpoints from low-privilege accounts.
- Alert on modifications to plugin content that include HTML markup or script constructs.
- Track browser telemetry for anomalous script execution or DOM modifications on WordPress-served pages.
How to Mitigate CVE-2025-30595
Immediate Actions Required
- Deactivate and remove the include-file plugin until a patched release is confirmed available from the maintainer.
- Review all WordPress user accounts and revoke unnecessary contributor, author, or editor privileges.
- Rotate administrator credentials and invalidate active sessions to contain potential post-exploitation persistence.
Patch Information
No vendor-supplied patch is referenced in the available advisory data. Consult the Patchstack WordPress XSS Vulnerability entry for updated remediation guidance and monitor the plugin repository for a fixed release.
Workarounds
- Remove the plugin from all WordPress installations if a patched version is not available.
- Enforce a strict Content Security Policy that blocks inline scripts and restricts script sources to trusted origins.
- Apply WAF rules that filter HTML tags and JavaScript event handlers from requests targeting plugin endpoints.
# Disable the vulnerable plugin via WP-CLI
wp plugin deactivate include-file
wp plugin delete include-file
# Audit database for stored XSS payloads
wp db query "SELECT ID, post_title FROM wp_posts WHERE post_content REGEXP '<script|onerror=|onload=|javascript:';"
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

