upcp or let cPanel auto-update, and the update log said everything completed. But does the running cPanel build actually contain the fix for CVE-2026-41940? "Updated" and "patched" are not the same thing. A failed update, a pinned tier, or a stale service restart can leave you exposed even when the update script exits cleanly. This walkthrough traces the problem from the symptom — uncertainty about your patch level — down to concrete verification.
What CVE-2026-41940 Actually Breaks
whostmgrd daemon handles input sanitization during Basic authentication and cookie manipulation (the whostmgrsession cookie). An unauthenticated remote attacker can craft a request that tricks the daemon into treating a forged session as a valid administrative session. From there, full WHM API access, root-level RCE.
All cPanel & WHM versions after v11.40 are affected, along with WP Squared up to v11.136.1.6. Multiple government security agencies — including CISA, the Australian Cyber Security Centre, and Singapore's CSA — added this to their Known Exploited Vulnerabilities catalogs after confirming active exploitation in the wild. Attackers weaponized the flaw before the public disclosure and emergency patch, making this a zero-day that was already being used when most administrators first heard about it.
cPanel published their response and remediation guidance at CVE-2026-41940: Response, Actions and Next Steps. The CIS advisory and IISF analysis provide additional context on the exploitation timeline.
Step 1: Confirm the Exact Running Build
upcp ran, but what build is actually loaded right now.
BASH
cat /usr/local/cpanel/versionBASH
grep CPANEL /etc/cpupdate.conf/usr/local/cpanel/version is older than the patched build for your tier, you are still vulnerable regardless of what the update log says. Common reasons this happens: the update tier is set to manual or never, the update process hit a dependency error and rolled back silently, or the cpsrvd/whostmgrd services were not restarted after the binary was replaced.
A support pattern that comes up often: an administrator sees "cPanel update completed" in the log but never checks the actual running version. The update script can exit 0 even when individual components fail to apply. Trust the version file and the running process, not the log summary.
Step 2: Verify the Service Daemon Restarted
cpsrvd (which handles WHM, cPanel, and webmail ports) is running the updated binary:
BASH
/scripts/restartsrv_cpsrvd --statusTEXT
/scripts/restartsrv_cpsrvdStep 3: Check for Session File Tampering
/var/cpanel/sessions/. Look for:
- Session files with unusual creation timestamps (especially during hours when no administrator was logged in)
- Session files owned by unexpected UIDs
- Any session file content referencing accounts or privilege levels that do not match legitimate administrator activity
Step 4: Test That the Bypass No Longer Works
whostmgrsession cookie or manipulated Basic auth header could bypass authentication. On a patched server, sending a request to the WHM API with an invalid or forged session token should return a 401 or redirect to the login page — not grant access.
You can test this safely from the server itself or from a machine you control. Use curl to send a request to the WHM JSON API with a bogus session token:
BASH
curl -sk -H 'Authorization: whm root:INVALIDSESSIONTOKEN' 'https://127.0.0.1:2087/json-api/version'/json-api/version endpoint just returns the cPanel version. It does not modify anything. You are testing whether the authentication gate holds, not exercising any destructive API call.
