Summary
A flaw in the phpMyFAQ web installer can allow unauthenticated attackers to bypass the expected authentication boundary during certain upgrades from 3.x. If the installer ignores the legacy database configuration, an attacker may point the site to an attacker-controlled database and create an administrator account.
Affected context
The issue affects phpMyFAQ installations using the web installer in the described 3.x upgrade scenario, where the installer ignores the legacy config/database.php configuration. The vulnerability is reported in versions before 4.1.12 and in 4.2.0-alpha releases before 4.2.0-RC.2. Risk depends on whether the installer is accessible and the legacy configuration is not properly recognized.
Exploit preconditions
- Attack surface: The phpMyFAQ web installer
- Required access: No authentication is required when the affected installer flow is exposed
- Trigger point: Reinstallation or setup through the installer during an affected 3.x upgrade
- Why exploitation is possible: The installer ignores the legacy database configuration, allowing setup to proceed against an attacker-controlled database and enabling creation of an attacker-chosen administrator account
Why this happens
The installer does not correctly account for the existing legacy database configuration during certain upgrades. This can leave a setup path available without an effective authentication check, mapping to CWE-306: Missing Authentication for Critical Function. The underlying insecure pattern is permitting a sensitive installation or administrative action without verifying that the requester is authorized.
Potential impact
- An attacker may create an administrator account
- The application could be taken over or its content altered
- Data accessed through the application may be exposed or manipulated
- The site could be connected to an attacker-controlled database
General mitigation guidance
Defensive patterns include ensuring installation and reinstallation functions require strong authorization, and disabling setup routes by default once an application is configured. Upgrade logic should reliably detect and preserve existing configuration, while database connection details should be validated and protected from unauthorized changes. Apply least privilege to installer processes and database accounts, and avoid exposing setup interfaces beyond the intended administrative boundary.
How teams detect issues like this
Review installer and upgrade code for paths that permit critical actions without authentication or authorization checks. Static analysis and code review can look for setup routes that remain reachable after installation, legacy configuration files that are ignored, and database settings accepted before authorization. Deployment policies can also enforce that installer endpoints are disabled or restricted, with monitoring for unexpected setup activity, database configuration changes, or new administrator accounts.

