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

CVE-2026-93897: GeoDirectory WordPress Plugin XSS Vulnerability

CVE-2026-93897 is a stored XSS flaw in GeoDirectory WordPress plugin allowing authenticated attackers to inject malicious scripts via custom fields. This article covers the technical details, affected versions, and mitigation.

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-93897 Overview

CVE-2026-93897 is a stored Cross-Site Scripting (XSS) vulnerability in the GeoDirectory – WP Business Directory Plugin and Classified Listings Directory plugin for WordPress. All versions up to and including 2.8.181 are affected. The flaw stems from insufficient input sanitization and output escaping on text-type custom fields such as the phone field. Authenticated users with subscriber-level access or higher can inject arbitrary web scripts that execute whenever a visitor views an affected directory page. The vulnerability is tracked under CWE-79.

Critical Impact

Authenticated attackers with low-privilege accounts can store malicious JavaScript in directory listings, enabling session theft, administrative action hijacking, and malicious redirects for any user viewing the injected page.

Affected Products

  • GeoDirectory – WP Business Directory Plugin and Classified Listings Directory plugin for WordPress
  • All versions up to and including 2.8.181
  • WordPress sites exposing the geodir_save_post AJAX endpoint to subscriber-level users

Discovery Timeline

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

Technical Details for CVE-2026-93897

Vulnerability Analysis

The vulnerability resides in the GeoDirectory plugin's handling of text-type custom fields submitted through the geodir_save_post AJAX endpoint. The plugin performs a tag-stripping check gated by strpos(), which only inspects submitted input for literal < and > characters. When an attacker supplies entity-encoded angle brackets, the gate does not match and the sanitization routine is skipped entirely. The entity-encoded payload is later decoded during rendering, producing executable HTML in the directory listing output.

Stored XSS in a directory plugin is particularly impactful because listings are intended to be viewed by other users, including site administrators who may review or moderate submissions. Script execution occurs in the context of each viewer's session, enabling cookie theft, forced actions through the WordPress REST API, and silent account takeover when an administrator loads the page.

Root Cause

The root cause is a bypassable input validation routine. The sanitization logic relies on a substring search for raw angle brackets rather than a full HTML parser or allow-list filter. Encoded payloads such as <img src=x onerror=alert(1)> pass the strpos() check, are stored in post metadata by functions in includes/post-functions.php, and are later emitted without sufficient output escaping.

Attack Vector

An attacker registers or authenticates as a subscriber on the target WordPress site. The attacker then calls the geodir_save_post AJAX endpoint and submits a payload inside a text-type custom field such as phone, using entity-encoded < and > to evade the tag-stripping gate. The malicious script is stored with the listing and executes in the browser of every subsequent visitor to the page, including administrators. Attack complexity is low and no user interaction beyond page visit is required.

See the Wordfence Vulnerability Report and the GeoDirectory AJAX Class Code for the affected code paths.

Detection Methods for CVE-2026-93897

Indicators of Compromise

  • Directory listing records containing HTML entity sequences such as <img, <script, or onerror= inside text-type custom fields like phone, fax, or email.
  • POST requests to admin-ajax.php with action=geodir_save_post originating from subscriber-level accounts.
  • Unexpected outbound requests from browsers viewing directory pages, particularly to attacker-controlled domains.
  • New or modified listings submitted by low-privilege accounts shortly before administrator session anomalies.

Detection Strategies

  • Query the WordPress postmeta table for GeoDirectory custom field values containing <, >, javascript:, or onerror.
  • Review web server access logs for geodir_save_post AJAX calls followed by abnormal administrative actions from the same client IP.
  • Deploy a web application firewall rule that inspects decoded request bodies for script-like constructs targeting GeoDirectory endpoints.

Monitoring Recommendations

  • Monitor creation of new subscriber accounts followed by rapid use of the geodir_save_post endpoint.
  • Alert on WordPress role changes, option modifications, and plugin installations occurring after an administrator views a user-submitted listing.
  • Track Content Security Policy violation reports on directory listing pages to catch script execution attempts.

How to Mitigate CVE-2026-93897

Immediate Actions Required

  • Upgrade the GeoDirectory plugin to a version later than 2.8.181 once the vendor patch is available.
  • Audit all existing text-type custom field values for stored HTML entities and remove any suspicious listings.
  • Rotate credentials and invalidate active sessions for any administrator who viewed potentially injected listings.
  • Restrict new user registration or require moderator approval for listing submissions until patched.

Patch Information

The vendor addressed the issue in a changeset referenced in the GeoDirectory Changeset Overview. Site operators should update to the fixed release documented in the plugin's WordPress.org changelog and verify that the sanitization path for text-type custom fields no longer relies on a strpos()-gated check.

Workarounds

  • Disable the GeoDirectory plugin or restrict the geodir_save_post AJAX action to editor-level roles and above until the patch is applied.
  • Deploy a WAF rule that blocks requests to admin-ajax.php with action=geodir_save_post containing < or > sequences in field values.
  • Enforce a strict Content Security Policy on directory pages to prevent execution of inline scripts.
  • Set WordPress membership settings so that Anyone can register is disabled, reducing the pool of potential attackers.
bash
# Example WAF rule (ModSecurity) blocking encoded angle brackets in geodir_save_post
SecRule REQUEST_URI "@contains /wp-admin/admin-ajax.php" \
  "chain,phase:2,deny,status:403,id:1026939701,msg:'Blocked CVE-2026-93897 payload'"
  SecRule ARGS:action "@streq geodir_save_post" \
    "chain"
    SecRule ARGS "@rx (?:<|>|<|>)" "t:none,t:lowercase"

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.