The Hidden WordPress Admin Account: A 15-Minute Audit and What to Do If You Find One
How attackers hide an admin from the Users screen, and the WP-CLI and SQL checks, mu-plugin, drop-in and app-password audits that find it.

Yes, a WordPress site can have an administrator account that the Users screen never shows, and the reliable way to find it is to read the database directly instead of asking WordPress for a list. Attackers hide the account with a filter on the user query, usually from a must-use plugin, so every WordPress-built list (the Users screen, and wp user list too) leaves it out. This guide shows how the hiding works, the WP-CLI and SQL checks that see through it, which mu-plugins, drop-ins and application passwords to inspect, and how to clean up without leaving a way back. Commands were checked on 15 Nov 2026 against the WordPress and WP-CLI documentation and core source.
How do attackers hide an admin account from the Users screen?
They change what WordPress asks the database for, not what the database holds. The account stays in the users and usermeta tables with a normal administrator role, and a few lines of PHP remove it from every list WordPress builds. The table below covers the places the hiding code can live and what each one fools.
Technique | What it does | Where the code sits | Source |
|---|---|---|---|
| Appends | Active theme | Sucuri, 20 Jan 2017; Patchstack, 6 Oct 2026 |
| Adds the account to | Same places | Patchstack, 6 Oct 2026 |
| Lowers the role counts above the list so the numbers still add up | Same places | Patchstack, 6 Oct 2026 |
Must-use plugin as the carrier | Loads on every request, cannot be switched off in wp-admin, absent from the normal Plugins list |
| WordPress developer handbook; Sucuri, 22 Jul 2025 |
Code that re-creates the user | Inserts the admin again on every page view or on a trigger | Theme | Sucuri, 25 Mar 2022 |
Each hook has an official definition. WordPress documents pre_user_query as firing “after the WP_User_Query has been parsed, and before the query is executed”, which is exactly the moment a hider needs. The users_list_table_query_args filter changes the arguments for the Users table. The third hook, views_users, is the dynamic views_{$screen->id} filter on the same screen. All three are legitimate hooks that membership and role plugins use for honest reasons, so finding one is a lead, not a verdict.
What does a real hidden-admin campaign look like?
The clearest recent write-up is Patchstack’s analysis of 6 October 2026, Four ways back in. We re-read it on 15 Nov 2026. A stored cross-site scripting flaw puts JavaScript in front of a logged-in administrator, and that script, running inside the administrator’s own session, installs a plugin, creates an administrator and drops two must-use plugins.
- Patchstack first saw the payload on 4 October 2026 against WPC Product Bundles for WooCommerce (CVE-2026-93836, affecting versions through 8.6.6) and on 5 October against Ninja Forms (CVE-2026-94504, versions through 3.15.3). The fixes it names are 8.6.7 and 3.15.4.
- The hidden account gets a name drawn from routine words such as support, updater, maintenance or backup, with an
@wordpress.orgaddress. - A must-use file named
class-wp-query-<8 hex characters>.phpinstalls thepre_user_query,users_list_table_query_argsandviews_usershooks. - A second file,
class-wp-token-validate.php, accepts/wp-login.php?_wplogin=<token>and signs the visitor in as the site’s oldest administrator. Tokens sit in thefz_emer_login_tokensoption. - Patchstack says the installer backdates every file it writes to the oldest timestamp it finds, so a hunt for recently changed files misses them.
That last point changes how you audit. Sort by content, not by date. Two older, simpler cases show the same idea from other angles. In January 2017 Sucuri published a small pre_user_query hook found in a theme’s functions.php that hid a user called admina (Hooking WordPress Class to Hide Malicious Users). On 22 July 2025 Sucuri described an mu-plugin loader, wp-index.php, that fetched a remote payload and created an administrator named officialwp (Uncovering a Stealthy WordPress Backdoor in mu-plugins). Neither is the same campaign as the October 2026 one. They are the same trick used by different people.
Why does the role count give it away?
Because the numbers above the Users list come from a different query than the rows. The role badges on that screen are built from count_users(), which in core reads the capabilities rows in usermeta directly. The rows below come from WP_User_Query, which the pre_user_query hook can edit. If the hider only filters the rows, the badge says four administrators and three rows appear. That is why Patchstack’s mu-plugin also hooks views_users: to lower the badge and remove the evidence.
Two limits to know. On large sites WordPress skips the per-role counts on this screen (core checks wp_is_large_user_count()), so you may see no badges to compare. And a matching count proves nothing when the hider has fixed the badge too. Treat a mismatch as a strong alarm and a match as no information.
Which tool sees the account and which does not?
Match the tool to the layer it reads. Anything that goes through WP_User_Query can be filtered. Anything that reads the tables with SQL cannot.
What you run | What it reads | Can the hiding hooks affect it? |
|---|---|---|
Users screen in wp-admin |
| Yes, all three |
|
| Yes, in our reading |
| One user by ID, not a list query | Not by the list filters |
| The tables, straight from MySQL | No |
A phpMyAdmin or Adminer session | The tables | No |
The WP-CLI row deserves a caution. We have not run wp user list against a live infected site, so “can be filtered” rests on the documented behaviour plus the fact that WP-CLI loads mu-plugins like any other request. The safe habit is to use SQL for the first pass and WP-CLI for everything after it.
How do I find a hidden admin with WP-CLI and SQL?
Run five checks from the WordPress root, write down each result, and change nothing yet. Every query uses $(wp db prefix), which asks WP-CLI for your table prefix, so you do not have to guess whether it is wp_ or something else. The prefix matters twice: it names the tables and it is part of the meta key, which is <prefix>capabilities, not a fixed wp_capabilities.
Check 1: list administrators from the tables
This is the query that matters. It joins users to usermeta and keeps rows whose serialized role array contains administrator. The quotes around the word narrow the match to the exact role name.
# checked on 15 Nov 2026
wp db query "SELECT u.ID, u.user_login, u.user_email, u.user_registered
FROM $(wp db prefix)users u
JOIN $(wp db prefix)usermeta m ON m.user_id = u.ID
WHERE m.meta_key = '$(wp db prefix)capabilities'
AND m.meta_value LIKE '%\"administrator\"%'
ORDER BY u.user_registered DESC"Now open Users, then Administrators, in wp-admin. Every row from the query must be on the screen and every one must belong to a person you can name. A row in the database and not on the screen is the hidden account. This is a close variant of the query Patchstack publishes in its detection notes, which uses a plain wp_ prefix.
Check 2: compare raw user count with the filtered count
This check does not depend on roles, so it also catches an account hidden before you thought to look at administrators.
# checked on 15 Nov 2026
wp db query "SELECT COUNT(*) AS users_in_table FROM $(wp db prefix)users"
wp user list --format=countThe first number comes from the table. The second goes through WP_User_Query. On a clean single site they match. A gap means something is removing rows from the list query. On multisite, wp user list shows the current site’s users unless you pass --network, so compare like with like.
Check 3: look at every role value, not just administrator
A hider can create a custom role that carries admin capabilities without the word administrator. List the distinct role values and their counts:
# checked on 15 Nov 2026
wp db query "SELECT meta_value, COUNT(*) AS accounts
FROM $(wp db prefix)usermeta
WHERE meta_key = '$(wp db prefix)capabilities'
GROUP BY meta_value ORDER BY accounts"You should recognise every row. A role you did not create, with one account, deserves a look. On multisite each site has its own key (the prefix plus the site ID, then capabilities), and network super admins are stored separately in the network’s site_admins option, so repeat the checks per site and read that option too.
Check 4: ask WordPress which code is hooked on the list filters
This tells you which file is doing the hiding, even when the file is obfuscated. Save the script, then run it with wp eval-file.
<?php
// Run with: wp eval-file who-hooks.php (checked on 15 Nov 2026)
global $wp_filter;
foreach ( array( 'pre_user_query', 'users_list_table_query_args', 'views_users' ) as $hook ) {
if ( empty( $wp_filter[ $hook ] ) ) {
echo $hook, ': none', PHP_EOL;
continue;
}
foreach ( $wp_filter[ $hook ]->callbacks as $priority => $callbacks ) {
foreach ( $callbacks as $cb ) {
$fn = $cb['function'];
if ( is_array( $fn ) ) {
$ref = new ReflectionMethod( $fn[0], $fn[1] );
} elseif ( is_string( $fn ) && false !== strpos( $fn, '::' ) ) {
$ref = new ReflectionMethod( $fn );
} else {
$ref = new ReflectionFunction( $fn );
}
echo $hook, ' (priority ', $priority, '): ', $ref->getFileName(), ':', $ref->getStartLine(), PHP_EOL;
}
}
}Each output line names the file and line that registered a callback. A file under mu-plugins you cannot explain is the lead you wanted. We syntax-checked the script with php -l and ran it against a mock hook table with closures, plain functions and methods. We did not run it on a live infected site. Two honest limits: hooks added only inside an is_admin() branch will not exist in a WP-CLI run, and honest plugins can show up here too, so judge by file and purpose. A text search is a cheaper first pass but misses obfuscated code, because Patchstack says the October 2026 files are packed with XOR and gzip:
# checked on 15 Nov 2026 - misses obfuscated code
grep -rnE "pre_user_query|users_list_table_query_args|views_users" wp-content --include=*.phpCheck 5: read the newest accounts and the raw meta
Last, list the ten newest users by ID with no role filter, then read one suspicious ID directly. wp user get fetches a single user, and wp user meta get reads one meta key for that ID, so neither depends on a list query.
# checked on 15 Nov 2026
wp db query "SELECT ID, user_login, user_email, user_registered
FROM $(wp db prefix)users ORDER BY ID DESC LIMIT 10"
wp user get 42 --fields=ID,user_login,user_email,roles
wp user meta get 42 "$(wp db prefix)capabilities"Replace 42 with an ID from your own output. Look for generic names, an @wordpress.org address on a local account, and a registration date that lines up with a time someone with admin rights opened an order, a form entry or a pending comment.
Which mu-plugins and drop-ins should I inspect?
Both load PHP on every request without an activation step, so both belong in the audit. The developer handbook says must-use plugins do not show on the default Plugins list, cannot be disabled from wp-admin, and are removed only by deleting the file. Hosts use the folder for real jobs such as caching and monitoring, so the job is to know what belongs.
# checked on 15 Nov 2026
ls -la wp-content/mu-plugins/
wp plugin list --status=must-use
wp plugin list --status=dropin
find wp-content -maxdepth 1 -type f -name '*.php'The --status=dropin option is in the WP-CLI plugin list documentation. The WordPress function _get_dropins() lists the file names core recognises: advanced-cache.php, db.php, db-error.php, install.php, maintenance.php, object-cache.php, php-error.php and a few more, all sitting directly in wp-content. A db.php is a custom database class that replaces core’s own, and an object-cache.php loads early on every request. If your host does not use Redis or Memcached and one of these files exists, ask why. We did not find a published campaign in the sources we read that hides admins through a drop-in, so treat this as hygiene rather than a known pattern.
For each file, read it. Do not rely on the modification time, because the October 2026 implant sets it to the oldest date in the install. Be suspicious of base64, gzinflate, str_rot13, XOR loops and remote fetches inside mu-plugins. Compare against your host’s documentation for which files it adds. If you cannot explain a file, copy it off the server, then move it out of the folder (do not just rename it in place).
How do I check application passwords on a suspect site?
An application password is a long-lived credential for the REST API, created from a user profile, and a hidden administrator can mint one that survives a password change. Core stores them in each user’s meta under _application_passwords, so one SQL query shows every account that has any, hidden or not:
# checked on 15 Nov 2026
wp db query "SELECT user_id, LENGTH(meta_value) AS bytes
FROM $(wp db prefix)usermeta
WHERE meta_key = '_application_passwords' AND meta_value != ''"
wp user application-password list 42 --fields=uuid,name,created,last_used,last_ipThe second command comes with WP-CLI 2.6.0 and later, and the field names match its documentation. Run it for each user ID the first query returns. A name nobody on the team recognises, or a recent last_used from an address you do not know, is a finding. Delete with wp user application-password delete USER_ID UUID after you have recorded it. WordPress also lets you switch the feature off site-wide with the wp_is_application_passwords_available filter, which the integration guide shows, a fair option if nothing on the site uses the REST API with a password.
What else should I look for besides the account?
The account is rarely alone. Patchstack lists four independent ways back in for the October 2026 campaign: a visible administrator, the hidden one, the magic login URL and an unauthenticated file manager disguised as a plugin called WP Smart Thumbnails. Run these quick checks from that report’s indicators:
# checked on 15 Nov 2026
wp db query "SELECT option_name, LENGTH(option_value) AS bytes FROM $(wp db prefix)options WHERE option_name LIKE 'fz\\_emer%'"
ls -la wp-content/plugins/wp-smart-thumbnails/
grep -h "_wplogin=" /path/to/access.log*
wp core verify-checksums
wp plugin verify-checksums --allThe options query looks for fz_emer_done_v1 and fz_emer_login_tokens without printing the token. Any row means the persistence installer ran. The access-log path is a placeholder because every host stores logs differently. The two checksum commands compare core and wordpress.org-hosted plugin files to the published hashes, but they skip anything not hosted there, and they cannot see a file that was never part of a package, such as an extra mu-plugin. A clean result here narrows the search. It does not end it.
If you only came here to find out whether one plugin update is enough, the answer is no. Patchstack says removing the injected JavaScript alone is not sufficient because the malware moves persistence outside the vulnerable plugin. For the plugin-side check, our file-upload flaw check and clean guide covers the same “patched is not cleaned” problem for uploads.
How do I clean up a hidden admin account?
Work in this order, because deleting first can lose evidence and leave the cause in place. Sucuri’s March 2022 case shows why: a client deleted an unwanted user through wp-admin, MySQL and Adminer, and it kept coming back because code in the theme’s functions.php created it on every page view.
- Back up first. Export the database and copy
wp-content. If the site is compromised you want the evidence. - Limit access. Put the site in maintenance mode or restrict wp-admin and the login to your IP at the server. The Patchstack file manager runs without a login, so blocking the login page alone is not enough.
- Find and remove the cause. Use check 4 and the mu-plugin and drop-in listings to identify what hides or re-creates the account. Remove those files from the filesystem. Deleting a plugin from the dashboard will not touch an mu-plugin.
- Restore from a clean backup if you have one, taken before the first possible infection date, then update everything before the site is reachable again. Without a clean backup, reinstall core and every plugin from official sources and read any custom code before you keep it. Our five-minute site security audit is a good follow-up pass once the site is rebuilt.
- Delete the rogue accounts after you have noted their details:
wp user delete USER_ID --reassign=OWNER_IDremoves the user and hands their content to another account. On multisite add--networkonly after reassigning content, because without it the user is removed from the current site only. - Remove campaign leftovers you found:
wp option delete fz_emer_done_v1andwp option delete fz_emer_login_tokens, then revoke unknown application passwords. - Rotate credentials and salts.
wp config shuffle-saltswrites new keys towp-config.php, which invalidates every login cookie. Thenwp user session destroy --allfor a given user, or loop over IDs as the WP-CLI example shows. Set new passwords for every administrator and editor, and change the database, SFTP and hosting panel passwords. Sucuri’s 2025 write-up says that malware resets the passwords of common admin names such as admin and root to a default, so a password change alone does not hold. Our credential rotation checklist lists the systems to cover. - Tell the right people. If the site holds customer data, the owner may have notification duties that depend on where they operate. That is a question for them and a lawyer, not something we can answer.
- Re-run the five checks on the cleaned site and again a week later.
How do I stop it happening again?
You cannot stop strangers from submitting orders, forms and comments, and plugins will keep having bugs. You can limit what a script does when it lands in an administrator’s browser. Three changes cover most of it.
Keep fewer administrators
A script that fires in an administrator’s session has that person’s rights. Run check 1, then ask of each row whether that person needs to install plugins and create users. Most people who ask for admin need to edit content or manage orders, which Editor and Shop Manager can do. Remove standing accounts for freelancers who finished their work.
Do daily work from an account that cannot create administrators
Reading form entries, checking orders and moderating comments are the routine tasks that triggered the October 2026 campaign, and none of them requires the right to add users or plugins. Use a separate Editor or Shop Manager login for those jobs and keep the administrator login for updates and settings. Test it: sign in as the daily user and try to open Add New User and Add New Plugin. Both should refuse.
Switch off file changes from wp-admin where your workflow allows
The WordPress configuration documentation says setting DISALLOW_FILE_MODS blocks the plugin and theme installation and update screens in wp-admin and also disables the file editor. The campaign’s first move was a plugin upload through the standard installer, so this closes that route from inside wp-admin.
# checked on 15 Nov 2026
wp config set DISALLOW_FILE_MODS true --rawThe cost is real: you can no longer update from the dashboard, so updates must come from your deployment process or host tooling, and the documentation warns that plugins which expect the capability may misbehave. Test on staging first. It also does not stop a script that already holds an administrator session from creating a user, so pair it with the daily-account rule. Add checks 1 and 2 to a monthly routine, and keep backups off the server long enough to reach back before an infection you find late. For the unrelated question of how your usernames leak to attackers in the first place, see every way your site hands out usernames.
Is a security scanner worth using for this?
A scanner is a reasonable second pair of eyes and a poor replacement for check 1. WP Vanguard (wpvanguard.com) is a WordPress security scanner we build, so weigh this as one option from the people who made it. Its deep scan connects over SSH, runs WP-CLI steps and includes an admin audit, an mu-plugin check and an application-password check. The real cons, from reading its scanner code on 15 Nov 2026: the deep scan needs SSH access to the server, which many shared hosts do not give you; its admin audit lists administrators with wp user list --role=administrator, so a hider that filters WP_User_Query could hide the account from it too; some of its database queries assume the default wp_ prefix; and a scan is a snapshot, not a replacement for the monthly SQL check above. Whatever you choose, do not take a tool’s clean report on trust, in the same way our guide on testing what your host really protects argues you should not take a host’s word on security.
Common mistakes people report
These are recurring problems from WordPress.org forum threads and vendor write-ups, paraphrased, with the date of each source. The forum threads are old, which is itself telling: the same mistakes keep appearing. We checked every link on 15 Nov 2026.
- Deleting the account and assuming it is over. Users described an unknown administrator called “wordpress” that returned each time they deleted it (WordPress.org, January 2014) and many administrators that reappeared after deletion alongside spam pages (WordPress.org, October 2015). Sucuri traced a similar case to two lines in a theme file (March 2022). Find the code that creates it first.
- Trusting the Users screen or the WordPress-built list. Patchstack states that the hidden administrator cannot be found from the dashboard and tells readers to query the database directly (October 2026).
- Mistaking leftover meta for a hidden admin. One forum user saw the administrator count one higher than the list after deleting the first account, and the cause was orphaned
usermetarows for a user that no longer existed in the users table (WordPress.org, September 2013). That is why check 1 joins to the users table. To test for it, select thecapabilitiesrows whoseuser_idhas no matching row inusers. - Hunting only for recently changed files. Sucuri’s simple 2022 case was found with a modification-time search. Patchstack’s 2026 implant backdates its files to the oldest date it finds, so the same search comes back empty. Use the time search as a bonus, not a test.
- Removing the one thing you found. The October 2026 report lists four separate routes, and the 2025 Sucuri case includes a plugin that reinstates the infection if deleted. Remove everything on your list, then rotate credentials.
- Changing passwords and stopping. The 2025 malware Sucuri analysed resets the passwords of common admin usernames to an attacker-set default, which locks out the real owner. Rotate salts and sessions as well.
Questions people ask
Can a WordPress admin account be invisible in the dashboard?
Yes. A filter on the user query can remove it from the list and a second filter can fix the role count, as Patchstack describes for its October 2026 campaign. Query the users and usermeta tables and compare with the screen.
How do I list all administrators from the command line?
For a trustworthy list, use SQL through wp db query with the join in check 1. wp user list --role=administrator is the convenient version, but it goes through WP_User_Query and may not show a hidden account.
Which usermeta key holds the role, and does the prefix matter?
The key is your table prefix followed by capabilities, for example wp_capabilities on a default install. A site with a custom prefix or a multisite sub-site has a different key, which is why the queries here build it with $(wp db prefix).
Are mu-plugins always a sign of an attack?
No. Hosts and agencies use them for caching, monitoring and compatibility code. The handbook describes those uses. Investigate files you cannot explain, files with encoded blobs and files whose job overlaps with hiding users.
Is updating the vulnerable plugin enough?
It closes the entry point only. If an administrator could have opened an affected screen before the update, run the audit. Patchstack’s guidance is to treat such a site as potentially compromised. As of 15 Nov 2026 the WordPress.org plugin pages list Ninja Forms at 3.16.1 and WPC Product Bundles at 8.8.0, both newer than the fixed versions Patchstack names, and the latest WordPress release is 7.1.4.
Did the WordPress 7.1.3 release fix something related?
It fixed a stored XSS on the Comments administration page that could be exploited through pending comments, reported by Trail of Bits in collaboration with OpenAI, according to the 6 October 2026 release post. We did not find a public report tying that core fix to the hidden-admin campaign, so we make no such claim. It shows the same shape: data from a stranger displayed to an administrator.
How often should I audit for hidden administrators?
Monthly on every site you look after, using checks 1 and 2, and straight away after any plugin flaw of the stored-XSS type that touches a screen your administrators open. A scheduled check takes minutes once the commands are saved.
Should I audit application passwords too?
Yes. They survive a password change and work against the REST API, so one stray credential is a way back in that a salt rotation will not close. The SQL query above lists every account that has any.
Plugins we build and run
We maintain these ourselves, which is why we can support them on your site.
- BuddyNextThe self-hosted community engine for WordPress
- BuddyXFree community theme, Pro when you outgrow it
- ReignPremium community theme. Add pieces, build anything
- JetonomyCommunity forum and Q&A for WordPress
- EventonomyEvents and RSVPs for WordPress communities
- LearnomyCourses and learning communities on WordPress
- ListoraDirectories and listings your members can browse
- SnipShareCode sharing built for developer communities
- WB Ad ManagerAd placements that turn traffic into revenue
- WP Career BoardA job board your community actually uses
- WP Sell ServicesSell services with offers, orders, and payouts
- MediaVersePhotos, video, and media albums for members
- WB GamificationPoints, badges, and rewards that keep members active
- Product RoadmapPublic roadmaps with voting your users trust
Related Posts

LiteSpeed Cache Vulnerability CVE-2026-93389: Check Your Version and What Was Exposed

Freemius SDK Stored XSS: How to Find Every Bundled Copy on a Client Site (Anything Under 2.13.5)

