Summary
A missing authorization check in phpMyFAQ's WebAuthn prepare API endpoint allows creation of new active user accounts without any authentication or registration safeguards.
When exploited, an unauthenticated attacker can generate unlimited accounts even if user self-registration is disabled, potentially overwhelming the system and enabling further abuse.
Affected context
This vulnerability occurs in phpMyFAQ deployments that expose the /api/webauthn/prepare endpoint for WebAuthn-based authentication or registration flows.
The issue manifests when the endpoint is reachable over the network (e.g., from the public internet) and is configured to create or finalize user accounts but does not enforce upstream authorization, registration policy checks, or additional anti-automation controls.
Environments that have disabled normal user registration are still affected because the endpoint bypasses those configuration restrictions.
Exploit preconditions
- Attack surface: HTTP(S) access to the phpMyFAQ instance exposing
/api/webauthn/prepare - Required access: None; the attacker can be fully unauthenticated
- Trigger point: Sending crafted requests to the WebAuthn prepare endpoint that initiates account creation
- Why exploitation is possible:
- The endpoint performs user account creation logic without verifying that the caller is authenticated or authorized
- There is no CSRF protection or captcha challenge, so automated scripts can drive mass account creation
- The endpoint does not respect or re-check the application's "registration disabled" configuration before activating accounts
Why this happens
The root cause is a missing authorization decision on a sensitive endpoint, mapping directly to CWE-862: Missing Authorization.
The WebAuthn prepare endpoint was designed to assist with security key registration and apparently assumed a trusted or pre-validated context.
However, it directly or indirectly leads to creation of active user accounts without:
- Confirming the presence of an authenticated session
- Enforcing application-level registration policies (e.g., registration disabled)
- Applying contextual checks such as CSRF validation or captcha for unauthenticated flows
This design treats the endpoint as inherently safe, but in practice it exposes privileged operations to any network caller.
Potential impact
- An attacker can create unlimited active user accounts without approval.
- Application logging, moderation, and administrative panels can be flooded with bogus users, degrading usability.
- Attackers may use bulk-created accounts to bypass rate limits tied to user identity.
- Depending on role assignment or misconfiguration, newly created accounts may gain unintended privileges.
- The system's reputation and email infrastructure can suffer if accounts are used for spam or abusive behavior.
General mitigation guidance
Effective mitigation focuses on enforcing strict authorization and policy checks around all account-related endpoints:
- Require authenticated sessions and explicit authorization for any endpoint that creates or activates user accounts, including WebAuthn-related flows.
- Ensure that all user-creation paths consult a centralized registration policy (e.g., whether self-registration is enabled, whether approval is required).
- Apply standard web application controls—CSRF protection, rate limiting, and optional captcha—on endpoints that can be accessed without authentication.
- Centralize account lifecycle logic so that API endpoints cannot bypass configuration flags or security checks by directly invoking lower-level creation routines.
- Design WebAuthn flows to separate "preparation" from "account creation," ensuring that only a validated and authorized context can finalize new accounts.
How teams detect issues like this
Detection can leverage both code-centric and operational approaches:
- Static analysis and code review:
- Flag routes or controllers that perform user creation, activation, or privilege changes without explicit authorization checks.
- Review WebAuthn and other authentication-related endpoints to confirm they require either an authenticated user or a validated registration token.
- Look for direct calls to user-creation routines that are not gated behind a shared service or policy module.
- Security testing and QA:
- Conduct API-level tests attempting account creation while unauthenticated and with registration disabled.
- Integrate these tests into CI pipelines to guard against regressions.
- Runtime monitoring:
- Monitor logs for spikes in account creation events, especially originating from a small set of IP addresses or from unauthenticated requests.
- Establish alerts on anomalous registration activity in environments where self-registration is supposed to be disabled.
- Automated API security scanners and web application firewalls can help surface exposed account-creation endpoints and anomalous usage patterns.

