CVE-2025-54704
Executive Summary
CVE-2025-54704 is a DOM-Based Cross-Site Scripting (XSS) vulnerability affecting the WordPress plugin Easy Elementor Addons by Hashthemes, versions up to and including 2.2.6. The vulnerability stems from improper neutralization of user input during web page generation, allowing an attacker to inject malicious scripts that execute in the context of the victim's browser. This is a client-side attack vector, typically requiring user interaction (e.g., clicking a crafted link). The CVSS score of 6.5 (Medium) reflects the potential for data theft, session hijacking, and defacement. As of this report, no official patch is available, and no public exploit code has been released.
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. The plugin is not distributed via NPM, PyPI, Go, or Ruby registries. The supply chain risk is moderate, as the plugin is a third-party component within the WordPress ecosystem. Administrators should monitor the plugin's update channel for a patched version.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The attack is launched over the network.
- 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 crafted link or visit a malicious page.
- Scope (S): Changed (C) – The vulnerability impacts resources beyond the vulnerable component (e.g., cookies, session tokens).
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): Low (L) – Limited impact on availability.
Threat Level: Medium. While the CVSS score is 6.5, the lack of a public exploit and low EPSS score (0.0%) reduces immediate risk. However, the vulnerability is unpatched, making it a potential target for targeted attacks.
Deep Dive & Mechanics
The vulnerability is a DOM-Based XSS flaw in the Easy Elementor Addons plugin. Unlike reflected or stored XSS, DOM-Based XSS occurs entirely on the client side. The vulnerable JavaScript code within the plugin reads data from an attacker-controllable source (e.g., document.location.hash, document.location.search, or window.name) and writes it to a sink (e.g., innerHTML, document.write, or eval) without proper sanitization.
Attack Flow:
- An attacker crafts a malicious URL containing a payload in the fragment identifier (e.g.,
https://victim-site.com/#<script>alert('XSS')</script>). - The victim clicks the link or is redirected to it.
- The victim's browser loads the page, and the vulnerable JavaScript executes.
- The script reads the fragment identifier and injects it into the DOM, causing the payload to execute.
- The attacker can then steal cookies, redirect the user, or perform actions on behalf of the victim.
The specific vulnerable component is likely a widget or addon that processes URL parameters or hash values without encoding.
Vulnerable vs. Patched Code
Since no patch is available, the following is a hypothetical comparison based on common DOM XSS patterns.
Vulnerable Code (JavaScript):
// Vulnerable: Directly using location.hash without sanitization
var hash = window.location.hash.substring(1);
document.getElementById('output').innerHTML = hash;
Patched Code (Hypothetical):
// Patched: Using textContent to prevent HTML injection
var hash = window.location.hash.substring(1);
document.getElementById('output').textContent = hash;
Explanation: The vulnerable code uses innerHTML, which interprets the input as HTML. The patched code uses textContent, which treats the input as plain text, preventing script execution.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A WordPress site with Easy Elementor Addons <= 2.2.6 installed and active.
- A victim user with a modern browser.
Exploitation Steps:
- Identify a page that uses a vulnerable widget (e.g., a custom heading or text block that reads from the URL hash).
- Craft a malicious URL:
https://victim-site.com/?page_id=123#<img src=x onerror=alert(document.cookie)> - Send the link to the victim via phishing email, social media, or other means.
- When the victim clicks the link, the JavaScript executes, and the attacker can capture cookies or perform other actions.
Proof-of-Concept (PoC) HTML (for testing):
<!DOCTYPE html>
<html>
<head><title>PoC for CVE-2025-54704</title></head>
<body>
<h1>Click the link below:</h1>
<a href="https://victim-site.com/?page_id=123#<script>alert('XSS')</script>">Click me</a>
</body>
</html>
Blue Team (Defensive)
Detection:
- Monitor web server logs for requests containing suspicious hash fragments (e.g.,
<script>,onerror=,javascript:). - Use a Web Application Firewall (WAF) to block requests with XSS patterns in the URL fragment (though fragments are not sent to the server, client-side detection is needed).
- Deploy Content Security Policy (CSP) headers to mitigate XSS impact.
Hunting Query (Splunk):
index=web_logs uri_path="/" uri_query="*page_id=*" | regex uri_fragment="<script|onerror|onload|alert\(|prompt\(|confirm\("
Indicators of Compromise (IOCs)
- Network IOCs:
- URLs containing
#<script>or#<imgin the fragment identifier. - Outbound connections to attacker-controlled domains (e.g., for cookie exfiltration).
- URLs containing
- Host IOCs:
- Presence of unexpected JavaScript execution in browser console.
- Modified DOM elements (e.g., injected
<script>tags).
- File IOCs:
- Plugin file:
/wp-content/plugins/easy-elementor-addons/(version <= 2.2.6).
- Plugin file:
Detection Engineering
YARA Rule
rule CVE_2025_54704_DOM_XSS {
meta:
description = "Detects vulnerable JavaScript patterns in Easy Elementor Addons"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-54704"
strings:
$sink1 = ".innerHTML" nocase
$sink2 = ".outerHTML" nocase
$sink3 = "document.write" nocase
$source1 = "location.hash" nocase
$source2 = "location.search" nocase
$source3 = "window.name" nocase
condition:
any of ($sink*) and any of ($source*)
}
Sigma Rule
title: CVE-2025-54704 DOM XSS in Easy Elementor Addons
id: 8a4b3c2d-1e5f-6a7b-8c9d-0e1f2a3b4c5d
status: experimental
description: Detects potential DOM XSS exploitation attempts via URL fragment
author: Valters IT
date: 2025-04-10
logsource:
category: web
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains:
- '#<script'
- '#<img'
- '#<svg'
- 'onerror='
- 'onload='
condition: selection
falsepositives:
- Legitimate use of hash fragments for navigation
level: medium
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-54704 DOM XSS Attempt"; flow:to_server,established; content:"#<script"; http_uri; nocase; sid:1000001; rev:1;)
alert http any any -> any any (msg:"CVE-2025-54704 DOM XSS via onerror"; flow:to_server,established; content:"#<img"; http_uri; nocase; content:"onerror="; http_uri; nocase; sid:1000002; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin if it is not critical to operations.
- Apply a virtual patch using a WAF to block XSS payloads in URL fragments.
- Implement Content Security Policy (CSP) with
script-src 'self'to prevent inline script execution.
Long-Term Fix:
- Monitor the plugin's official page for a patched version (>= 2.2.7).
- If no patch is released, consider replacing the plugin with an alternative.
Workaround:
- Modify the vulnerable JavaScript file (if possible) to use
textContentinstead ofinnerHTML. This is not recommended for non-developers.
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.