
phpMyAdmin 5.2.3 - उच्च - रिमोट - 2FA स्किप - WebAuthn सेरेमनी को छोड़ा जा सकता है
abraxaslabs.tech · github.com/abraxas · @abraxas_null · [email protected] · phpmyadmin-webauthn
Class: 2FA bypass Reach: Remote
phpMyAdmin 5.2.3 (tag RELEASE_5_2_3). Default tarball. web-auth/webauthn-lib suggest / require-dev है। composer install --no-dev इसे install नहीं करता। इसलिए createServer CustomServer का उपयोग करता है। वह class response.signature को parse करती है (field का मौजूद होना और decode होना आवश्यक है) और इसे कभी COSE-verify नहीं करती। यह कभी stored credentialPublicKey का उपयोग नहीं करती। product का अपना CustomServerTest बिना public key के assertion स्वीकार करता है।
Structural checks वास्तविक हैं: allowCredentials में credential id, clientData.type == webauthn.get, challenge session से मेल, origin host, rpIdHash, user-present। Signature parse होती है और ignore कर दी जाती है। MySQL password के बाद, एक garbage WebAuthn signature जो अभी भी उन fields से मेल खाती है, पूर्ण phpMyAdmin session है। वह database है। यदि आपने वास्तव में web-auth/webauthn-lib install किया है, तो आप WebauthnLibServer पर हैं और यह bug नहीं है।
| ID | अभी तक कोई CVE नहीं |
| Class | 2FA bypass / missing signature verify |
| Reach | Remote (cookie login, फिर WebAuthn skipped) |
| CWE | CWE-347, CWE-287 |
| CVSS | High: 8.1 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N |
| Product | phpMyAdmin |
| Affected | 5.2.3 tag RELEASE_5_2_3. Default tarball / composer install --no-dev |
| Auth | Cookie login (MySQL password), फिर WebAuthn skipped |
| License | GNU Affero GPL v3.0 |
| Lab | केवल 127.0.0.1:18080 |
उन्हें अभी भी MySQL password चाहिए (cookie login)। उस password के बाद, वे matching challenge, origin host, rpIdHash, user-present, enrolled credential id, और एक garbage signature के साथ webauthn_request_response POST करते हैं। वे सामान्य UI में पहुँच जाते हैं। 2FA गायब है। वह database है (SQL, users, export), host पर PHP shell नहीं।
यदि आपने वास्तव में web-auth/webauthn-lib install किया है, तो आप WebauthnLibServer पर हैं और यह bug नहीं है।
| Privilege | Method / path | Lab-proven या inferred |
|---|---|---|
| authenticator के बिना पूर्ण WebAuthn 2FA (second factor की integrity) | password के बाद POST webauthn_request_response, garbage signature | Lab-proven। still_2fa=False landed=True |
| उस MySQL user के रूप में पूर्ण PMA (integrity + SQL box की recon) | वही session | Lab-proven। Home UI markers मौजूद |
| MySQL password skip करना | unauthenticated POST | Lab-proven closed। login पर ही रहता है |
web-auth/webauthn-lib installed होने पर वही bypass | WebauthnLibServer | Closed। यह leftover नहीं |
| OS RCE / reverse shell | यह leftover | Closed |
इस leftover पर closed: unauthenticated PMA, host पर PHP shell, और उस tarball को जिसने वास्तव में web-auth/webauthn-lib install किया है, इस bug के रूप में मानना।
मैंने createServer पढ़ा, फिर parseAndValidateAssertionResponse, फिर वह unit test जो public key pass नहीं करता। Structural checks वास्तविक हैं। Signature parse होती है और ignore कर दी जाती है।
गलत रास्ते: पहले password session के बिना WebAuthn JSON POST करना; एक signature जो structural checks में fail हुई; Webauthn\Server अभी भी मौजूद (गलत server class); challenge इस session से नहीं; origin host mismatch; user-present flag clear; credential id allowCredentials में नहीं।
lab Dockerfile 5.2.3 copy करता है, composer install --no-dev, फिर vendor/web-auth delete करता है ताकि CustomServer ही खेल में हो। अंतिम php -r exit 1 करता है यदि Webauthn\Server मौजूद हो। init.sql appuser के लिए hardware key के बिना WebAuthn 2FA enroll करता है। PoC signature not-a-real-signature-PMA-WEBAUTHN-BYPASS POST करता है।
Dockerfile के बगल में pin clone करें, फिर चलाएँ:
cd lab
git clone --depth 1 --branch RELEASE_5_2_3 https://github.com/phpmyadmin/phpmyadmin.git src
./run.sh
या उस clone के बाद pack root से:
python3 phpmyadmin-webauthn-Abraxas-Labs.py
केवल loopback: http://127.0.0.1:18080. Compose project pma-webauthn-lab. Pin RELEASE_5_2_3. src/ ship न करें। Witness PMA-WEBAUTHN-BYPASS.
SUCCESS PMA-WEBAUTHN-BYPASS WebAuthn 2FA accepted with garbage signature
stored COSE public key के साथ authenticatorData || SHA-256(clientDataJSON) verify करें; userHandle bind करें; signCount enforce करें। web-auth/webauthn-lib को वास्तविक dependency बनाएँ और CustomServer delete करें, या library अनुपस्थित होने पर fail closed करें। तब तक, WebAuthn 2FA disable करें या इस phpMyAdmin को expose न करें।
Plugins\TwoFactor\WebAuthn::createServerCustomServer::parseAndValidateAssertionResponseGNU Affero GPL v3.0. देखें LICENSE. केवल loopback lab. कोई warranty नहीं।