# Leaflet Map <= 3.4.7 - Authenticated (Contributor+) Stored Cross-Site Scripting via leaflet-geojson Shortcode Popup Content

- **ID:** WPSEC-2026-4233
- **Plugin:** Leaflet Map (`leaflet-map`), https://wordpress.org/plugins/leaflet-map/
- **Affected versions:** from 2.2.0 before 3.4.8
- **Fixed in:** 3.4.8 (Update to 3.4.8 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-11-29)
- **Attack surface analysis:** https://attacksurface.wpsec.com/plugin/leaflet-map
- **Fix released:** 2026-11-28
- **Published:** 2026-11-29
- **URL:** https://wpsec.com/vuln/WPSEC-2026-4233/

## Description

The Leaflet Map plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the popup content of the leaflet-geojson shortcode (and the leaflet-kml and leaflet-gpx shortcodes built on it) in all versions up to, and including, 3.4.7. This is due to insufficient input sanitization and output escaping. The popup_text attribute was decoded back into HTML in the browser without sanitization and passed to Leaflet's bindPopup(). Feature properties from the GeoJSON source, used through popup_property, {property} templates and table_view, were also inserted into popup HTML without escaping. This makes it possible for authenticated attackers with contributor-level access and above to inject arbitrary web scripts in pages. They can do this with entity-encoded markup in shortcode attributes or by pointing the shortcode at a GeoJSON source they control. The scripts execute when a user opens the map popup on an injected page.

## References

- https://wpsec.com/vuln/WPSEC-2026-4233/
- https://plugins.svn.wordpress.org/leaflet-map/tags/3.4.8/
- https://wordpress.org/plugins/leaflet-map/

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

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.
