Join our Newsletter — 33% off our NHI Course
Home› Guides› Hosting control panels security: hardening cPanel, Plesk and…
Guide Application Security

Hosting control panels security: hardening cPanel, Plesk and DirectAdmin access

← All guides
By NHI Mgmt Group, edited by Lalit Choda Updated 2 November 2026 17 min read
On this page

A hosting control panel holds the keys to every site, mailbox, database and DNS zone on a server, so one stolen panel credential or one unpatched panel flaw can become a compromise of hundreds of customers at once. Panels such as cPanel and WHM, Plesk and DirectAdmin are built for delegation: server administrators, resellers and end customers all log in, and scripts and integrations call the panel's API with long-lived tokens. That makes them identity systems as much as hosting tools. This guide covers the panel account model, admin and reseller credentials, API tokens and login keys, two-factor authentication, network restriction, isolation between tenants, panel vulnerabilities in the CISA Known Exploited Vulnerabilities catalogue, and the logs that show misuse. It is for hosting providers, agencies and in-house teams running their own panel servers. Product facts come from each vendor's documentation, checked on 2 November 2026; menus and defaults change between versions, so confirm against your installed version.

Key takeaways

  • Treat panel tokens as root credentials. A WHM API token with the "Everything" privilege is full root-level access, cPanel tokens default to one year and can be set never to expire, and expired tokens stay until someone deletes them.
  • Restrict every privileged path by network. WHM tokens accept up to 100 allowed IP ranges, Plesk can limit Administrator logins and its API to listed addresses, and DirectAdmin login keys take an allowed IP list. Unrestricted is the default in each case.
  • Two-factor is per user, not per server. In cPanel the root user turns on the policy, but each cPanel user must set it up; WHM cannot enable it for them. Measure enrolment, do not assume it.
  • Panel flaws are exploited, often with ransomware. KEV lists a 2026 cPanel and WHM authentication bypass with known ransomware use, an actively exploited LiteSpeed cPanel plugin flaw, and command injection in CWP, CyberPanel and Webmin.
  • Isolation decides the blast radius. A per-site PHP pool, per-user file system isolation and no shared database or SSH credentials turn one compromised customer site into one incident instead of a server-wide one.

The panel account model and why it is an identity problem

Every major panel has the same three tiers, plus machine access through an API. The names differ, the risks do not.

TiercPanel and WHMPleskDirectAdminWhat compromise gives an attacker
Server administratorWHM root (port 2087)Plesk Administrator and additional administrator accountsAdmin level (port 2222)The whole server: every account, every file, mail and DNS
ResellerWHM reseller with a privilege set chosen by the providerReseller accountReseller levelAll customer accounts owned by that reseller; often account creation
End customercPanel account (port 2083)Customer or subscription userUser levelThat account's sites, databases, mailboxes and files
Machine accessWHM and cPanel API tokensPlesk XML API and REST APILogin keys (CMD_LOGIN_KEYS)Whatever the token's privileges and command list allow, usually without two-factor

The machine tier is the one most often forgotten. Tokens live in billing systems, DNS clusters, migration tools, agency deployment scripts and monitoring, they rarely expire, and they bypass interactive controls: cPanel's documentation notes that public key and API token authentication still work during a cPHulk brute force lockout, and DirectAdmin notes that disabling API access with the login password does not affect login keys and session keys. The general principles for privileged identities are in the Admin panels and super admin accounts guide; this page applies them to hosting panels.

Admin and reseller credentials

  • Named administrators, not shared root: give each person their own administrator or reseller login where the panel allows it, keep the true root or primary admin as a vaulted break-glass account, and log who used it. See the Break-Glass Account Guide.
  • Reseller privileges are a scope decision: in WHM the provider chooses each reseller's privileges, and some interfaces appear only when specific privileges are granted (for example, resellers see API Tokens only if all Initial Privileges are enabled). Grant the minimum set, and review it when a reseller's business changes.
  • Delegated admin is not a sandbox: DirectAdmin's own documentation warns that a delegated admin with a restricted command set "is not fool-proof", because overlapping commands may still allow changes to admin accounts. Treat any admin-level account as full admin.
  • Provisioning systems hold everyone's credentials: in the GoDaddy Managed WordPress Breach 2021, one compromised password reached the provisioning system and exposed admin, sFTP and database credentials, with sFTP passwords reportedly stored in retrievable form. Do not keep retrievable customer passwords in panel-adjacent tooling.
  • Offboarding: when staff, agencies or resellers leave, remove their logins and revoke every token they created, not only their password. See the NHI Offboarding and Decommissioning Guide.

API tokens and login keys

Panel API credentials are non-human identities with administrative reach. The controls each vendor documents are below; use all of them.

ControlWHM and cPanel API tokensPlesk APIDirectAdmin login keys
ScopeAt least one ACL privilege per token, limited to privileges the creator holds; cPanel marks ACL assignment as experimentalAPI access is server-wide; the documentation warns an attacker could use it to gain control of the serverAllowlist of CMD_API_ commands; avoid ALL_USER, CMD_LOGIN_KEYS and CMD_API_LOGIN_KEYS
High-risk permissions"Everything" (root-level), Change Password, Create User Session and Manage API Tokens; the last two can bypass the token's restrictionsNot applicableKey management commands, which let a key mint new keys
ExpiryDefault one year from creation, or never; expired tokens must be deleted manuallyNot documented on the page readExpiry date, request count limit and auto-delete when either is reached
Network restrictionIPs field, up to 100 addresses or CIDR ranges; blank means any address[api] section of panel.ini: enabled = off, or allowedIPs for trusted addressesAllowed IPs list per key
Secret handlingToken shown once at creationStore integration secrets in a vaultCurrent password required to create a key
RevocationPer token or Revoke All; deleting an account revokes its tokens; renaming does notDisable the API or remove the addressDelete the key or use Clear Key

Token rules that work across panels

  1. Inventory first. List every token and key on every server, who created it, what calls it, its privileges, IP restriction and expiry. In WHM the token list shows expiring tokens in yellow and expired ones in red.
  2. One token per integration. A billing system, a DNS cluster and a backup tool each get their own, so revocation does not break unrelated jobs. DirectAdmin's documented DNS cluster example limits the key to three DNS and login test commands and the master server's IP.
  3. Never "Everything" for automation. Pick the specific privileges the integration needs, and never grant token management or session creation to a token that does not need them.
  4. Bind to source addresses. Always fill the IP list. A token with no restriction can be used from anywhere it leaks to.
  5. Expire and rotate. Set expiry of a year or less, rotate on staff or supplier change, and delete expired tokens rather than leaving them for audit noise.
  6. Keep tokens off web servers. A token stored in a site's deployment script on the same server is readable by anyone who gets code execution there, which is how a single site compromise becomes a panel compromise. The PHP2Shell guide lists panel tokens among the secrets a PHP worker exposes. See also the API Key Management Guide.

Two-factor authentication and brute force protection

PanelTwo-factorBrute force protectionNotes from vendor docs
cPanel and WHMTOTP six-digit codes; root enables the Two-Factor Authentication Security Policy, then each user sets it up; root and resellers with create-acct enrol in WHM, cPanel users in cPanelcPHulk covers cPanel (2083), WHM (2087), Dovecot, Exim, Pure-FTPd and SSH; default account lock at 15 failures in 5 minutes; allow and deny lists, country rulesRoot is not locked by default; token and key logins bypass lockout; 2FA may break some third-party applications; admins can disable a user's 2FA from Manage Users
PleskNot covered by the vendor pages read; confirm the two-factor options in your Plesk version's documentationIP Access Restriction Management for Administrator logins: allow-all-except-list or deny-all-except-listThe IP restriction applies only to Administrator accounts, not customers
DirectAdminTwo-step authentication (TOTP) with one-use scratch codes; twostep_auth=1 by default in directadmin.conf; trusted device cookie lasts twostep_auth_trust_days=30Built-in IP blacklisting after repeated failures on port 2222; Brute Force Monitor parses Apache, Dovecot, Exim, ProFTPd and SSHd logs and blocks through CSFFailed 2FA attempts count toward the same failed login limit; notify_on_all_twostep_auth_failures=yes in user.conf alerts the user
  • Enforce for every privileged login: 2FA for root, all administrators and all resellers first, then customers. Track enrolment per tier, because the panels let users opt in rather than forcing them.
  • Protect the recovery path: an administrator who can disable a user's 2FA is part of the trust chain, so log and review every 2FA reset (cPanel records 2FA setting changes in /var/cpanel/accounting.log). See the MFA backup codes and recovery codes guide.
  • Allowlist your own addresses before deny-by-default: cPHulk and Plesk's deny-all policy can lock administrators out; cPanel's documentation advises adding your own IP to the allow list.
  • Use TLS on panel ports: DirectAdmin's documentation recommends securing port 2222 with a certificate; the same applies to every panel login.

The MFA Guide covers method choice beyond TOTP.

Network exposure

Panel ports exposed to the whole internet are the main reason panel vulnerabilities turn into mass exploitation. Decide per tier:

  • Administrator and WHM access: reachable only from a VPN, bastion or fixed office addresses. Use Plesk IP Access Restriction Management, cPHulk allow lists with deny-by-country where appropriate, or a host firewall.
  • Panel APIs: in Plesk, set enabled = off in the [api] section of panel.ini if nothing uses the API, otherwise list trusted addresses in allowedIPs. In WHM and DirectAdmin, rely on per-token and per-key IP lists.
  • Customer panels: usually must stay public for shared hosting customers. Compensate with 2FA, brute force protection and fast patching.
  • Webmail, FTP and SSH on the same host: include them in brute force protection (cPHulk and DirectAdmin's monitor both cover mail and SSH), and prefer SFTP with keys over FTP passwords.

Multi-tenant isolation

On shared hosting, the panel is also the tenant boundary. The worst incidents happen when one compromised site can read another's files or credentials.

LayerWeak configurationStronger configurationSource
PHP handlermod_php, ISAPI or CGI, which Plesk calls "severely outdated and/or insecure"; one shared FPM pool per PHP versionDedicated FPM pool per site, which Plesk recommends for shared hostingPlesk PHP handlers documentation
File system viewUsers can list other accounts, server configs and processesPer-user virtualised file system such as CloudLinux CageFS, where users cannot see other users, their processes or server configuration files (CageFS does not support mod_php and is off by default)CloudLinux documentation
CredentialsOne database password or SSH key used across several customer sitesPer-site database users and SSH keys; no private keys stored in hosting accountsSOCRadar's 2026 extortion case found both reuse patterns enabling movement between accounts on one host
Panel pluginsThird-party plugins running privileged helpers for every userMinimal plugins, patched on the vendor's advisory, removed if unusedKEV entries for the LiteSpeed cPanel plugin

The KEV entries show why isolation is not optional: CVE-2026-48172 let any cPanel user run scripts as root through the LiteSpeed user-end plugin, according to LiteSpeed, which reported active exploitation; CVE-2026-54420, another LiteSpeed cPanel plugin flaw, is described by CISA as a symlink-following issue usable by a user with FTP or web shell access on a CloudLinux CageFS server. In both cases the attacker starts as an ordinary tenant. A compromised customer site is therefore a server-level threat until the panel is patched. The Multi-Tenant SaaS Architecture Security Guide covers tenant isolation thinking more broadly.

Panel vulnerabilities in the CISA KEV catalogue

From the KEV catalogue (version 2026.10.30). Use KEV status to set patch priority for panel servers ahead of ordinary updates. See the CISA KEV Catalogue Guide.

CVEProductWeakness (KEV description)Added to KEVKnown ransomware use
CVE-2026-41940cPanel & WHM and WP2 (WordPress Squared)Authentication bypass in the login flow giving unauthenticated access to the control panel30 Apr 2026Known
CVE-2026-48172LiteSpeed cPanel PluginPrivilege escalation: any cPanel user can run scripts as root26 May 2026Unknown
CVE-2026-54420LiteSpeed cPanel PluginSymlink following by a user with FTP or web shell access on CloudLinux/CageFS15 Jun 2026Unknown
CVE-2025-48703CWP Control Web PanelUnauthenticated OS command injection in a file manager request (a valid non-root username must be known)4 Nov 2025Unknown
CVE-2024-51567CyberPanelIncorrect default permissions allowing remote unauthenticated command execution as root7 Nov 2024Known
CVE-2024-51378CyberPanelIncorrect default permissions allowing authentication bypass and command execution4 Dec 2024Known
CVE-2022-44877CWP Control Web PanelOS command injection in the login parameter17 Jan 2023Unknown
CVE-2019-15107WebminCommand injection in password_change.cgi25 Mar 2022Known

Two patterns stand out. Pre-authentication flaws in the login path (cPanel, CWP, CyberPanel, Webmin) make network restriction of admin ports the most effective compensating control. Plugin and helper flaws (LiteSpeed) mean the plugin inventory is part of the panel's attack surface, not an add-on. Panels also bundle PHP builds for customer sites, so runtime flaws such as PHP2Shell need the panel vendor's rebuild; see Unsupported PHP versions.

Hardening rollout

  1. Inventory. List panel servers, versions, update tier, installed plugins, administrators, resellers and every API token or login key. This is also the baseline for later reviews.
  2. Patch and turn on automatic panel updates on a channel you can support, and subscribe to each vendor's security announcements and the KEV feed.
  3. Restrict admin and API access by network. Pilot on one server: add your management addresses to the allow list first, test login from inside and outside, then apply deny-by-default. Roll back by removing the policy from the console or configuration file if you lock yourself out, which is why the console route must be tested first.
  4. Enforce 2FA for root, administrators and resellers. Warn affected third-party integrations first, since cPanel notes 2FA can break some of them, and move those integrations to scoped tokens.
  5. Rebuild token estate. Replace broad or non-expiring tokens with one scoped, IP-bound, expiring token per integration; revoke the old ones; confirm each integration still works.
  6. Isolate tenants. Move sites to per-site FPM pools, enable file system isolation where available, and split shared database and SSH credentials.
  7. Forward logs and set alerts (next section), then review quarterly.

Small providers or agencies with one or two servers can do all of this in a week; the biggest gain is network restriction plus 2FA. Large providers should automate token inventory and enrolment reporting across the fleet. The Cybersecurity for MSPs and MSSPs Guide covers the supplier side.

Logs, detection and measurement

LogWhat it recordsAlert onATT&CK v20
cPanel /usr/local/cpanel/logs/login_logLogin attempts to cpsrvd with failure reasonsBursts of failures, successful root or reseller logins from new addressesT1110 Brute Force; T1110.004 Credential Stuffing
cPanel /usr/local/cpanel/logs/access_log and session_logAccount access with authentication method and port; session creationSessions created by tokens or for users who did not log in themselvesT1078 Valid Accounts
cPanel /usr/local/cpanel/logs/api_tokens_logWHM API token use: user, token name, request, statusToken use from new addresses, unusual functions, use of tokens believed retiredT1550.001 Application Access Token
cPanel /var/cpanel/accounting.logAccount create, suspend, delete, reseller ownership, API token and 2FA changesNew accounts or tokens outside change windows; 2FA disabled for privileged usersT1136 Create Account; T1098 Account Manipulation
cPHulk logs and reports; DirectAdmin failed_logins and Brute Force MonitorBlocked users and IPs across panel, mail, FTP and SSHDistributed failures against admin accountsT1110
Web server and plugin logsRequests to panel and plugin endpointsRequests matching vendor-published checks for exploited plugin functionsT1190; T1068 Exploitation for Privilege Escalation
File integrity on customer web rootsNew PHP files after panel or site compromiseWeb shells appearing across many accounts at onceT1505.003 Web Shell

cPanel's api_log for user-level API calls is off until enabled in Tweak Settings; turn it on for servers with active integrations. Forward all of these to a SIEM so they survive a server compromise. See the SIEM Guide.

Metrics:

  • Percentage of administrator and reseller accounts with 2FA enrolled (target 100 percent).
  • Percentage of API tokens and login keys with an IP restriction and an expiry date.
  • Number of tokens with "Everything", Manage API Tokens or key management rights.
  • Days from a panel or plugin KEV entry to all panel servers patched.
  • Number of panel servers whose admin port is reachable from the whole internet.
  • Percentage of sites on dedicated PHP pools with file system isolation.

Common failure patterns

  • One root token for all automation. Billing, DNS and migration scripts share a non-expiring "Everything" token stored on several servers. One leak gives full control of every server it works on.
  • Admin port open to the internet. Pre-authentication flaws such as CVE-2026-41940 are then exploitable from anywhere the moment details leak.
  • 2FA "enabled" at server level only. The policy is on but most resellers and customers never enrolled, and nobody measures it.
  • Forgotten plugins. A web server or caching plugin installed years ago runs a privileged helper every tenant can reach, as in the LiteSpeed cPanel plugin cases.
  • Shared credentials between customer sites. An agency reuses one database password and stores an SSH key in a hosting account; one site's compromise opens the rest.
  • Panel-adjacent tools holding plaintext secrets. Provisioning and support tooling that can show customer passwords becomes the single target, as in the GoDaddy case.

Framework mapping

FrameworkReferenceWhere it applies
NIST SP 800-53 Rev. 5AC-2 Account Management; AC-6 Least Privilege; IA-2 Identification and Authentication; IA-5 Authenticator Management; AC-7 Unsuccessful Logon AttemptsAdmin and reseller accounts, token scope and expiry, 2FA, brute force protection
NIST SP 800-53 Rev. 5AC-17 Remote Access; SC-39 Process Isolation; SI-2 Flaw Remediation; AU-6 Audit Record ReviewPanel network exposure, tenant isolation, patching, log review
NIST CSF 2.0PR.AA-01; PR.AA-03; PR.AA-05; PR.IR-01; DE.CM-03Managing human and machine panel identities, authentication, least privilege, network protection, monitoring activity
MITRE ATT&CK v20T1190; T1110; T1110.004; T1078; T1550.001; T1528; T1098; T1136; T1068; T1505.003Exploitation, credential attacks, token misuse, persistence and privilege escalation on panel servers
CISA KEVCVE-2026-41940; CVE-2026-48172; CVE-2026-54420; CVE-2025-48703; CVE-2024-51567; CVE-2024-51378; CVE-2022-44877; CVE-2019-15107Patch priority for panel software and plugins

Practitioner checklist

  • Inventory panel servers, versions, plugins, administrators, resellers, tokens and login keys.
  • Patch panels and plugins on KEV entries within days, and enable automatic panel updates.
  • Restrict administrator logins and panel APIs to management addresses, after allowlisting your own.
  • Enforce and measure 2FA for root, administrators and resellers; log every 2FA reset.
  • Replace broad tokens with one scoped, IP-bound, expiring token per integration; delete expired tokens.
  • Never store panel tokens or keys on customer web servers.
  • Run each site in its own PHP pool with file system isolation; remove mod_php and CGI handlers.
  • Split shared database and SSH credentials between customer sites.
  • Forward login, session, token and accounting logs to a SIEM and alert on new tokens and accounts.
  • Remove unused panel plugins and review reseller privileges quarterly.

Standards and references

Related NHI Mgmt Group resources: Admin panels and super admin accounts · API Key Management Guide · PHP2Shell · CISA KEV Catalogue Guide · Privileged Access Management Guide

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Researched and written by the NHI Mgmt Group editorial team using AI tools, under the editorial direction of Lalit Choda. Facts are drawn from the sources listed on this page and checked by our automated quality process. Last updated 2 November 2026. Spotted an error? Use our contact page.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM and Agentic AI security. nhimg.org