cPanel Critical RCE Enables Full Server Takeover via Mail Account

Critical cPanel vulnerability lets authenticated hosting account holders execute root-level code and take complete control of entire server infrastructure.
Table of Contents
    Add a header to begin generating the table of contents

    cPanel published a security advisory addressing a critical vulnerability that allows any authenticated hosting account holder with mail privileges to escalate to root-level code execution and take complete control of the entire server hosting infrastructure.

    Single Account Compromise Threatens All Hosted Customers

    The vulnerability affects all supported versions of cPanel and WHM. The attack begins with an authenticated hosting account that has mail-related privileges—a common configuration for shared hosting environments. From there, the attacker exploits the EmailTrack feature to create arbitrary files anywhere on the server filesystem.

    Arbitrary file creation is the first stage. Once an attacker can place files in privileged directories, they can inject code into system scripts, create malicious cron jobs, or overwrite configuration files that execute with elevated permissions. This path leads directly to root-level code execution.

    How the EmailTrack Feature Becomes an Escalation Vector

    The EmailTrack component processes mail-related operations for hosting accounts. The vulnerability lies in insufficient validation of file paths during EmailTrack operations. An attacker with mail privileges can craft requests that write files outside the intended directory sandbox, bypassing the isolation that normally separates one hosting account from another and from the underlying system.

    Once the attacker has written a malicious file to a privileged location, the next server restart, scheduled task, or manual administrative action triggers execution of the injected code with root permissions.

    Complete Infrastructure Compromise from One Hosting Account

    A single compromised hosting account—achieved through credential theft, phishing, or brute-force attack—gives the attacker a foothold. From that foothold, the vulnerability enables total server takeover. The attacker can then compromise all other hosting accounts on the same physical or virtual server, steal data across customer environments, deploy persistent backdoors, and pivot to additional systems in the hosting provider’s network.

    For shared hosting providers, the risk multiplies significantly. One vulnerable server can host hundreds or thousands of customer websites. A breach that starts with one low-privilege account spreads laterally to every customer on that server.

    The economics of shared hosting depend on multi-tenant infrastructure: many customers share physical servers to reduce costs. This model requires strong isolation between hosting accounts to prevent one customer’s compromised account from affecting others. The cPanel vulnerability breaks that fundamental isolation guarantee, turning the cost-efficiency model into a systemic security risk.

    Hosting Providers Face Exposure Across Customer Base

    The vulnerability’s scope extends to all supported cPanel versions, meaning every hosting provider running cPanel infrastructure is potentially exposed. Shared hosting is one of the largest segments of the web hosting market, supporting millions of small business websites, blogs, and e-commerce sites that cannot afford dedicated servers.

    An attacker who gains root access to a shared hosting server controls not just websites but also email accounts, databases, SSL certificates, and backup systems for every customer on that server. This enables business email compromise attacks at scale, theft of e-commerce transaction data, and replacement of legitimate websites with phishing pages or malware distribution points.

    The attack requires only mail-related privileges, a baseline permission level granted to most hosting accounts. Hosting providers cannot mitigate the risk by restricting mail access without breaking core functionality that customers expect from their hosting packages.

    cPanel released patches for all supported versions on September 8. Hosting providers should apply the update immediately and audit all hosting accounts with mail privileges for suspicious EmailTrack activity, unusual file creation patterns, or signs of lateral movement across account boundaries during the exposure window. Forensic investigation should focus on system directories where an attacker could write files to achieve persistence: cron.d, init.d, configuration files loaded at boot, and scripts executed by automated maintenance tasks.

    Related Posts