/

CVE-2026-120082

Severity:

HIGH RISK

(7.2)

Stored Cross-Site Scripting (CWE-79) in GeoDirectory Plugin

CVE-2026-120082

Deferred

Vulnerability type

Category:

Stored Cross-Site Scripting

CWE:

CWE-79

Impact:

Execution of attacker-controlled scripts in visitors' browsers

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

GeoDirectory for WordPress has a stored cross-site scripting vulnerability involving the post_content parameter, caused by insufficient input sanitization and output escaping. An unauthenticated attacker may be able to store script content that runs in a visitor's browser when they view an affected page.

Affected context

The issue occurs in the GeoDirectory – WP Business Directory Plugin and Classified Listings Directory plugin for WordPress, in handling content that includes nested shortcodes. The described weakness affects versions up to and including 2.8.200 when crafted post_content is accepted and later rendered. The shortcode-stripping guard may be bypassed because WordPress processes registered shortcodes in a single pass, while HTML-entity-encoded shortcode attributes can remain after wp_kses_post() filtering.

Exploit preconditions

  • Attack surface: WordPress content handling and rendering through GeoDirectory.
  • Required access: The vulnerability description indicates that authentication is not required.
  • Trigger point: A visitor accesses a page containing the stored content.
  • Why exploitation is possible: Nested shortcode content can evade the plugin's shortcode-removal check, and entity-encoded attribute values may not be handled as HTML tags by the subsequent HTML filtering.

Why this happens

The underlying issue is inadequate validation and context-aware output encoding of content passed through shortcode processing. The plugin's guard relies on a single-pass shortcode removal step, which can leave nested shortcode structures for later processing; HTML sanitization does not necessarily neutralize shortcode attribute values. This is a stored cross-site scripting flaw mapped to CWE-79, where untrusted content can be interpreted as executable script in a user's browser.

Potential impact

  • Attacker-controlled script execution may occur in the context of a visitor's browser.
  • Scripts could access or manipulate page content and perform actions as the affected visitor, subject to the site's browser and application controls.
  • Site integrity and visitor trust could be affected if malicious content is stored and displayed.

General mitigation guidance

Defensive approaches generally focus on treating submitted content as untrusted throughout parsing and rendering.

  • Use context-appropriate sanitization and output escaping at the point content is rendered.
  • Avoid relying on a single shortcode-stripping pass as a security boundary; use parsing and validation that account for nested or recursively processed content.
  • Restrict accepted shortcode structures and attribute values to explicitly allowed forms.
  • Prefer secure-by-default rendering paths that do not interpret user-controlled content as executable markup or shortcode instructions.
  • Limit permissions for content submission where practical, while recognizing that access controls alone may not address unauthenticated paths.

How teams detect issues like this

  • Use static analysis to identify user-controlled content reaching shortcode parsers or HTML output without context-appropriate escaping.
  • Review code that combines shortcode removal, recursive or multi-stage parsing, and HTML sanitization.
  • Test rendering paths with nested shortcode structures and encoded attribute values in controlled environments.
  • Apply content-security policies and security review checks as defense-in-depth measures; these do not replace correct sanitization and escaping.
  • Automated code review tools may help flag unsafe output and parsing patterns.

Sources

SourceLink
github.comgithub.com/AyeCode/geodirectory/archive/refs/heads/master.zip
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/geodirectory/tags/2.8.200/includes/class-geodir-ajax.php#L830
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/geodirectory/tags/2.8.200/includes/class-geodir-post-data.php#L1732
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/geodirectory/tags/2.8.200/includes/formatting-functions.php#L640
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/geodirectory/tags/2.8.200/includes/widgets/class-geodir-widget-dynamic-content.php#L169
plugins.trac.wordpress.orgplugins.trac.wordpress.org/browser/geodirectory/tags/2.8.200/includes/widgets/class-geodir-widget-dynamic-content.php#L456
plugins.trac.wordpress.orgplugins.trac.wordpress.org/changeset/3779924/geodirectory/trunk/includes/widgets/class-geodir-widget-dynamic-content.php
wordfence.comwordfence.com/threat-intel/vulnerabilities/id/2db386bd-3edc-48ae-9e32-ac57d472ab5b?source=cve

Frequently asked

questions

The vulnerability description states that unauthenticated attackers may be able to inject the stored content. Exploitation also depends on the vulnerable content-handling path being reachable.

The stored content may be interpreted when a visitor accesses an affected page, allowing attacker-controlled script to execute in that visitor's browser.

Treat submitted content as untrusted, validate shortcode structures and attributes, and apply context-appropriate output escaping when rendering. Do not rely on shortcode stripping or HTML filtering alone.

Review every stage of content parsing and rendering, test nested and encoded input cases, and enforce secure coding checks for untrusted data reaching browser output.

Find out what's already
exploitable in your codebase.