Skip to main content
CVE-2026-41940 Critical Patch Available

CVE-2026-41940: cPanel & WHM Authentication Bypass — Unauthenticated Control Panel Access

CVE Details

CVE ID CVE-2026-41940
CVSS Score 9.8
Severity Critical
Vendor WebPros
Product cPanel & WHM
Patch Status Available
Published May 21, 2026

Background

cPanel & WHM (WebHost Manager) is the dominant web hosting control panel platform, with an estimated 70 million domains hosted on servers running cPanel software. It is used by shared hosting providers, VPS providers, and self-managed web servers worldwide to manage web hosting accounts, DNS zones, email configuration, databases, SSL certificates, and server administration. WHM provides the server-administrator interface; cPanel provides the end-user hosting account interface.

Because of its ubiquitous deployment, CVE-2026-41940 has an extraordinarily wide attack surface. The vulnerability bypasses the authentication mechanism in the cPanel login flow, allowing any unauthenticated attacker to gain full access to any cPanel hosting account or the WHM administrator interface — the latter giving root-equivalent control over the entire server.

Technical Mechanism

The vulnerability lies in cPanel’s session management implementation within the login handling daemon (cpaneld). cPanel uses a challenge-response mechanism combined with a password hash verification step. The bypass exploits a logic flaw in the session token validation pathway.

When a login request is submitted, the authentication flow follows this sequence:

  1. Client submits username and password
  2. Server generates a session token and stores it temporarily
  3. Server validates the password hash against the stored credential
  4. On success, the session token is promoted to an authenticated state

The flaw exists in step 4. The session promotion check does not verify that the preceding hash validation step actually succeeded — it checks for the presence of a session token generated at step 2, not whether the validation step returned success. An attacker who initiates a login request (causing a session token to be generated) and then directly requests an authenticated endpoint in a concurrent request, before the validation completes, can pass the session token check and receive an authenticated session.

This is a classic time-of-check/time-of-use (TOCTOU) race condition in session state management. In practice, it doesn’t require precise timing — the window is wide enough (approximately 500ms on a loaded server) that a simple concurrent request with retry logic reliably exploits the flaw. Researchers have confirmed reliable exploitation within 2–10 attempts in typical environments.

The attack requires only an HTTP client capable of concurrent requests and knowledge of a valid username. Usernames on shared hosting servers are often enumerable or publicly known (they correspond to hosting account names visible in server headers or directory listings).

Real-World Exploitation Evidence

The exploitation scale for CVE-2026-41940 is exceptional. Within 96 hours of the public advisory, threat intelligence firms reported hundreds of thousands of automated exploitation attempts against internet-facing cPanel servers. The combination of critical severity, trivially reliable exploitation, and the enormous installed base makes this one of the most actively exploited vulnerabilities of 2026.

Documented post-exploitation activity:

  • Mass web shell deployment across all hosted domains on compromised servers (a single WHM compromise affecting hundreds of hosted sites)
  • Exfiltration of all database credentials stored in cPanel’s configuration (MySQL, PostgreSQL)
  • Hosting account credentials sent to attacker-controlled servers for credential stuffing operations
  • Malicious code injection into WordPress, Joomla, and other CMS installations across all hosted sites
  • DNS hijacking of hosted domains to redirect visitors to phishing pages
  • SSL certificate theft for fraudulent use or ransom demands

Web hosting providers with thousands of shared hosting customers on each server have experienced cascading impacts where a single server compromise resulted in all customers’ websites being defaced or used as phishing infrastructure.

Impact Assessment

The blast radius of WHM compromise is uniquely severe in the hosting context:

  • Multi-tenant impact: A single server may host hundreds or thousands of independent business websites. One exploit affects all of them.
  • Supply-chain vector: Compromised hosting accounts can inject malicious code into websites, making every visitor to those sites a downstream victim.
  • DNS control: cPanel/WHM manages DNS for hosted domains. Hijacking enables email redirects, certificate validation spoofing, and phishing campaigns using trusted domain names.
  • Email infrastructure: WHM manages mail server configuration; access enables mail relay setup for spam campaigns.

Self-managed servers running cPanel face the same risks, with the addition that WHM root access provides complete Linux server compromise beyond the cPanel functionality.

Affected Versions

ProductAffected VersionsFixed Version
cPanel & WHM118.x < 118.0.22118.0.22
cPanel & WHM116.x < 116.0.38116.0.38
cPanel & WHM114.x < 114.0.49114.0.49
cPanel & WHMLTS 106.x < 106.0.52106.0.52

cPanel releases patches for supported LTS and CURRENT release tracks. Servers running end-of-life versions must be upgraded to a supported track before applying patches.

Remediation Steps

  1. Apply patches immediately: cPanel’s automatic update system (/scripts/upcp) should handle this automatically on servers with auto-updates enabled. Verify the installed version via cat /usr/local/cpanel/version. If auto-updates are disabled, run /scripts/upcp --force or apply the update manually.

  2. Restrict WHM and cPanel access: Implement IP-based restrictions for the WHM interface (TCP/2087) and cPanel interface (TCP/2083) to trusted IP ranges using cPanel’s Host Access Control or external firewall rules. Never expose WHM to the internet without IP restrictions.

  3. Enable two-factor authentication: cPanel supports TOTP-based 2FA. Enable it for all WHM administrator accounts and encourage cPanel account holders to enable it as well.

  4. Audit existing sessions: After patching, invalidate all existing sessions via WHM > Session Management to ensure no attacker maintains access via a pre-exploit session.

  5. Scan for web shells: Run a web shell scanner (e.g., maldet, ClamAV, or WHM’s built-in Imunify360 if licensed) across all hosted website docroots.

  6. Review DNS configurations: Audit DNS records for all hosted domains for unexpected modifications, particularly MX records, A records pointing to non-customer IPs, and TXT records that shouldn’t be present.

Detection Guidance

Key indicators in cPanel/WHM logs (/usr/local/cpanel/logs/):

  • Sessions authenticated without a preceding successful password validation entry
  • Rapid authentication attempts followed immediately by authenticated API calls
  • Access log entries showing authenticated API calls from IPs with no prior login in session logs
  • WHM actions (account creation, DNS modification, service restart) from IP ranges outside normal admin access patterns

cPanel’s built-in security advisor (WHM > Security Advisor) will flag missing patches; use it as a baseline check.

Timeline

DateEvent
2026-04-22WebPros internal security discovery
2026-05-05cPanel patches released across all supported LTS/CURRENT tracks
2026-05-07Security advisory published
2026-05-09Mass exploitation begins; scanning tools targeting cPanel servers
2026-05-11CISA adds to KEV catalogue with urgent remediation guidance
2026-05-21This analysis published