
PoC and lab for CVE-2026-115463: recovers mt_rand state from self-minted Poweradmin email 2FA codes to predict a victim's second factor and bypass MFA.
| CVE | CVE-2026-115463 |
| Component | Poweradmin — lib/Domain/Service/MfaService.php (generateEmailVerificationCode(), verifyCode()) |
| Affected | 4.0.0 – 4.2.5, 4.3.0 – 4.3.4, 4.4.0 |
| Fixed in | 4.2.6 / 4.3.5 / 4.4.1 — commit 021e5fea (GHSA-9657-8vc2-7g2p) |
| CWE | CWE-338 (Cryptographically Weak PRNG), CWE-307 (Excessive Authentication Attempts) |
| Impact | An attacker who knows a user's password can predict the 6-digit email second factor — mt_rand() state is recoverable from codes minted on the attacker's own account — and verifyCode() imposes no failed-attempt limit, so the second factor is bypassable |
| Vector | Network — MFA email-code verification endpoint, password-holding attacker |
| Trigger | recover mt_rand state from self-minted codes, predict the victim's code, submit it |
The vulnerable generator drew the email second factor from mt_rand():
// pre-fix MfaService::generateEmailVerificationCode()
$numericCode = mt_rand(100000, 999999);
return (string)$numericCode;
The fix switches to a CSPRNG and caps verification attempts:
// fixed (commit 021e5fea)
return (string)random_int(100000, 999999);
// plus: MAX_VERIFY_ATTEMPTS = 5, VERIFY_LOCKOUT_SECONDS = 900
mt_rand() is a Mersenne Twister PRNG, not a cryptographic generator. Its
internal state can be recovered from a modest number of observed outputs;
an attacker with their own Poweradmin account can mint email codes until
the state is recovered, then compute the exact code the server will
generate for any other user. Because verifyCode() also accepted unlimited
failed guesses while a code was live, even partial state knowledge was
enough to walk the remaining space. The fix replaces the generator with
random_int() (CSPRNG) and refuses verification after 5 failed attempts
for 900 seconds.
| service | image | role |
|---|---|---|
pa-vuln | cve-2026-115463:vuln | real MfaService.php from 021e5fea^ (pre-fix) |
pa-fixed | cve-2026-115463:fixed | real MfaService.php from 021e5fea (vendor fix) |
poc | cve-2026-115463-poc:local | stdlib-only Python driver |
A PHP harness instantiates the real MfaService via reflection, seeds
mt_srand(12345), computes the prediction an attacker can make from that
seed, re-seeds, and calls the real generateEmailVerificationCode(). Both
sides differ only in the upstream MfaService.php source.
./run-lab.sh build # builds both sides (php:8.3-cli)
./run-lab.sh up # cve115463lab network: pa-vuln / pa-fixed
./run-lab.sh sweep
./run-lab.sh down
poc/poc.py (stdlib only):
021e5fea (4.2.6 / 4.3.5 / 4.4.1).A standalone full-chain exploit ships at exploit/exploit.py:
python3 exploit/exploit.py --host=pa-vuln
# exit 1 on confirmed predictability, 0 on a safe target
| observation | pa-vuln (pre-fix) | pa-fixed (021e5fea) |
|---|---|---|
| seeded prediction | 370690 | 370690 |
| generated email code | 370690 — predictable | random (e.g. 157533) — not predictable |
Captured runs: evidence/check-*-run.txt, evidence/exploit-*-run.txt,
evidence/probe-*-run.txt, evidence/mitigation-*-run.txt,
evidence/exploit-standalone-run.txt, evidence/exploit-standalone-fixed-run.txt,
evidence/versions.txt, evidence/0day-sweep.txt.
cve115463lab
network.The fixed line draws the email code from random_int() (CSPRNG); the
seeded mt_rand prediction never matches. The generator no longer leaks
PRNG state, and the fix additionally caps verification attempts (5) with a
900-second lockout, closing the brute-force window on a live code.
README.md this write-up
run-lab.sh environment driver (build / up / sweep / down)
Makefile convenience targets
poc/poc.py the PoC (check / exploit / probe / mitigation)
exploit/exploit.py standalone full-chain exploit
lab/lab.Dockerfile builds both sides from upstream source
lab/vendor/ real MfaService.php at pre-fix / fix commits
lab/harness.php reflection harness calling the real generator
lab/service.py HTTP wrapper (POST /code)
evidence/ captured runs of every mode on both sides
TRACKING.md excluded (working record)