cPanel & WHM - Authentication Bypass (CVE-2026-41940)
Description
cPanel and WHM contain an authentication bypass vulnerability in the login flow caused by CRLF injection in session file handling. The cpsrvd daemon writes session files to disk before authentication occurs, and an attacker can manipulate the whostmgrsession cookie and inject crafted lines via a malicious Basic Authorization header. The system writes the session file without sanitizing the data, allowing the attacker to insert arbitrary session properties such as user=root, achieving full administrative access without credentials.
psychologyCrowdSec Analysis
CVE-2026-41940 is a critical authentication bypass vulnerability in cPanel & WHM affecting all supported versions prior to the April 28, 2026 patch. The flaw stems from a CRLF injection in the session file handling of the cpsrvd daemon, allowing unauthenticated remote attackers to inject arbitrary session properties — including root-level privileges and 2FA bypass flags — into pre-authentication session files. Successful exploitation grants full administrative control over WHM, enabling attackers to manage all hosted websites, databases, email accounts, SSL certificates, and server configurations without any credentials.
CrowdSec has been tracking this vulnerability and its exploits since 30th of April 2026.
According to CrowdSec data, while opportunistic exploitation dominates, a portion of threat actors trying to exploit CVE-2026-41940 apply basic targeting methods such as port or service detection. This indicates emerging patterns of selective targeting. CrowdSec data also reveals a clear uptick in attacks involving CVE-2026-41940 over the past week. Activity is above the usual baseline, suggesting growing attention from attackers. This may reflect rising awareness, recent exploit releases, or expanded targeting efforts.
Attackers exploit the /login/?login_only=1 endpoint by sending a failed login POST to obtain a pre-authentication session cookie, then submit a follow-up request with a crafted Authorization: Basic header containing CRLF-injected session directives (user=root, hasroot=1, tfa_verified=1) to promote the session to fully authenticated root access on WHM port 2087.
Full Intelligence Available
Connect your API key to access CrowdSec scores, exploit timelines, and attacker IPs.
| Event | Date |
|---|---|
| CVE Published | 2026-04-29 |
| Rule Released | 2026-04-30 |
| CISA KEV | 2026-04-30 |
| CISA Remediation Deadline | 2026-05-03 |
| CrowdSec First Seen | 2026-05-04 |
Related Weaknesses
The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.
The product does not perform any authentication for functionality that requires a provable user identity or consumes a significant amount of resources.
Remediation & Protection
External References
- https://support.cpanel.net/hc/en-us/articles/40073787579671-cPanel-WHM-Security-Update-04-28-2026
- https://labs.watchtowr.com/the-internet-is-falling-down-falling-down-falling-down-cpanel-whm-authentication-bypass-cve-2026-41940/
- https://github.com/watchtowrlabs/watchTowr-vs-cPanel-WHM-AuthBypass-to-RCE.py
- https://hadrian.io/blog/cve-2026-41940-a-critical-authentication-bypass-in-cpanel
- https://nvd.nist.gov/vuln/detail/CVE-2026-41940
- https://www.rapid7.com/blog/post/etr-cve-2026-41940-cpanel-whm-authentication-bypass/
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2026/CVE-2026-41940.yaml