CVE-2026–67401 Analysis — cPanel & WHM EmailTrack SQL Injection, From Mail Account to Root
A SQL injection in cPanel's EmailTrack feature lets an authenticated user with only mail privileges inject SQL, write a file to the web root, and execute code, with a separate local privilege escalation then reaching root. The advisory does not disclose the vulnerable parameter or the exact escalation path, so the write-up is a conceptual reconstruction.
Published on medium.com
Sql Injection
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
EmailTrack is cPanel's "Track Delivery" feature. It lets a cPanel user review the delivery status and logs of email sent or received on their own domain. The important property is scope: the feature is designed as a read capability inside the user's own account. In cPanel's permission model an ordinary account can only touch its own mail and domain data, while full control of the server is reserved for root through WHM. CVE-2026-67401 is described as collapsing exactly that boundary with a single SQL injection.

The advisory does not disclose the vulnerable request parameter, the actual SQL statement, or the precise mechanism that connects file creation to root execution. The analysis that follows is a conceptual reconstruction based on the disclosed vulnerability class (SQL injection, then file write, then privilege escalation) and on publicly known characteristics of cPanel's architecture. It is not cPanel's source code and not a verified working exploit.
Setup
No lab, tooling or test environment is described. The only precondition the write-up states is on the attacker's side: a perfectly ordinary cPanel account, or a compromised one, that holds mail privileges only. No separate bug is needed to obtain that starting position.
Finding it
The write-up does not describe a discovery process. It presents the vulnerability class and reconstructs the chain from it. What makes the issue notable is the asymmetry between the permission model and the trust placed in input: the boundary between an ordinary account and root rests on one assumption, that the code never trusts user input. Once EmailTrack concatenates user input, such as the account-name parameter, unsafely into a SQL query string, the boundary stops being enforced by application logic and starts being decided by whatever SQL the attacker wrote. A request that was supposed to mean "show me my own mail log" becomes "use the DB server process's write privilege to drop a file somewhere on this server".
Exploitation

Step 1: Authenticate
The attacker logs in with a normal cPanel account, or a compromised one, that has mail privileges only. This step requires no additional vulnerability.
Step 2: SQL injection
A parameter passed to the UAPI or internal endpoint behind EmailTrack, such as the account name or domain, is concatenated directly into a SQL query. The write-up illustrates the vulnerable pattern with this conceptual snippet, which it explicitly says is not cPanel's real implementation:
<?phpfunction getDeliveryLogs($account) { $query = "SELECT msg_id, sender, recipient, status FROM email_track_log WHERE account = '" . $account . "'";return $db->query($query);}
The code works as long as $account is a normal-looking value such as alice. If the input contains a single quote that terminates the string early, everything after it is no longer interpreted as data but as SQL. The write-up frames the difference like this:
Normal request: account = 'alice' → the DB looks up rows where account equals 'alice'Tampered request: account = 'alice' <additional SQL clause> → the string terminates at the quote, and what follows is executed as a COMMAND, not DATA
The developer assumed account would always be a value. The database engine executes whatever string gets assembled, because the whole thing is SQL to run. That gap between assumption and reality is the essence of the bug.
Step 3: File write
MySQL and MariaDB support SELECT ... INTO OUTFILE '<path>', which writes a query's result straight to the server's filesystem. The feature is legitimate, used for exports and backups. It becomes dangerous when the clause can be injected into SQL the attacker controls. The write-up gives this conceptual UNION-based example:
-- Conceptual example: a UNION-based pattern that writes arbitrary content to a fileSELECT 1, '<?php system($_GET["c"]); ?>', 3, 4, 5INTO OUTFILE '/home/alice/public_html/.cache.php'
When this executes, the DB server process, using its own file-write permission, creates a file containing PHP code at a path the web server can reach. If that path is configured to be interpreted as PHP, the attacker only has to visit it in a browser to run the embedded code. This is the point where SQL injection becomes code execution.
Step 4: Code execution
The dropped file is interpreted, for example as PHP, which lets the attacker run commands at the privilege level of that account or of the service account.
Step 5: Root escalation
Up to this point the attacker has execution at the DB server process's level or the compromised account's level, not root outright. The advisory's statement that exploitation leads to code execution as root implies a separate local privilege-escalation step from here. The write-up lists the classic escalation surfaces that cPanel and WHM environments typically offer:
- SUID-flagged cPanel-specific binaries: utilities designed to run as root under certain conditions.
- Cron jobs: root-owned scheduled scripts that may reference paths an attacker can write to.
- Internal task queues: daemons that process queued work as root.
Which surface is actually in play has not been disclosed, so the write-up stops at the principle level. The takeaway is that SQL injection plus file write is not the whole chain: it has to be paired with a separate design flaw that bridges low privilege to root before the attack is complete.
Root cause

The permission model is simple. An ordinary account is limited to its own mail, domains and files. WHM and root control the entire server and every account on it. That boundary stands on the assumption that the code never trusts user input. EmailTrack concatenates user input, the account-name parameter, unsafely into a SQL query string, so the boundary is no longer enforced by application logic but by the SQL the attacker supplies.
Impact
The attack bar is unusually low: mail privileges alone are enough and no admin access is required. On shared hosting the effect is severe, because a single compromised account on a box with hundreds of tenants puts the entire server and every other customer's data at risk. The attack is also hard to spot, since its starting point is a legitimate-looking call to the EmailTrack API, which without dedicated monitoring is difficult to distinguish from normal usage.
Fix
The fix is to upgrade to a patched build. The write-up gives these build lines and fixed versions:
| Build line | Fixed version |
|---|---|
| 11.110 | [redacted] |
| 11.134 | [redacted] |
| 11.136 | [redacted] |
| 11.138 | [redacted] |
| WP2 (11.138) | [redacted] |
Check the installed version with:
cat /usr/local/cpanel/version
Upgrade immediately through WHM's Home ▸ cPanel ▸ Upgrade to Latest Version, or run the upgrade command directly as root to move to a patched build. Because this is a post-authentication logic flaw rather than something a network scanner can flag in advance, there is no meaningful mitigation to fall back on beyond upgrading.
- Other UAPI or internal endpoints that take an account name or domain. Send a value containing a single quote and observe whether the response changes shape or produces a database error. A positive result is an error message or a response that differs from the normal lookup for the same account.
- Parameters that feed log or report queries. Look for features that read per-account records, such as delivery logs, and test each identifier parameter for quote handling. A positive result is a query that returns rows outside the authenticated account.
INTO OUTFILEreachability from the DB service account. If injection is confirmed, attempt a UNION-based write to a path the web server serves. A positive result is a file appearing at the chosen path with the injected content.- Local escalation surfaces after code execution. Enumerate SUID binaries, root-owned cron entries and task queues that reference writable paths. A positive result is a command that runs with higher privilege than the account that dropped the file.
What happened, in plain words
A piece of software called cPanel has a feature called EmailTrack, which is also labelled "Track Delivery" in its menus. EmailTrack lets a person who owns a website hosting account look at the delivery status and logs of the email that was sent or received on their own domain. Think of it like a parcel tracking page: you type in your own reference number and you see where your own parcels are. You are not supposed to see anyone else's parcels, and you are certainly not supposed to be able to walk into the sorting office and take over the building.
That is the whole point of the feature. It is a read-only window into your own data. In cPanel's permission model, an ordinary hosting account can only touch its own mail, its own domains and its own files. Full control of the server is reserved for a special administrator account called root, which is reached through a separate control panel called WHM. Root can do anything on the machine, including reading every other customer's data.
CVE-2026-67401 is the name given to a security flaw in EmailTrack. The write-up describes it as collapsing exactly that boundary with a single SQL injection. In plain terms: a normal customer with nothing more than a mail account could, in principle, use one specially crafted request to the EmailTrack feature to eventually take full control of the server.

A few words before we go further, because they come up constantly.
- cPanel is a web-based control panel. Hosting companies give it to their customers so those customers can manage websites, email, databases and files through a browser instead of typing commands on a server.
- WHM (WebHost Manager) is the administrator-level companion to cPanel. Where cPanel is the customer's dashboard, WHM is the hosting company's dashboard for the whole server.
- root is the all-powerful administrator account on a Linux server. It can read, change or delete anything.
- A vulnerability is a mistake in software that lets someone make the software do something its designers did not intend.
- A CVE is a public catalogue number for a known vulnerability. "CVE-2026-67401" is simply the identifier this flaw was filed under, so people around the world can refer to the same thing.
- SQL is the language used to talk to a database, which is an organised store of records. When you log in to a website, the site usually asks a database "is there a user with this name and this password?"
- SQL injection is what happens when a program builds one of those database questions by gluing together text that includes something a user typed, without checking it. If the user types something clever, the database can be tricked into running it as part of the question.
One important caveat, stated plainly in the write-up: cPanel's official advisory did not disclose which request parameter was vulnerable, what the actual SQL statement looked like, or the precise mechanism that connects file creation to root execution. The analysis is a conceptual reconstruction. It is based on the disclosed vulnerability class (SQL injection, then file write, then privilege escalation) and on publicly known characteristics of cPanel's architecture. It is not cPanel's source code, and it is not a verified working exploit. So treat the steps below as an explanation of how this kind of chain works, not as a recipe that was confirmed against a live server.
Setup
The write-up does not describe a lab, any tooling, or a test environment. There is no list of commands to install, no virtual machine to build, no scanner to run.
The only precondition it states is on the attacker's side: a perfectly ordinary cPanel account, or a compromised one, that holds mail privileges only. No separate bug is needed to obtain that starting position. In other words, the attacker does not need to be a server administrator, a hosting employee, or anyone special. A normal customer account, or a normal customer account that someone has already stolen the password for, is enough to begin.
Finding it
The write-up does not describe a discovery process. It presents the vulnerability class and reconstructs the chain from it.
What makes the issue notable is the asymmetry between the permission model and the trust placed in input. The boundary between an ordinary account and root rests on one assumption: that the code never trusts user input. Once EmailTrack concatenates user input, such as the account-name parameter, unsafely into a SQL query string, the boundary stops being enforced by application logic and starts being decided by whatever SQL the attacker wrote. A request that was supposed to mean "show me my own mail log" becomes "use the DB server process's write privilege to drop a file somewhere on this server".
Two ideas in that paragraph deserve a slower look.
What is a parameter? When your browser talks to a web application, it often sends small labelled pieces of information along with the request. A parameter is one of those labelled pieces. If you have ever seen a web address ending in something like ?account=alice, the part after the question mark is a parameter: the label is account and the value is alice. The application reads that value and uses it to decide what to show you.
What is an API or an endpoint? An API (Application Programming Interface) is a defined way for one piece of software to ask another piece of software to do something. An endpoint is a specific address inside that API where a particular request is handled, much like a specific counter in a large office. cPanel's customer-facing interface is built on top of an internal API called UAPI, and the EmailTrack feature sits behind one of its endpoints. When you click around in the cPanel dashboard, your browser is really sending requests to those endpoints.
Exploitation

The chain has five steps. The write-up presents them in order, and each one depends on the one before it.
Step 1: Authenticate
The attacker logs in with a normal cPanel account, or a compromised one, that has mail privileges only. This step requires no additional vulnerability.
Why this matters: many serious attacks require the attacker to already be inside. Here, being inside is easy. A shared hosting server may hold hundreds of customers, and any one of them, or anyone who has phished one of them, has a valid login. The attacker does not need to break in through a separate hole. They simply sign in like a legitimate customer.
Step 2: SQL injection
A parameter passed to the UAPI or internal endpoint behind EmailTrack, such as the account name or domain, is concatenated directly into a SQL query. "Concatenated" means glued together as text. The program takes whatever the user supplied and sticks it onto the end of a database question, then sends the whole string to the database.
The write-up illustrates the vulnerable pattern with this conceptual snippet, which it explicitly says is not cPanel's real implementation:
<?phpfunction getDeliveryLogs($account) { $query = "SELECT msg_id, sender, recipient, status FROM email_track_log WHERE account = '" . $account . "'";return $db->query($query);}
Line by line, in plain words:
<?phpmarks the start of a PHP program. PHP is a common language for building websites.function getDeliveryLogs($account) {defines a reusable block of code namedgetDeliveryLogs. It accepts one input, called$account, which is meant to be the name of the account whose delivery logs we want.$query = "SELECT msg_id, sender, recipient, status FROM email_track_log WHERE account = '" . $account . "'";builds the database question as text. The fixed part says: fetch the message ID, sender, recipient and status from a table calledemail_track_log, where the account column equals something. The something is whatever was passed in as$account. The dot in PHP means "join these pieces of text together". Notice the single quote characters around the placeholder: they are there to mark the start and end of a text value inside SQL.return $db->query($query);sends the finished string to the database and returns the result.
The code works as long as $account is a normal-looking value such as alice. The assembled question reads: show me rows where the account equals 'alice'. The database sees a value, compares it, and returns matching rows.
If the input contains a single quote that terminates the string early, everything after it is no longer interpreted as data but as SQL. The write-up frames the difference like this:
Normal request: account = 'alice' → the DB looks up rows where account equals 'alice'Tampered request: account = 'alice' <additional SQL clause> → the string terminates at the quote, and what follows is executed as a COMMAND, not DATA
What this is showing:
- In the normal case, the value
alicesits between the two quote marks that the program itself added. The database treats it as a piece of text to compare against, nothing more. - In the tampered case, the attacker supplies a value that itself contains a quote. That quote closes the text value early. Everything the attacker typed after it is no longer inside the quotes, so the database reads it as further instructions.
The everyday comparison: imagine a form that asks for your name and then prints a sentence like "Hello, [your name]". If you write your name as Alice. Also, please open the safe, a badly built system might read the second sentence as an instruction rather than as part of your name. SQL injection is the same confusion, but the system being confused is a database.
The developer assumed account would always be a value. The database engine executes whatever string gets assembled, because the whole thing is SQL to run. That gap between assumption and reality is the essence of the bug. The database has no way of knowing which parts of the string were written by the programmer and which parts were typed by a stranger.
Step 3: File write
MySQL and MariaDB are two very common database programs. They support a command written as SELECT ... INTO OUTFILE '<path>', which writes a query's result straight to the server's filesystem. The feature is legitimate, used for exports and backups: it is a convenient way to dump query results into a file.
It becomes dangerous when the clause can be injected into SQL the attacker controls. The write-up gives this conceptual UNION-based example:
-- Conceptual example: a UNION-based pattern that writes arbitrary content to a fileSELECT 1, '<?php system($_GET["c"]); ?>', 3, 4, 5INTO OUTFILE '/home/alice/public_html/.cache.php'
What each part is doing:
- The line beginning with
--is a comment in SQL. It is there to label the example and is ignored by the database. SELECT 1, '<?php system($_GET["c"]); ?>', 3, 4, 5asks the database to return a made-up row of five values. The numbers 1, 3, 4 and 5 are filler. The interesting value is the second one, which is a piece of text containing PHP code.UNIONis a SQL keyword that joins the results of two queries together. The idea is that the attacker's made-up row gets appended to the results of the original query, so the database is now handling content the attacker chose.INTO OUTFILE '/home/alice/public_html/.cache.php'tells the database to write those results into a file at that path instead of returning them to the screen.- The path itself is a location inside a website's public folder.
public_htmlis the conventional folder whose contents a web server serves to visitors. - The embedded PHP,
<?php system($_GET["c"]); ?>, is a tiny program.$_GET["c"]means "read the value called c from the web address".system(...)means "run that value as a command on the server". So the file, once executed, runs whatever command the attacker puts in the address bar.
When this executes, the DB server process, using its own file-write permission, creates a file containing PHP code at a path the web server can reach. If that path is configured to be interpreted as PHP, the attacker only has to visit it in a browser to run the embedded code. This is the point where SQL injection becomes code execution.
Why this step is taken: the database can write files, and the web server can run files. Neither ability is a bug on its own. The bug is that the attacker can make the database write a file into a place the web server will later execute. The database is being used as a delivery mechanism for the attacker's code.
Step 4: Code execution
The dropped file is interpreted, for example as PHP, which lets the attacker run commands at the privilege level of that account or of the service account.
In plain terms: the attacker now has a small program sitting on the server that they can trigger from a browser, and that program can run commands. Those commands run with the permissions of whichever user the web server or database was running as. That is already serious, because it means the attacker is no longer limited to reading their own mail logs. They can act on the server.
But it is not yet root. That distinction matters for the next step.
Step 5: Root escalation
Up to this point the attacker has execution at the DB server process's level or the compromised account's level, not root outright. The advisory's statement that exploitation leads to code execution as root implies a separate local privilege-escalation step from here.
"Privilege escalation" means moving from a lower level of permission to a higher one. "Local" means the attacker is already on the machine and is looking for a way up from inside, rather than attacking from the network.
The write-up lists the classic escalation surfaces that cPanel and WHM environments typically offer:
- SUID-flagged cPanel-specific binaries: utilities designed to run as root under certain conditions. A binary is a compiled program. SUID is a Linux permission flag that makes a program run with the permissions of its owner rather than of the person who launched it. If a program owned by root has that flag, anyone who runs it gets root's power for the duration of that program. That is fine if the program is careful, and dangerous if it can be tricked.
- Cron jobs: root-owned scheduled scripts that may reference paths an attacker can write to. Cron is the Linux scheduler: it runs commands at set times. If a scheduled script runs as root and reads or executes something from a folder the attacker can modify, the attacker can influence what root runs.
- Internal task queues: daemons that process queued work as root. A daemon is a background program that runs without a user watching it. If such a program picks up jobs from a queue and executes them with root's power, then anything the attacker can place in that queue may end up running as root.
Which surface is actually in play has not been disclosed, so the write-up stops at the principle level. The takeaway is that SQL injection plus file write is not the whole chain: it has to be paired with a separate design flaw that bridges low privilege to root before the attack is complete.
Root cause

The permission model is simple. An ordinary account is limited to its own mail, domains and files. WHM and root control the entire server and every account on it. That boundary stands on the assumption that the code never trusts user input. EmailTrack concatenates user input, the account-name parameter, unsafely into a SQL query string, so the boundary is no longer enforced by application logic but by the SQL the attacker supplies.
The failure it identifies is the string concatenation itself: the program builds a database question by gluing text together, and that is the root cause.
Impact
The attack bar is unusually low: mail privileges alone are enough and no admin access is required. On shared hosting the effect is severe, because a single compromised account on a box with hundreds of tenants puts the entire server and every other customer's data at risk. The attack is also hard to spot, since its starting point is a legitimate-looking call to the EmailTrack API, which without dedicated monitoring is difficult to distinguish from normal usage.
To put that in everyday terms: shared hosting is like a block of flats where every tenant has their own front door but they all share the same building. If one tenant can reach the building's master controls, every flat is exposed. And because the attacker's first move looks like an ordinary tenant checking their own post, a casual observer sees nothing unusual.
Fix
The fix is to upgrade to a patched build. The write-up gives these build lines and fixed versions:
| Build line | Fixed version |
|---|---|
| 11.110 | [redacted] |
| 11.134 | [redacted] |
| 11.136 | [redacted] |
| 11.138 | [redacted] |
| WP2 (11.138) | [redacted] |
A build line is a family of releases that share the same major version number. If your server runs a version older than the fixed version listed for its line, it needs updating.
Check the installed version with:
cat /usr/local/cpanel/version
What this does: cat is a Linux command that prints the contents of a file to the screen. The path /usr/local/cpanel/version is where cPanel keeps a small file recording its own version number. Running this as root on the server tells you which build you have, so you can compare it with the table above.
Upgrade immediately through WHM's Home ▸ cPanel ▸ Upgrade to Latest Version, or run the upgrade command directly as root to move to a patched build. Because this is a post-authentication logic flaw rather than something a network scanner can flag in advance, there is no meaningful mitigation to fall back on beyond upgrading.
"Post-authentication" means the flaw is only reachable after someone has logged in. A network scanner, which probes a server from outside without logging in, will not see it. "Logic flaw" means the problem is in how the program reasons about what it is doing, not in a crash or a memory error. That is why upgrading is the only real answer: there is no setting to switch off and no filter to add that removes the underlying mistake.
- Other UAPI or internal endpoints that take an account name or domain. Send a value containing a single quote and observe whether the response changes shape or produces a database error. A positive result is an error message or a response that differs from the normal lookup for the same account. The reasoning: if one endpoint glues input into SQL, its neighbours may do the same, and a database error is a strong hint that your quote broke the question apart.
- Parameters that feed log or report queries. Look for features that read per-account records, such as delivery logs, and test each identifier parameter for quote handling. A positive result is a query that returns rows outside the authenticated account. The reasoning: a feature that reads records is exactly where a database question is being built, and if the answer includes someone else's rows, the boundary has already failed.
INTO OUTFILEreachability from the DB service account. If injection is confirmed, attempt a UNION-based write to a path the web server serves. A positive result is a file appearing at the chosen path with the injected content. The reasoning: this checks whether the database user has the file-write permission that step 3 depends on.- Local escalation surfaces after code execution. Enumerate SUID binaries, root-owned cron entries and task queues that reference writable paths. A positive result is a command that runs with higher privilege than the account that dropped the file. The reasoning: this checks whether step 5 is actually available on the machine, which is the difference between code execution and full root.
Glossary
- API: a defined way for one piece of software to ask another to do something, like a menu of requests a program accepts.
- Binary: a compiled program that the computer runs directly.
- Build line: a family of software releases sharing the same major version number.
- Concatenation: joining pieces of text end to end to make one longer string.
- cPanel: a web-based control panel that hosting customers use to manage websites, email, databases and files.
- Cron: the Linux scheduler that runs commands at set times.
- CVE: a public catalogue number for a known vulnerability, so people can refer to the same flaw unambiguously.
- Daemon: a background program that runs without a user watching it.
- Database: an organised store of records that programs query and update.
- Endpoint: a specific address inside an API where a particular kind of request is handled.
- File write: causing a program to create or modify a file on disk.
- INTO OUTFILE: a MySQL and MariaDB clause that writes a query's result to a file on the server.
- Logic flaw: a mistake in how a program reasons about what it is doing, rather than a crash or memory error.
- MariaDB: a common open-source database program, compatible with MySQL.
- MySQL: a common open-source database program.
- Parameter: a labelled piece of information sent with a request, such as an account name or domain.
- PHP: a programming language widely used to build websites.
- Post-authentication: only reachable after someone has logged in.
- Privilege escalation: moving from a lower level of permission to a higher one.
- Public_html: the conventional folder whose contents a web server serves to visitors.
- Root: the all-powerful administrator account on a Linux server.
- Shared hosting: a setup where many customers' accounts live on one server.
- SQL: the language used to ask questions of a database.
- SQL injection: tricking a program into running attacker-supplied SQL by gluing unchecked user input into a database question.
- SUID: a Linux permission flag that makes a program run with the permissions of its owner rather than of the person who launched it.
- UAPI: cPanel's internal API that its customer-facing interface is built on.
- UNION: a SQL keyword that joins the results of two queries together.
- Vulnerability: a mistake in software that lets someone make it do something its designers did not intend.
- WHM: WebHost Manager, the administrator-level companion to cPanel for managing a whole server.