GHSA-f25v-x6vr-962gCritical· 10.0▾ MidnightPheditor: Authentication Bypass in Forced Password-Change Flow via Unverified Current Password
▾ Midnight zone — Critical, or high with PoC / in-the-wild
impact 55 · likelihood 0 · exploitation 0
Need a working PoC? Pro members can cast a request and our team develops one — it lands right here.
The forced password-change flow, triggered when the stored password is still the default (admin), does not verify that the password submitted by the client actually matches the current password. Any non-empty value in pheditor_password is enough to reach the password-change form, and submitting pheditor_new_password / pheditor_confirm_password in the same request is enough to set an arbitrary new password and obtain an authenticated session — without ever proving knowledge of the current password.
pheditor.php line 163:
if (PASSWORD == hash('sha512', 'admin')) { // still default — force change prompt
This checks whether the stored PASSWORD constant is still the default value. It does not check whether the submitted pheditor_password matches it. As a result, on any instance that hasn't changed the default password, the check passes regardless of what the client actually sends, and the subsequent password-change branch is reachable without authentication.
TARGET="https://victim.com/pheditor.php"
# Any non-empty value works here — password is never actually verified
curl -c /tmp/j.txt \
-d 'pheditor_password=anything' \
-d 'pheditor_new_password=attacker123' \
-d 'pheditor_confirm_password=attacker123' \
"$TARGET" -L -s -o /dev/null
# Session is now authenticated as admin, with the password changed to attacker123
On any instance where the default password has not yet been changed, an unauthenticated attacker can set an arbitrary new admin password and obtain a fully authenticated session, without knowing the current password. This is a complete authentication bypass, not merely "default credentials in use" — it holds even if the operator believes the instance is protected because the login form is present.
Verify the submitted password against the stored PASSWORD constant before entering the forced password-change branch, so the flow is reachable only by someone who actually knows the current password:
$submitted_hash = hash('sha512', $_POST['pheditor_password']);
if (PASSWORD == hash('sha512', 'admin') && $submitted_hash === PASSWORD) {
// proceed to forced password-change flow
} else {
// treat as a normal login attempt (including rate-limiting)
}
The original report submitted alongside this finding also included two additional items:
save/newfile action). Documented explicitly in the README's new Security Model section.php -r ...) — a duplicate of a previously reported and already-patched issue (GHSA-g3hq-hphg-8fhh, fixed in v2.0.7).This advisory has been scoped to the authentication bypass specifically, since it's a distinct root cause from both of those. Full responses to all three points are in the comments below.
pheditor/pheditor < 2.0.8Upgrade to a patched release:
pheditor/pheditor 2.0.8Connected by shared product, vendor, weakness, or advisory.
GHSA-g3hq-hphg-8fhhHigh· 8.8Pheditor: Terminal command-allowlist bypass via argument injection leads to RCE — surviving vector after the metacharacter-sanitization fixes
CVE-2026-54540High· 8.8Pheditor has an authenticated terminal command whitelist bypass
CVE-2026-55578High· 8.8Pheditor: Incomplete command sanitization in terminal feature allows RCE via pipe operator, backtick substitution, and newline injection
CVE-2026-55579Critical· 9.8Pheditor: Hardcoded default password 'admin' with no forced change enables full application compromise
CVE-2026-48030Critical· 9.9Pheditor: OS Command Injection in terminal handler via unsanitized 'dir' parameter
CVE-2026-97649Medium· 4.7A flaw has been found in ningzichun student-management-system up to 98760f5711cf6dc8b4adca53a9e207ca49b02ebf