# GeoDirectory <= 2.8.194 - Authenticated (Contributor+) Stored Cross-Site Scripting via Post Badge Shortcode 'cta' and 'link' Attributes

- **ID:** WPSEC-2026-1462
- **Plugin:** GeoDirectory – WP Business Directory Plugin and Classified Listings Directory (`geodirectory`), https://wordpress.org/plugins/geodirectory/
- **Affected versions:** all versions before 2.8.195
- **Fixed in:** 2.8.195 (Update to 2.8.195 or later.)
- **Severity:** Medium 6.4 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N)
- **Weakness:** CWE-79
- **Usage among sites WPSec scans:** plugin Low, affected versions Low (as of 2026-10-22)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/geodirectory
- **Fix released:** 2026-10-21
- **Published:** 2026-10-22
- **URL:** https://wpsec.com/vuln/WPSEC-2026-1462/

## Description

The GeoDirectory plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the 'link' and 'cta' attributes of the gd_post_badge shortcode in all versions up to, and including, 2.8.194, due to insufficient output escaping. The 'link' value is placed in a single-quoted href inside popover HTML using esc_url(), which encodes quotes only as HTML entities that are decoded again when the popover is rendered as unsanitized HTML. The 'cta' value is placed in an onclick JavaScript string without its entities being decoded first. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

## References

- https://wpsec.com/vuln/WPSEC-2026-1462/
- https://plugins.svn.wordpress.org/geodirectory/tags/2.8.195/
- https://wordpress.org/plugins/geodirectory/

Source: WPSec, https://wpsec.com/vuln/WPSEC-2026-1462/

License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Free to use, share and adapt, also commercially, if you credit WPSec and link to this advisory.
