https://whm.example.com in a browser and the WHM login page loads anyway. The firewall rule is fine. The request simply came in through a different door.
This matters most during incidents like CVE-2026-41940, the session-handling authentication bypass in cPanel & WHM. According to the advisory context, active exploitation pushed many providers to temporarily restrict ports like 2087 and 2083 until patches were deployed. If the login surface is still reachable through ports 80 and 443, that restriction protects less than people think.
The symptom: login still loads with the ports closed
https://server-ip:2087 times out. So far, so good.
But https://cpanel.example.com and https://whm.example.com still return a working login form, on the standard HTTPS port, with a valid certificate. Sometimes webmail.example.com works too. To someone who just closed the admin ports, this looks like the firewall is being ignored.
It isn't. Those hostnames are service subdomains, which cPanel's documentation has also called proxy subdomains. They exist so users on restrictive networks (offices, hotels, schools) that only allow 80 and 443 outbound can still reach cPanel, WHM, and webmail.
How service subdomains reach cpsrvd
cpsrvd, cPanel's own daemon, listening on ports such as 2082/2083 (cPanel), 2086/2087 (WHM), and 2095/2096 (webmail). The public web server on 80 and 443 is a separate process, usually Apache, sometimes LiteSpeed or cPanel's Nginx, depending on how the server is built.
When proxy subdomains are enabled, the web server has rules that match hostnames like cpanel.*, whm.*, and webmail.*. A matching request is forwarded internally to cpsrvd on the right port. The flow is:
- The client connects to the server's public IP on port 443 with
Host: whm.example.com. - The web server accepts it, because 443 is open for normal websites.
- The web server opens its own connection to
cpsrvdon the WHM port, over the loopback or local interface. cpsrvdanswers, and the response goes back to the client through the web server.
Red herrings worth ruling out
--permanent and lost on reload, will leave the ports open. Test the direct port from an outside machine, not from the server itself, because local tests often bypass the rule.
The browser might be showing a cached page. A login form rendered from cache proves nothing. Use curl from a clean shell so there is no cache or saved session involved.
The DNS records might seem like the problem. People sometimes delete the cpanel, whm, and webmail A records and consider the issue solved. That helps against casual discovery, but it does not remove the proxy rules. The web server routes by the Host header and TLS SNI, not by whether DNS exists. Anyone who knows the server IP can send Host: whm.example.com directly, and if any hosted domain still resolves those names, the path is still public.
Other cPanel ports may still be open. Blocking only 2083 and 2087 leaves 2082, 2086, 2095, and 2096 to whatever the firewall already allowed. What each one serves depends on version and settings, so check them rather than assuming they redirect harmlessly.
Testing whether the login page is still reachable
curl --resolve pins a hostname to a specific IP, so you can test the proxy path even if DNS records are gone or point elsewhere. Replace 203.0.113.10 with the server's public IP and example.com with any domain hosted on it.
BASH
# Direct ports: should time out or be refused if the firewall works
curl -skI --max-time 10 https://203.0.113.10:2087/
curl -skI --max-time 10 https://203.0.113.10:2083/
# Proxy path on 443, forcing the hostname to the server IP (bypasses DNS)
curl -sk -o /dev/null -w '%{http_code}
' --resolve 'whm.example.com:443:203.0.113.10' https://whm.example.com/
curl -sk -o /dev/null -w '%{http_code}
' --resolve 'cpanel.example.com:443:203.0.113.10' https://cpanel.example.com/
curl -sk -o /dev/null -w '%{http_code}
' --resolve 'webmail.example.com:443:203.0.113.10' https://webmail.example.com/
# Look for login markup instead of trusting the status code alone
curl -sk --resolve 'whm.example.com:443:203.0.113.10' https://whm.example.com/ | grep -i -m 3 'login'/var/cpanel/cpanel.config, and whmapi1 can read it:
BASH
# Read-only checks; 1 usually means proxy subdomains are enabled
grep -E '^proxysubdomains' /var/cpanel/cpanel.config
whmapi1 get_tweaksetting key=proxysubdomainscpsrvd's own logs. Proxied requests show up there, but the source IP recorded for them depends on how the proxy passes client addresses on your build, so verify what you see before drawing conclusions.
BASH
# Recent login attempts and WHM requests seen by cpsrvd
tail -n 50 /usr/local/cpanel/logs/login_log
grep -c 'GET /' /usr/local/cpanel/logs/access_logcpsrvd may treat them differently from direct connections. That is one more reason not to rely on the port block alone.
Closing or restricting the proxy path in WHM
- Users who bookmark
cpanel.theirdomain.comorwebmail.theirdomain.comwill lose that shortcut. - Users on networks that block high ports will lose access to cPanel and webmail entirely until the restriction is lifted.
- Email client autodiscovery and some calendar or contacts setups may depend on related subdomains. Test a mail client after the change.
curl --resolve tests from outside. The proxy path is closed only when those requests no longer return a cPanel or WHM login page, regardless of what Tweak Settings says.
None of this replaces patching. The research context for CVE-2026-41940 points to fixed builds above versions such as 11.136.0.5 and 11.134.0.20, depending on release tier, plus official scripts to check historical session files for signs of compromise. Blocking access buys time; it does not tell you whether someone got in before the block. Patched cPanel for CVE-2026-41940? That Doesn't Prove the Server Wasn't Breached covers that part.
The practical rule: when you shut the admin ports during an incident, treat ports 80 and 443 as a second entrance to the same login. Test both paths from outside with a pinned hostname, disable or restrict proxy subdomains for the duration, tell users which access path still works, and keep the restriction until the server is patched and checked for compromise.