CVE-2026-41940 | CVSS Score: 9.8 / 10.0 | Status: Patched. Update Immediately.
What Is cPanel and Why Does It Matter
cPanel is one of the most widely deployed web hosting control panels on the internet. It gives website owners a graphical interface to manage files, databases, email accounts and domain settings. Its companion software, WHM (WebHost Manager), operates at the server level and provides root-level administrative control over everything hosted beneath it.
Together these two tools power an estimated 70 million domains worldwide. That scale is precisely what makes a vulnerability in cPanel far more dangerous than a breach of a single website. When cPanel falls, everything it manages falls with it.
What Happened: The Full Story
Discovery and Disclosure
In late April 2026, security researchers and hosting providers began raising alarms about a critical flaw in cPanel and WHM. The vulnerability was officially tracked as CVE-2026-41940 and assigned a CVSS severity score of 9.8 out of 10.0, placing it in the most dangerous tier of security vulnerabilities.
What made this discovery especially alarming was the timeline. Hosting provider KnownHost confirmed that exploitation attempts had been observed in the wild as far back as February 23, 2026. That is more than two months before the public disclosure. Attackers were silently exploiting the flaw as a zero-day long before any patch existed or any warning was issued.
The Scale of Exposure
Security scans revealed approximately 1.5 to 2 million cPanel instances exposed directly to the internet at the time of disclosure. The vulnerability affected every supported version of cPanel and WHM prior to the patch. No server running the software was safe until it was updated.
How the Attack Works: Technical Breakdown
The vulnerability is rooted in a CRLF injection flaw. This is a class of attack where an application fails to properly sanitize user-supplied input containing carriage return and line feed characters (\r\n). Here is how attackers exploited it step by step.
Step 1: The Failed Login Trick
When a user submits incorrect login credentials to cPanel’s daemon (called cpsrvd), the system responds with a 401 Access Denied message. However, it also writes a pre-authentication session file to the disk and issues a session cookie to the browser.
An attacker deliberately triggers this failed login to obtain a valid session name they can manipulate.
Step 2: Session File Injection
By sending a specially crafted HTTP request with a malicious Authorization header, the attacker injects CRLF characters into the session file on disk. This allows them to write arbitrary parameters into the session, including a flag that signals successful authentication.
The vulnerable function check_authok_user checks for the presence of a field called successful_internal_auth_with_timestamp. If that field exists in the session, the password check is skipped entirely and the system returns AUTH_OK unconditionally. The actual password stored in /etc/shadow is never consulted.
Step 3: Root Access Granted
With the bypass in place, the attacker logs into cPanel or WHM as root using only their session cookie, without ever knowing the real password. In vulnerable versions, attackers could strip a specific hex value to prevent encryption from running so plaintext commands passed through as legitimate trusted instructions.
What an Attacker Can Do With Root Access
- Access every hosted customer account on a shared server
- Modify or delete files, databases and configurations
- Install malware or backdoors that persist after reboots
- Steal credentials stored in email accounts and databases
- Move laterally across networks connected to the compromised server
- Disrupt or destroy all websites managed by the affected cPanel installation
As Rapid7 noted: successful exploitation grants an attacker control over the host system, its configurations and databases, and every website it manages. This is not a breach of one site. It is a breach of an entire infrastructure.
Industry Response
Namecheap immediately blocked inbound traffic on ports 2083 and 2087 (the standard cPanel and WHM ports), cutting off customer access while patches were deployed. As of April 29, 2026, patches had been applied across all affected servers.
HostGator classified the flaw as a critical authentication-bypass exploit and moved quickly to patch its systems.
KnownHost confirmed that roughly 30 of its servers showed signs of unauthorized access attempts out of thousands in its network.
cPanel released an emergency detection script and pushed patches across all supported release tracks.
How to Protect Your Website and Server
1. Update cPanel and WHM Immediately
This is the single most important action. Run the following command on your server to force an update:
/scripts/upcp --force
The patched versions across all supported tracks are listed below:
| Track | Patched Version |
|---|---|
| 11.86 | 11.86.0.41 |
| 11.110 | 11.110.0.97 |
| 11.118 | 11.118.0.63 |
| 11.126 | 11.126.0.54 |
| 11.130 | 11.130.0.19 |
| 11.132 | 11.132.0.29 |
| 11.134 | 11.134.0.20 |
| 11.136 | 11.136.0.5 |
If your server runs an unsupported version, treat it as compromised until you can migrate to a supported and patched version.
2. Run the Detection Script
cPanel published an official detection script to check for indicators of compromise. Look for sessions that simultaneously contain token_denied and cp_security_token with a method=badpass origin. WatchTowr also released its own Detection Artifact Generator for administrators who want a second opinion.
3. Restrict Access to cPanel Ports
Block the following ports at the firewall level and whitelist only trusted IP addresses:
- Port 2083 (cPanel HTTPS)
- Port 2087 (WHM HTTPS)
- Port 2095 (Webmail HTTPS)
- Port 2096 (Webmail HTTPS alternate)
This does not replace patching but it dramatically reduces your attack surface while a patch is being applied.
4. Enable Two-Factor Authentication
Enable 2FA on all cPanel and WHM accounts. Additional authentication layers increase the effort required for a full takeover even when a session-level bypass exists.
5. Audit Your Logs for Suspicious Activity
Review authentication logs for failed login attempts followed immediately by successful sessions from the same IP. Pay close attention to activity between late February and late April 2026, the known exploitation window.
6. Review All Root-Level Accounts
After patching, audit all administrator and root-level accounts in WHM. Remove any accounts not explicitly created by your team. Change all passwords and rotate all API tokens.
7. Keep Auto-Updates Enabled
Servers with auto-updates enabled received the patch immediately upon release. Servers requiring manual intervention remained exposed far longer. Do not turn off automatic updates.
8. Contact Your Hosting Provider
If you are on shared hosting, contact your provider and ask for written confirmation that the patch has been applied to your server. Most major providers including Namecheap, HostGator, InMotion and HostPapa had already patched by the time of public disclosure. Verification never hurts.
The Bigger Lesson
This incident is a clear reminder that shared infrastructure creates shared risk. A single vulnerability in a control panel that manages millions of domains does not affect one website. It threatens the foundation that hundreds or thousands of websites sit on.
The cPanel hack also illustrates the danger of zero-day exploitation periods. By the time a vulnerability is disclosed publicly, attackers may have already been quietly using it for weeks or months. Silent exploitation began in February while the rest of the internet had no warning until April.
Regular updates, access restrictions, monitoring and layered defenses are not optional security hygiene. They are the difference between an incident and a catastrophe.
Last updated: May 1, 2026. Sources: cPanel official advisory, TechCrunch, SecurityWeek, The Hacker News, The Register, WatchTowr Labs and Bleeping Computer.
