cPanel & WHM authentication bypass lets attackers gain root without password
CVE-2026-41940 enables unauthenticated remote attackers to bypass authentication and obtain root access on any cPanel/WHM server.
Security & privacy watchTowr Labs 29 Apr 2026 Disclosure Real-world evidence
Published as “The Internet Is Falling Down, Falling Down, Falling Down (cPanel & WHM Authentication Bypass CVE-2026-41940)”
Why it matters
Attackers can obtain root access to cPanel/WHM servers, compromising millions of hosted websites.
Summary
The researchers reverse-engineered the session handling code in cPanel/WHM and found that when the per-session secret (<ob>) is missing, the password field is written to disk without encoding, allowing CRLF injection. By crafting a Basic auth request with a malicious password and a cookie lacking the <ob> segment, they inject arbitrary key/value pairs into the raw session file. They then trigger a code path that reads the raw file and rewrites the JSON cache, promoting the injected keys to top-level entries, which bypasses password verification and grants root access. The writeup includes a detection artifact generator for finding vulnerable hosts.
What they found 2
- Missing <ob> allows the password to be stored unencoded, enabling CRLF injection.
“if $ob is empty (no comma, or nothing after the comma), $encoder is '' (falsy), encoding never happens, and pass is written unencoded to the on-disk session file.”
- Injected session fields become top-level entries in the JSON cache after Modify::save, bypassing authentication.
“The injection is now top-level in the cache JSON.”
Caveats 1
- HTTP/1.1 403 Forbidden Access denied
What’s new here 4
- Identified an authentication bypass in cPanel/WHM session handling (CVE-2026-41940).
- Demonstrated exploitation via CRLF injection when the session secret is omitted.
- Showed how to promote injected keys into the JSON cache using the Modify::new/save path.
- Released a detection artifact generator for scanning vulnerable installations.
In the news
- —GitHub Actions workflow abuse campaign harvests credentials and exploits cPanel/WHM via CVE-2026-41940 CVE-2026-41940
- —Threat actors abuse GitHub Actions to scan and exploit cPanel/WHM servers via malicious Packagist packages CVE-2026-41940
- —Mr_Rot13 Exploits CVE-2026-41940 for Backdoor Deployment in cPanel Systems CVE-2026-41940