CVE-2026-41940: cPanel & WHM Authentication Bypass — What WordPress Agencies Need to Do

Critical cPanel auth-bypass (CVSS 9.8) actively exploited since February. Affected versions, patches, mitigations, and IoC checks for WordPress sites.

Dobromir Dechev
Dobromir WordPress agency owner

Quick answer

CVE-2026-41940 is a CRLF-injection authentication bypass in cPanel & WHM (CVSS 9.8) that lets unauthenticated attackers gain root-level access to the panel and every WordPress site it hosts. Patches landed 2026-04-28; CISA-mandated federal deadline is 2026-05-21. Block ports 2083/2087/2095/2096 if you cannot patch immediately, then run cPanel's IoC script.

If you manage WordPress sites on cPanel or WHM — directly, through a reseller, or on the WP Squared panel — stop reading and check your patch level. CVE-2026-41940 is a CVSS 9.8 authentication bypass that lets an unauthenticated attacker take over the entire panel, and through it every site, database, and backup it manages. CISA added it to the Known Exploited Vulnerabilities catalog with a federal patch deadline of May 21, 2026, and there is credible evidence of in-the-wild exploitation going back to February 23.

This is not a WordPress plugin vulnerability. No security plugin you can install protects against it. The fix is at the host level.

TL;DR

  • What: CRLF-injection authentication bypass in cpsrvd, the cPanel/WHM service daemon.
  • Score: CVSS 9.8 (critical), unauthenticated, network-reachable, no user interaction.
  • Who is affected: All cPanel & WHM versions after 11.40, plus WP Squared. Roughly 1.5M cPanel instances are exposed to the internet per Shodan.
  • What attackers get: Root-equivalent control of the panel, and therefore every WordPress site, MySQL database, and email account on the server.
  • Patches: Released 2026-04-28 across seven supported branches.
  • Do today: Patch via upcp --force. If you cannot patch in the next hour, block ports 2083, 2087, 2095, 2096 at the firewall and stop cpsrvd and cpdavd. Then run cPanel's IoC scanner.

What CVE-2026-41940 actually is

cpsrvd is the daemon that handles every authenticated request to cPanel, WHM, and Webmail on ports 2083, 2087, 2095, and 2096. The bug is in how cpsrvd writes session files: it writes a new session file to disk before authentication completes.

The exploit chain, as documented by WatchTowr researchers and Rapid7's Ryan Emmons:

  1. The attacker sends a request with a crafted Authorization: Basic header containing raw \r\n (CRLF) characters.
  2. cpsrvd parses the header naively and writes the decoded contents into a session file on disk before any authentication check.
  3. The injected newlines let the attacker append arbitrary key/value pairs to that session file — including user=root.
  4. The attacker then sends a follow-up request with a whostmgrsession cookie that omits expected segments, bypassing the encryption check entirely. The server loads the forged session file and treats the request as authenticated as root.

End result: a single anonymous HTTP request, then a single cookie, and the attacker is logged in as root with full WHM. The disclosure timeline is murky — researchers reported the bug to cPanel around April 14, but in-the-wild exploitation traces go back at least to February 23. The patch shipped April 28.

Why this hits WordPress agencies harder than the average CVE

Most WordPress security incidents come through the application layer: a vulnerable plugin, a leaked admin password, an unpatched WordPress core. The defences for that are well-understood — see our WordPress security hardening checklist and our security plugin comparison.

CVE-2026-41940 is none of those things. It compromises the host control panel. That means:

  • Wordfence, Solid Security, WP Cerber — none of them help. They run inside WordPress. The attacker is one layer below WordPress, with root access to the disk WordPress lives on.
  • Every site on the cPanel server is exposed, not just the one that was "hacked". A reseller who manages 50 client sites on one VPS has all 50 sites compromised by a single panel breach.
  • Backups stored on the same server are not trustworthy. The attacker has read/write access to them and may have tampered with restore points.
  • Database credentials in wp-config.php are readable. Any other databases on the server (CRMs, internal tools, staging) are equally exposed.

If your hosting model puts cPanel on the public internet, this CVE is the textbook reason to revisit that choice.

Affected versions and patches

Every supported branch after 11.40 needs to be on at least the patch release below.

BranchPatched version
11.11011.110.0.97
11.11811.118.0.63
11.12611.126.0.54
11.13211.132.0.29
11.13411.134.0.20
11.13611.136.0.5
WP Squared 11.136.111.136.1.7

Older unsupported branches do not have a patch and should be considered permanently vulnerable. If you are running anything on a 11.108 or earlier branch, the only safe path is to upgrade to a supported branch and then patch.

Patch immediately (the only real fix)

On the cPanel host, as root:

# Force the panel to update to the latest release on its current tier
/scripts/upcp --force

# Verify the running version
/usr/local/cpanel/cpanel -V

If you are on a managed cPanel host (HostGator, Bluehost, Namecheap reseller, etc.), you cannot run this yourself. Open a ticket and ask the host to confirm the running cPanel version against the table above. Do it in writing — you want the patch level documented.

After patching, restart cpsrvd to make sure no in-memory exploits survive:

/scripts/restartsrv_cpsrvd

If you genuinely cannot patch in the next hour

Two temporary options. Neither is a long-term solution — they buy you a window to coordinate the real fix.

Option 1 — Block panel ports at the firewall. This breaks browser access to cPanel, WHM, and webmail until you reopen them, but it stops the exploit at the network edge.

# Using ufw
sudo ufw deny 2083/tcp
sudo ufw deny 2087/tcp
sudo ufw deny 2095/tcp
sudo ufw deny 2096/tcp

# Or with iptables
sudo iptables -I INPUT -p tcp -m multiport --dports 2083,2087,2095,2096 -j DROP

If you administer through SSH and only need WHM occasionally, allowlist your own IP first so you can still reach the panel to apply the patch.

Option 2 — Stop the vulnerable services. This kills cPanel, WHM, and WebDAV until you start them again.

/scripts/restartsrv_cpsrvd --stop
/scripts/restartsrv_cpdavd --stop

Sites served by Apache/LiteSpeed/Nginx keep running; only the control panel goes offline. Once patched, restart with /scripts/restartsrv_cpsrvd and /scripts/restartsrv_cpdavd.

Check whether you are already compromised

Patching closes the door but does not tell you whether someone is already inside. Run cPanel's official IoC scanner first — it ships with the patch and looks for tampered session files and forged admin sessions.

After that, do a manual sweep:

# Look for session files containing CRLF in unexpected places
grep -rlP '\r\n' /var/cpanel/sessions/raw/ 2>/dev/null

# Audit WHM users — anything you did not create is suspicious
ls -la /var/cpanel/users/

# Recent root logins
last -n 50 root

# cPanel access log for the exploit window — anything pre-April with
# odd Basic auth attempts is worth investigating
zgrep -h 'Authorization: Basic' /usr/local/cpanel/logs/access_log* 2>/dev/null \
  | awk '$4 >= "[23/Feb/2026"' | head -50

Other indicators worth reviewing:

  • Unexpected SSH keys in /root/.ssh/authorized_keys and any cPanel user's ~/.ssh/authorized_keys.
  • New cron jobs in /var/spool/cron/, especially for root or any WordPress site user.
  • WordPress admin accounts you did not create, on any site on the server.
  • Outbound traffic to unfamiliar IPs in /var/log/messages.

If you find evidence of compromise

Treat it as a full-server compromise. Cleanup is not realistic — once an attacker had root, you do not know what they touched.

  1. Snapshot everything before changing anything: filesystem image, MySQL dumps, full log archive. You will need this for any post-mortem or insurance claim.
  2. Rotate every credential: WHM root, every cPanel user, every MySQL user, every WordPress admin (wp user reset-password --all per site), every SSH key, every API token stored in wp_options.
  3. Restore from a backup taken before February 23, 2026 — the earliest known exploitation date. Anything more recent may already be compromised. If your backups all live on the same server, treat them as suspect and rebuild from source / Git instead.
  4. Rebuild the panel host from a clean OS image rather than trying to clean the existing one. Move WordPress sites across with a fresh wp db export + file rsync from a known-good backup, not by copying server state.

If individual sites are the only thing showing damage, our hacked WordPress cleanup guide covers the per-site work — but it does not substitute for rebuilding a compromised host.

The structural lesson

CVE-2026-41940 is the latest in a long line of "your control panel was the attack surface" incidents. The pattern repeats: a panel exposes an authenticated administrative interface to the public internet, an authentication bypass is found years later, and every site managed by that panel falls together.

Managed WordPress hosts side-step the entire category. There is no public WHM. There is no shared cpsrvd. Each site runs in an isolated container behind a CDN-fronted edge that only speaks HTTPS for the site itself. A bug in the host's internal control plane does not become a one-shot RCE for everyone they host.

For agencies running more than a handful of client sites, this CVE is a reasonable trigger to consolidate onto a managed-WordPress stack. Our shortlist of options is in best managed WordPress hosting 2026 and the broader comparison in best WordPress hosting 2026.

Hardening for cPanel hosts you will keep

If migration is not on the table — for cost, client preference, or email-hosting reasons — tighten what you can:

  • IP-allowlist WHM and cPanel access at the firewall. The panel almost never needs to be reachable from the entire internet; restrict ports 2083 and 2087 to your office / VPN ranges.
  • Put the panel behind a VPN entirely (WireGuard or Tailscale takes 20 minutes to set up).
  • Enable two-factor authentication on every WHM and cPanel account, not just the root login.
  • Subscribe to cPanel's security advisory list so you see the next CVE on day zero, not day sixty.
  • Run weekly IoC scans as a cron job, not as something you do manually after a CVE drops.

Layered server-side hardening is covered end-to-end in our WordPress security hardening checklist.


The takeaway from CVE-2026-41940 is the same one every cPanel CVE has delivered for the last decade: control panels concentrate risk. Patch fast, audit honestly, and use this incident as the prompt to ask whether your stack should still depend on a publicly-reachable shared panel at all.

Frequently Asked Questions

Is my WordPress site affected if it's on shared cPanel hosting?
Yes — if the host has not yet applied the patch, every WordPress site on that cPanel server is at risk. The vulnerability is at the panel level, not in WordPress itself, so security plugins do not help. Ask your host which patch level they are running.
What versions of cPanel and WP Squared are patched?
11.110.0.97, 11.118.0.63, 11.126.0.54, 11.132.0.29, 11.134.0.20, 11.136.0.5, and WP Squared 11.136.1.7. Anything older on a supported branch is vulnerable.
Are managed WordPress hosts like Kinsta and WP Engine affected?
No. Kinsta, WP Engine, Pressable, Rocket.net, and Cloudways do not run cPanel/WHM in their WordPress stacks. Only cPanel and WP Squared deployments are vulnerable.
How do I tell if my server was compromised?
cPanel published an IoC scan script that checks for tampered session files and unexpected admin logins. Combine that with auth-log review for unusual IPs, off-hours logins, and any new WHM users you did not create.

Was this article helpful?