Skip to main content
Vulnerability Database/CVE-2026-96766

CVE-2026-96766: GeoDirectory WordPress Plugin XSS Vulnerability

CVE-2026-96766 is a stored cross-site scripting flaw in GeoDirectory WordPress plugin allowing authenticated attackers to inject malicious scripts. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-96766 Overview

CVE-2026-96766 is a Stored Cross-Site Scripting (XSS) vulnerability [CWE-79] in the GeoDirectory – WP Business Directory Plugin and Classified Listings Directory plugin for WordPress. The flaw affects all versions up to and including 2.8.183. The vulnerability resides in the business_hours parameter and stems from insufficient input sanitization and output escaping. Authenticated attackers with subscriber-level access or higher can inject arbitrary web scripts that execute when users browse affected pages. The AJAX save handler validates only post authorship and a nonce, with no additional capability check, allowing any subscriber who owns a listing to exploit the flaw.

Critical Impact

Any authenticated subscriber owning a listing can store malicious JavaScript that executes in the browser of every visitor to the affected directory page, enabling session hijacking, account takeover, and content defacement.

Affected Products

  • GeoDirectory – WP Business Directory Plugin and Classified Listings Directory plugin for WordPress
  • All versions <= 2.8.183
  • WordPress sites exposing listing creation to subscriber-level accounts

Discovery Timeline

  • 2026-09-25 - CVE-2026-96766 published to NVD
  • 2026-09-25 - Last updated in NVD database

Technical Details for CVE-2026-96766

Vulnerability Analysis

The vulnerability allows a low-privileged authenticated user to persist arbitrary HTML and JavaScript into a listing's business hours field. When any site visitor renders the listing page, the stored payload executes within the visitor's browser context. Because the payload executes in the context of the WordPress site, it can be used to steal session cookies, perform actions on behalf of administrators, or redirect users to attacker-controlled infrastructure. Scope change in the attack indicates that impact extends beyond the vulnerable component into other site users' browser sessions.

Root Cause

The plugin's business hours save path, implemented in includes/business-hours-functions.php and reached through the AJAX handler in includes/class-geodir-ajax.php, fails to sanitize input before persistence and fails to escape output during rendering through includes/custom-fields/input-functions-aui.php. Compounding the sanitization gap, the AJAX save handler enforces only two checks: nonce validation and post ownership. It omits a current_user_can() capability check, so any WordPress role down to Subscriber that owns a listing is treated as sufficiently privileged to modify fields that render as HTML.

Attack Vector

An attacker registers a subscriber account on a vulnerable WordPress site, creates or claims a GeoDirectory listing, and sends a crafted AJAX POST to the GeoDirectory save endpoint with a malicious payload in the business_hours parameter. The payload persists in the database and renders without escaping on every subsequent page view of the listing. The vulnerability is remotely exploitable over the network and requires no user interaction beyond normally browsing the affected page.

See the WordPress GeoDirectory Business Hours Function and the WordPress GeoDirectory AJAX Class Code for the vulnerable code paths.

Detection Methods for CVE-2026-96766

Indicators of Compromise

  • Unexpected <script>, onerror=, onload=, or javascript: strings stored in GeoDirectory business_hours post meta fields
  • AJAX POST requests to admin-ajax.php with action=geodir_ parameters originating from subscriber-level accounts
  • New or recently modified listings owned by low-privileged accounts containing abnormally long business hours values
  • Outbound requests from visitor browsers to unfamiliar domains after loading a directory listing page

Detection Strategies

  • Query the wp_postmeta table for entries containing HTML tags or JavaScript event handlers within business hours metadata keys
  • Review WordPress audit logs for subscriber accounts invoking GeoDirectory AJAX actions that modify listing content
  • Deploy a Web Application Firewall (WAF) rule to flag listing update requests containing script tags or encoded JavaScript

Monitoring Recommendations

  • Enable WordPress activity logging for user role creation, listing creation, and post meta updates by non-admin roles
  • Monitor browser error reports and Content Security Policy (CSP) violation reports for inline script execution on directory pages
  • Alert on new subscriber registrations that immediately create or edit listings

How to Mitigate CVE-2026-96766

Immediate Actions Required

  • Update the GeoDirectory plugin to the version containing the fix published in changeset 3710682
  • Audit all existing listings for stored script content in the business_hours field and sanitize or remove malicious entries
  • Review all subscriber-level accounts and remove any created by unknown actors

Patch Information

The vendor addressed the issue after version 2.8.183. Site administrators should apply the latest GeoDirectory release from the WordPress plugin repository. Refer to the Wordfence Vulnerability Report for patch validation details.

Workarounds

  • Restrict new user registration or set the default role to a role that cannot own GeoDirectory listings until the patch is applied
  • Deploy a Content Security Policy (CSP) header that disallows inline scripts on pages rendering directory listings
  • Apply WAF rules blocking HTML tags and JavaScript event handlers in the business_hours POST parameter sent to admin-ajax.php
bash
# Example WAF rule (ModSecurity) to block script payloads in business_hours
SecRule ARGS:business_hours "@rx (?i)(<script|onerror=|onload=|javascript:)" \
    "id:1026967660,phase:2,deny,status:403,log,\
    msg:'CVE-2026-96766 GeoDirectory business_hours XSS attempt'"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.