HIGHSecurity · Authentication bypass · Web hosting control plane · April 2026 CVE-2026-41940 · CVSS 9.8

cPanel & WHM Authentication Bypass (CVE-2026-41940), Patch Now and Hunt for Pre-Patch Compromise

By NewMaxx /April 30, 2026

cPanel (WebPros) published an emergency security update on April 28, 2026 for what its release notes called "an issue with session loading and saving." The issue was assigned CVE-2026-41940 the following day and rated CVSS 9.8: an unauthenticated authentication bypass in cPanel & WHM that lets a remote attacker promote a pre-auth session to a fully authenticated root session, bypassing both the password and the 2FA gates without ever hitting an authentication code path. Per cPanel's advisory the flaw affects cPanel software, including DNSOnly, across all versions after 11.40, which in practice is every currently supported cPanel & WHM line plus many older deployed systems; WP Squared is also affected. watchTowr Labs published a full technical write-up and a public detection artifact on April 29, and KnownHost (managed cPanel host) reports execution attempts in the wild as early as February 23, 2026, well before the public advisory. Searchlight Cyber / Assetnote separately documented that simply firewalling cPanel/WHM ports may not be sufficient, since cPanel's per-vhost Apache config exposes the same management endpoints through a /___proxy_subdomain_whm/ path on every virtual host. If your cPanel/WHM management surface was reachable during the disclosure window through any path, treat the host as potentially compromised until proven otherwise.

Status checked: April 30, 2026. Fixed-version guidance and advisory text may change; verify against cPanel's current advisory before remediation. Framing note: this is a vendor-acknowledged code vulnerability with a public PoC and researcher-attributed in-the-wild exploitation. The response is patch plus session-file forensics plus credential rotation, in that order. The cPanel advisory is the operative source for patched build numbers; the watchTowr write-up is the operative source for the technical mechanism; the Searchlight / Assetnote write-up is the operative source for accurate exposure assessment beyond direct port reachability.

Why this is "drop everything," not "patch this week"

Rapid7's Ryan Emmons notes Shodan shows roughly 1.5 million internet-exposed cPanel instances (vulnerable count unknown). watchTowr puts cPanel & WHM deployments at "north of 70 million domains". The bug is unauthenticated, network-reachable, scriptable in a few HTTP requests, and the public PoC reaches WHM root (effectively root on the server). KnownHost CEO Daniel Pearson told customers the company has seen execution attempts since 2/23/2026 and described most observed activity as "let me see if this works" probing rather than full exploitation, but the window for opportunistic mass scanning opened the moment watchTowr's PoC dropped on April 29. Multiple hosting providers (Namecheap, Hosting.com, InMotion, HostPapa, KnownHost, and others) preemptively blocked WHM/cPanel ports during the patch window, which is the right shape of response.

Port blocking reduces exposure but does not eliminate it

Per Searchlight Cyber's Adam Kues and Shubham Shah (Assetnote), cPanel's per-vhost Apache configuration installs a ProxyPass from /___proxy_subdomain_whm to 127.0.0.1:2086 (and a similar /___proxy_subdomain_cpanel path to the cPanel port) on every virtual host. The RewriteCond only constrains the rewrite that maps the whm.example.com subdomain onto the proxy path; the ProxyPass itself fires regardless of the request's Host header. In practice this means accessing https://<any-vhost>/___proxy_subdomain_whm/login on a cPanel-managed server reaches WHM even when ports 2082/2083/2086/2087 are firewalled at the network edge. Operators should treat port blocking as reduced exposure, not protection, and ensure scanners and WAFs check for the proxy-subdomain paths in addition to the management ports. Public PoCs that only probe the management ports will under-report vulnerable hosts.

Be careful with exploit-based validation scans

Several public CVE-2026-41940 detection scripts work by partially executing the exploit chain to confirm vulnerability. These can interact with cPanel's anti-abuse controls in ways that hurt rather than help. Per Searchlight: the first exploit step is necessarily a login attempt with bad credentials, which counts against cphulkd (cPanel's brute-force lockout) and can lock the targeted account out for a window during which even legitimate access fails. cPanel also commonly runs an authorized_whm_root_ips allowlist for root specifically, which thwarts naive root-targeted detection regardless of patch state. On the cPanel side (port 2083), cpaneld additionally requires the supplied username to correspond to an existing hosting account on disk, so probing with root against the cPanel port will not identify vulnerable hosts at all. Use exploit-based validation only on systems you own or are explicitly authorized to test. Run the vendor's IOC scan and preserve session/log artifacts before any validation activity, because validation attempts will themselves create new pre-auth session files and failed-login records that complicate later forensics. Searchlight's open-source scanner uses a randomized username and an expired=1 session-injection marker rather than user=root to sidestep these issues; that's the right shape if you must run an active check.

Affected and patched versions
CVE-2026-41940 · CVSS 9.8 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) CWE-306: Missing Authentication for Critical Function Vendor advisory published: 2026-04-28 ~12:05 PM CST (per cPanel) CVE assigned: 2026-04-29 watchTowr technical write-up + public PoC: 2026-04-29 Researcher: Sina Kheirkhah (@SinSinology), watchTowr Labs Affected: cPanel & WHM, all currently supported versions (per cPanel: all versions after 11.40, including DNSOnly installations) WP Squared (managed WordPress hosting platform built on cPanel) Patched cPanel & WHM builds (per cPanel advisory, triangulated against watchTowr, SecurityWeek, and SOCPrime reporting; verify against the current cPanel advisory before remediation): 11.86.0.41 (legacy branch) 11.110.0.97 (was 11.110.0.96) 11.118.0.63 (was 11.118.0.61) 11.126.0.54 (was 11.126.0.53) 11.130.0.19 11.132.0.29 (was 11.132.0.27) 11.134.0.20 (was 11.134.0.19) 11.136.0.5 (was 11.136.0.4) Patched WP Squared build: 136.1.7 cPanel's advisory also notes special handling for some v110 deployments tied to legacy operating systems (CentOS / CloudLinux / older Ubuntu). For these, the fixed build differs from 11.110.0.97; verify against the cPanel advisory rather than assuming the standard v110 fix applies. cPanel additionally warns that some unsupported versions may not have a patched build available; servers on those tracks must be migrated to a supported branch as a priority. Vulnerable services / default ports: cpsrvd -> 2083 (cPanel SSL), 2087 (WHM SSL), 2095 (Webmail SSL), 2096 (Webmail SSL) Plain-HTTP equivalents (2082, 2086) also referenced in some hosting-provider mitigation notes. Additional reachability path (per Searchlight Cyber): cPanel's per-vhost Apache config exposes the same endpoints through proxy paths on EVERY managed virtual host's regular HTTPS service (typically 443): /___proxy_subdomain_whm/ -> 127.0.0.1:2086 /___proxy_subdomain_cpanel/ -> 127.0.0.1:2080 Closing 2082/2083/2086/2087 alone does not eliminate exposure if the public web vhosts on 80/443 remain reachable. Verify build version on the host: /usr/local/cpanel/cpanel -V Force patched update + restart: /scripts/upcp --force /scripts/restartsrv_cpsrvd Files changed in the patch (per watchTowr diff review): Cpanel/Session.pm (saver, filter_sessiondata now invoked inside saveSession) Cpanel/Session/Load.pm (loader) Cpanel/Session/Encoder.pm (new hex_encode_only round-trip primitive for the no-ob: fallback)
Build numbers triangulated against cPanel's advisory, watchTowr's write-up, and SecurityWeek / SOCPrime reporting. Branch coverage and per-branch fixed builds may change as cPanel updates its advisory; do not infer a fixed build from branch alone. Verify the installed version directly with /usr/local/cpanel/cpanel -V and compare against the cPanel advisory at remediation time. Hosts with auto-update disabled or pinned to a specific build will not auto-update and must be manually remediated; cPanel explicitly flags these as priority.
The exploitation chain, per watchTowr Labs

Per Sina Kheirkhah's analysis, the chain combines two independent defects in cPanel's session-handling code: an unconditional CRLF-survival path through cpsrvd's Basic-auth handler, and a session encoder that fails-open when the cookie is malformed. End-to-end:

  1. Mint a pre-auth session. Send POST /login/?login_only=1 with bad credentials. cpsrvd writes a pre-auth session file to /var/cpanel/sessions/raw/<sessid> and returns a whostmgrsession cookie of the form :<name>,<ob_hex>, where ob_hex is a per-session secret used to symmetrically encode the pass field on disk.
  2. Defeat the per-session encoder by truncating the cookie. Send a follow-up request with Cookie: whostmgrsession=:<name> (the comma and ob_hex chopped off). The server still resolves the on-disk path (get_ob_part strips the tail before path resolution, so the lookup succeeds), but inside saveSession the construct my $encoder = $ob && ... short-circuits to a falsy value because $ob is empty. The encoding branch is never entered, and $session_ref->{'pass'} is written to disk in its raw form rather than being hex-encoded. This is the fail-open half of the bug.
  3. Inject CRLF via Basic auth. Combine the truncated cookie with an Authorization: Basic header whose decoded user:pass stuffs the pass field with raw \r\n-separated fake session records: hasroot=1, tfa_verified=1, user=root, a chosen cp_security_token, and critically successful_internal_auth_with_timestamp=.... cpsrvd's set_pass sanitizer strips NUL bytes only; \r\n survives. The missing-sanitization half of the bug: cpsrvd's Basic-auth handler calls saveSession directly, so filter_sessiondata (which would have stripped \r\n) is never invoked. The two defects compose: the encoder would have hex-mangled the payload past recognition, but the cookie trick disabled it; filter_sessiondata would have stripped the CRLF, but the call path skipped it. Result: saveSession writes the unsanitized payload into the raw session file as separate top-level records.
  4. Promote the injection from raw file into the JSON cache. cpsrvd reads sessions from a parallel JSON cache (/var/cpanel/sessions/cache/<sessid>) rather than the raw file, so the injected lines initially appear only as part of a single pass string, not as top-level keys. Triggering do_token_denied (any non-login URL hit without a valid cp_security_token, e.g. GET /scripts2/listaccts) calls Cpanel::Session::Modify::new and save, which re-reads the raw file with nocache => 1 (forcing a read of the line-oriented file rather than the cache) and rewrites the cache from the parsed result. The do_token_denied path includes a max_tries = 3 counter, so the cache promotion can fire up to three times per session. After it fires once, the injected records are top-level in both files.
  5. Skip the password check via the timestamp. On every request, docheckpass_whostmgrd re-validates the password by default (against /etc/shadow via Cpanel::CheckPass::UNIX::checkpassword), so the forged pass field would normally fail. But if either successful_internal_auth_with_timestamp or successful_external_auth_with_timestamp is set on the session, check_authok_user returns AUTH_OK unconditionally and /etc/shadow is never consulted. That path exists for legitimate two-step / external-auth flows; the CRLF injection abuses it to short-circuit the password check entirely. The session authenticates as root with no real password.

The actual session ID used in subsequent requests is the one cpsrvd returns in the Location header of the 307 response after the injection request (e.g. /cpsess0228251236/), not the /cpsess9999999999 attackers may inject. handle_auth overwrites the injected cp_security_token with a fresh legitimate one, but the other injected records (hasroot=1, user=root, successful_internal_auth_with_timestamp) survive and are sufficient.

Root cause, per the patch diff: a sanitizer (filter_sessiondata) already existed in Cpanel/Session.pm but was only invoked by some callers; cpsrvd's Basic-auth path called saveSession directly, without it. The fix moves filter_sessiondata inside saveSession itself (so every caller gets it for free), and adds a defense-in-depth no-ob: hex-only encoding fallback when $ob is empty. With both changes in place, either defect alone would now block the chain: the sanitizer strips \r\n from pass before it reaches disk, and the hex-only fallback ensures even an unsanitized payload would be encoded past recognition before write. The successful_internal_auth_with_timestamp password-skip path is design-as-intended for legitimate external-auth flows; the patch closes the injection vector that abused it rather than removing the path itself.

Status snapshot, 30 April 2026

Confirmed by cPanel (WebPros): authentication bypass in cPanel & WHM "session loading and saving" affecting cPanel software including DNSOnly across all versions after 11.40 (advisory text); WP Squared also affected; patched builds released April 28; emergency mitigation is to block ports 2083 / 2087 / 2095 / 2096 or stop cpsrvd and cpdavd until patched. Vendor IOC scanner shipped with the advisory.

Confirmed by Rapid7: CVSS 9.8, unauthenticated remote attacker, full administrative access to the cPanel host on success. Rapid7's analysis attributes the technical mechanism to CRLF injection via the Authorization: Basic header combined with a truncated whostmgrsession cookie that bypasses the session encoder.

Reported by watchTowr Labs (Sina Kheirkhah): end-to-end exploitation chain through cookie truncation, CRLF injection, JSON-cache promotion via do_token_denied, and the successful_internal_auth_with_timestamp password-check bypass; public Detection Artifact Generator released on GitHub. Hadrian published a Nuclei template that validates exploitability by extracting the cPanel build version from an authenticated /json-api/version call (only reachable on a vulnerable host).

Reported by Searchlight Cyber (Adam Kues, Shubham Shah / Assetnote): default cPanel deployments expose the same WHM and cPanel endpoints through /___proxy_subdomain_whm/ and /___proxy_subdomain_cpanel/ paths on every managed virtual host's regular HTTPS service, so closing ports 2082/2083/2086/2087 alone is not full containment. Searchlight also documents that cphulkd brute-force lockouts and authorized_whm_root_ips root-IP allowlists make naive root-targeted scanning unreliable, and that cpaneld on port 2083 requires a valid hosting account name (root will not match), so accurate exposure assessment requires more than a single root probe. Open-source scanner cpanel2shell-scanner published.

Reported by KnownHost (managed cPanel host): execution attempts observed as early as February 23, 2026, more than two months before the public advisory; most observed activity characterized as probing rather than full exploitation, but the window of pre-patch in-the-wild use is real. Confirmed via Reddit thread linked from watchTowr's write-up and SecurityWeek reporting.

Disclosure-timeline nuance: per a webhosting.today industry source quoted by Help Net Security and Cyber Kendra, the bug was reported privately to cPanel approximately two weeks before the April 28 advisory and the vendor's initial response was reportedly that nothing was wrong. Hosting.com's incident status note separately confirmed the bug was "responsibly disclosed to cPanel" and that hosting providers were advised to block WHM/cPanel access ahead of the patch. The identity of the original reporter is not public at time of writing.

Unclear at time of writing: earliest verified exploitation date (KnownHost says probing from February 23, but the actual zero-day window may be earlier); attribution of the original reporter to cPanel; full count of compromised hosts (KnownHost characterizes most observed activity as probing); the precise reason for the gap between private disclosure and public advisory; whether public-facing proxy-subdomain paths were exploited at scale prior to Searchlight's April 30 publication.

A note on the timeline framing

Two distinct timelines are in play and they should not be conflated. The private-disclosure timeline (per webhosting.today, roughly two weeks before April 28) and the in-the-wild exploitation timeline (per KnownHost, execution attempts from February 23) are independently sourced and not yet linked to a single attacker disclosure narrative. It is plausible the two are unrelated: a responsible private report from one party can coexist with independent zero-day exploitation by another. Treat both as researcher- or vendor-attributed observations rather than a settled chain of custody.


Why this one matters

cPanel & WHM is the management plane for a very large fraction of the shared-hosting internet. watchTowr's framing of "north of 70 million domains" is not hyperbole; Rapid7's Shodan figure of roughly 1.5 million internet-exposed cPanel instances captures the directly-reachable WHM/cPanel logins specifically. WHM gives root-level administration of the server (SSL, accounts, mail, DNS, shell access, the lot); cPanel gives per-account control of every hosted website and database on that server. A successful exploit of CVE-2026-41940 against a WHM port effectively yields root on the host and, transitively, control of every customer site and database it manages. On a typical shared-hosting box, that is dozens to hundreds of customer sites per compromised server.

The bug is also unusually clean. It does not require an account, it does not require a memory corruption primitive, it does not require defeating ASLR or sandboxes, and the exploit fits in a handful of HTTP requests. Once watchTowr published the chain, the barrier to incorporation into mass scanners dropped to roughly the time it takes to translate Perl-flavored prose into a Python loop. Hadrian's Nuclei template (cited above) and watchTowr's own Detection Artifact Generator make detection trivial; weaponized scanners will not be far behind, if they are not already in flight.


Am I affected?

Check first, then act

If you operate any cPanel & WHM server (including DNSOnly installations) or any WP Squared deployment, and the host was running a vulnerable build with the cPanel/WHM management surface reachable from any untrusted network during the disclosure window (April 28, 2026 onward, or earlier if your provider was already aware), treat the host as potentially compromised until your forensic checks below come back clean.

The "attack surface" question is not "did anyone log in" and not strictly "could the network path to cpsrvd on 2083/2087/2095/2096 reach the daemon." Per Searchlight Cyber, the same management endpoints are also reachable via the /___proxy_subdomain_whm/ and /___proxy_subdomain_cpanel/ paths on every cPanel-managed virtual host's regular HTTPS service. So the real question is whether any reachable request path on the host could route to cpsrvd. Hosts behind a strict admin-IP allowlist or VPN-only access (covering both the management ports and the public web vhosts) were not exposed to opportunistic scanning; hosts whose customer sites are publicly reachable on 80/443 generally were, unless WAF or proxy-path rules explicitly blocked the proxy-subdomain paths.

Quick checks

Confirm the running build:

/usr/local/cpanel/cpanel -V

Compare against the patched-version table in the IOC block. If the build is older than the patched threshold for its release track, the host is vulnerable.

cPanel ships a session-file IOC scan as part of its updated advisory; per the advisory it scans /var/cpanel/sessions/ for the indicator patterns described below. Run the vendor script first if it's available on your patched build, then do the manual hunt for completeness:

grep -lE '^(hasroot|user|tfa_verified|cp_security_token|successful_internal_auth_with_timestamp)=' /var/cpanel/sessions/raw/* 2>/dev/null

Look for any pre-auth session (needs_auth=1 or no real origin_as_string=address=...,method=login) that contains any of: user=root, hasroot=1, tfa_verified=1, successful_internal_auth_with_timestamp=..., a cp_security_token the daemon never issued, or a multi-line pass= value. Per cPanel's advisory, a session containing both token_denied and cp_security_token is a strong exploitation indicator (it implies the do_token_denied cache-promotion step landed).

For network-side hunt, audit cpsrvd access logs for the disclosure window. The exploitation signature is a three-request sequence from the same source IP within a short window: a 401 response on POST /login/?login_only=1 (mints the pre-auth session), immediately followed by an Authorization: Basic request to a non-/login URL such as / with a truncated whostmgrsession cookie (no comma in the cookie value, returns 307 to a /cpsess<digits>/ path), followed by a request to a non-login URL without a valid cp_security_token in the URI such as GET /scripts2/listaccts (triggers the do_token_denied cache-promotion). The truncated cookie alone is the highest-signal item; legitimate clients always send the full :<name>,<ob_hex> cookie that the server originally issued, so a whostmgrsession value with no comma is anomalous by construction.


Response, if you ran a vulnerable build with reachable management surface

  1. Patch immediately, then verify. Run the cPanel update script as root, then confirm the installed build, then restart the daemon to ensure no in-memory copy of the old code is still serving requests: /scripts/upcp --force /usr/local/cpanel/cpanel -V /scripts/restartsrv_cpsrvd Compare the resulting build against the patched-version table in the IOC block (or, more authoritatively, against the cPanel advisory at remediation time). If the host is on a managed-hosting plan, verify your provider has applied a fixed build for your branch on your specific server, not just rolled it out generally; per cPanel, hosts with automatic updates disabled or pinned to a specific version will not auto-update and must be manually remediated. There is no durable substitute for a fixed build; the items below are containment, not replacement.
  2. If you cannot patch immediately, contain completely. Per cPanel's mitigation guidance: block inbound traffic on ports 2083, 2087, 2095, and 2096 at the firewall, or stop the cpsrvd and cpdavd services until the patch is applied. Hosting providers (Namecheap, Hosting.com, InMotion, TPP, and others) used port blocking as the bridge during the patch window; this is the right pattern for any operator who cannot deploy the update inside the next few hours. Critically, port blocking alone is not a complete containment per Searchlight Cyber's finding: the /___proxy_subdomain_whm/ and /___proxy_subdomain_cpanel/ proxy paths remain reachable through any cPanel-managed virtual host's normal HTTPS service (typically ports 443, often also 80). Operators relying on port blocking should either also stop cpsrvd/cpdavd outright, add WAF rules that block requests matching /___proxy_subdomain_whm and /___proxy_subdomain_cpanel on every vhost, or restrict access to those paths to a known admin IP range. If WHM access from a specific admin IP is required, firewall to that IP only, do not leave WHM open globally.
  3. Hunt session files for indicators of exploitation. Run the IOC scans above against /var/cpanel/sessions/raw/ and /var/cpanel/sessions/cache/. Any pre-auth session containing top-level user=root, hasroot=1, tfa_verified=1, or successful_internal_auth_with_timestamp is a high-confidence exploitation indicator. Multi-line pass= values are the artifact of the CRLF injection itself. Per cPanel, the combination of token_denied and cp_security_token in the same session is a strong signal that the cache promotion step ran. Preserve the session files (cp -a, do not edit in place) before purging anything; if you find evidence of compromise, you will want the originals for incident-response work.
  4. Audit cpsrvd access logs for the exploit signature. Look for the three-request sequence described above (POST /login/?login_only=1 returning 401, then Authorization: Basic on a non-/login URL with truncated whostmgrsession cookie returning 307, then a request to a non-login URL without a valid cp_security_token in the URI). Scope the review to the disclosure window and earlier. KnownHost reports execution attempts from February 23, 2026, so cap your log review window at least to that date if your retention reaches it; consider going further back, since the actual zero-day window may precede observed probing. The truncated cookie (no comma, missing ob_hex tail) is the highest-signal fingerprint and the one to grep for first.
  5. If you find evidence of compromise, treat as full root compromise of the host. The bug produces a WHM session as root, which is equivalent to root on the cPanel host. A password reset alone is not sufficient containment; an attacker who reached root could have planted SSH keys, cron entries, systemd units, or shell-init backdoors that survive a password change. Preserve evidence before any cleanup (snapshot /var/cpanel/sessions/, the cpsrvd access and error logs, /var/log/wtmp, and full disk if practical). Then run the standard post-root-compromise audit: check /etc/passwd and /etc/shadow for unexpected accounts; /root/.ssh/authorized_keys and every customer's ~/.ssh/authorized_keys for unauthorized keys; crontab -l for root and every system user, plus /etc/cron.*/; /etc/systemd/system/ for unauthorized services; ~/.bashrc, ~/.profile, and /etc/profile.d/ for shell-init persistence; WHM accounts list for accounts you did not create; reseller accounts; new API tokens; new WHM users; modified web roots and plugin/theme files for every hosted site. Audit DNS, mail forwarders, and FTP accounts as well; an attacker with WHM root can pivot into any of these. Per cPanel's own incident-response guidance, after IOC hits: purge affected sessions, force password resets for root and all WHM users, and audit access logs and persistence surfaces. If the host is multi-tenant shared hosting, the blast radius includes every customer site and database on the box. Customer notification is a separate workstream from the technical cleanup.
  6. Rotate every credential the host touched. Root password and SSH keys; every WHM/cPanel account password; every reseller password; every API token (WHM, cPanel, integrations like cPanel-WordPress integrations, backup-system tokens, monitoring agents); every database root password and per-customer DB password; mail account passwords; FTP account passwords; any third-party integration credentials stored on the box (S3 backup keys, off-site backup credentials, monitoring tokens). For shared hosting, customer-side credentials reachable from the WHM root view (FTP, mail, DB) should be reset and the customers notified to rotate downstream application credentials (CMS admin, plugin secrets, application .env files) on their side.
  7. Rebuild rather than clean for confirmed compromise. If session-file or log evidence confirms exploitation, rebuilding from known-clean media and restoring customer data from backups predating the exposure window is the safer path. The exploit gives attacker code execution as root via WHM; persistence surfaces on a Linux server with WHM root are large and not enumerable cleanly. Forensic-cleaning a confirmed rooted hosting server is not a productive use of time.
  8. Push the IOCs into your detection. SIEM/EDR rules for: pre-auth cPanel session files containing any of the privileged top-level keys; multi-line pass= values in /var/cpanel/sessions/raw/; cpsrvd access patterns matching the POST /login/?login_only=1 -> Authorization: Basic + truncated cookie sequence; unexpected new WHM accounts or API tokens; unexpected modifications to /var/cpanel/users/. Push watchTowr's Detection Artifact Generator against any cPanel surface in your estate to confirm patched status; Hadrian's Nuclei template is a cleaner pipeline-friendly check if you already run Nuclei.
If you are a cPanel/WHM customer on a managed-hosting plan

You probably do not control the patch directly. Verify with your hosting provider that they have applied CVE-2026-41940 patches on the specific server hosting your accounts, not just rolled out the patch generally. Ask whether your server's WHM/cPanel ports were accessible during the disclosure window and whether session-file IOC scans came back clean. If your provider cannot confirm a clean post-patch audit on your specific host, treat application-layer credentials (WordPress admin, database passwords, API tokens stored in your application .env files) as potentially exposed and rotate them. cPanel-side passwords (cPanel login, FTP, email) the provider should be rotating for you; if they are not, push for it.


The broader pattern

Three observations worth flagging.

First, the disclosure-window math is the part that should worry hosting operators. The CVE was assigned April 29 and the public PoC dropped the same day, but execution attempts were reportedly already underway since late February per KnownHost. The window for "patched and not exploited" was effectively never available to anyone whose ports were exposed; the meaningful question is whether any given host was hit during the pre-disclosure period. Session-file forensics is the operative answer because the exploit's injection artifacts (top-level hasroot=1, multi-line pass=, successful_internal_auth_with_timestamp on a session that did not legitimately authenticate) are durable on disk in /var/cpanel/sessions/ until the session expires. Run the scan even if you patched promptly.

Second, the root cause is a textbook example of a sanitizer that exists but is not consistently called. filter_sessiondata was already in the codebase; cpsrvd's Basic-auth path simply did not call it before invoking saveSession directly. The patch moves the sanitizer inside saveSession itself rather than relying on every caller to remember. That's a structural fix, and it's the right shape; the caller-must-remember pattern is a recurring source of this class of bug across long-lived codebases. Worth flagging in your own internal review patterns: any sanitizer that lives at the call site rather than at the sink is one missed caller away from a CVE.

Third, the chain illustrates a stacked-defenses failure mode that's worth internalizing separately from "the sanitizer was missing." There were several mechanisms that each, on their own, should have prevented exploitation: the per-session encoder would have hex-mangled the injection past usefulness; the JSON cache reads would have kept the injected lines bundled inside a single pass string rather than top-level keys; docheckpass_whostmgrd would have failed the forged password against /etc/shadow on every request. Each was bypassed by a separate, individually modest defect: the encoder fails open on a malformed cookie; the cache is rewritten by an unauthenticated do_token_denied path that re-parses the raw file; the password check is short-circuited by a session-set successful_internal_auth_with_timestamp flag intended for legitimate external-auth flows. None of these is a dramatic individual flaw; together they compose into pre-auth root. Defense-in-depth that depends on attackers respecting the intended call sequence is the kind that fails this way.

One-line takeaway

Patch cPanel & WHM to a fixed build for your branch via /scripts/upcp --force, restart cpsrvd, and verify with /usr/local/cpanel/cpanel -V; if you cannot patch immediately, stop cpsrvd/cpdavd outright rather than relying on port blocking alone (the /___proxy_subdomain_whm/ path remains reachable via 80/443 on every managed vhost). Then hunt /var/cpanel/sessions/ for top-level hasroot=1 / user=root / successful_internal_auth_with_timestamp / multi-line pass= values, and audit cpsrvd access logs back to at least February 23, 2026 for the truncated-cookie three-request signature. If session-file or log evidence of exploitation is present, treat as full root compromise of the cPanel host, with blast radius covering every customer account on the server; password reset alone is not sufficient containment.

All Bulletins ↑ Primary source: cPanel advisory →