GHSA-6R2C-694W-24QV
Unverified password change in user control panel API (no current-password verification)
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-6R2C-694W-24QV divulgada · CVSS 7.1 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
> Authorized research notice: This vulnerability was discovered during authorized security research in an isolated lab environment against a local instance of phpMyFAQ (main @ 9435f34bd8fcaaeee02a9f679192e46b1b5fedcf, 4.2.0-alpha.2; issues cross-checked against the 4.1 stable branch where applicable). No production systems or third-party data were accessed. I am reporting under coordinated disclosure and will not publish details for 90 days from this report to allow a fix. Please confirm receipt within 7 days.
Summary
The user-control-panel endpoint `PUT /api/user/data/update` allows any authenticated user to set a new account password without supplying the current password. The request requires only a session cookie and a CSRF token — both available to any script running in the user's browser context. Any session-level compromise (XSS in any module, a stolen session cookie, an unattended unlocked session) therefore becomes a silent, irreversible account takeover: the attacker sets a password only they know, and the legitimate user is locked out. On password change the app also invalidates existing sessions, so the victim cannot even remain logged in to react.
Credit: Ahmed Ibrahim (@skeletonsec)
Affected versions
- Verified on `main` @ `9435f34` (4.2.0-alpha.2 nightly, `phpmyfaq/src/phpMyFAQ/Controller/Frontend/Api/UserController.php:52-140`)
- Same defect verified on the `4.1` stable branch (`phpmyfaq/src/phpMyFAQ/Controller/Frontend/UserController.php:43-128`), affecting the latest stable release line.
Root cause
`updateData()` verifies only the `ucp` CSRF token and that `userid` matches the session user. If `faqpassword` is non-empty it checks only confirmation-match and length ≥ 8, then calls `$authDriver->update($login, $password)`, which writes the new bcrypt hash. There is no read of the current password and no `password_verify()` against the stored hash anywhere on the path; the request schema has no current-password field at all.
Proof of concept
- Log in as any user; `GET /user/ucp` and take the first `pmf-csrf-token` hidden input value.
- ```
- A fresh login with the NEW password succeeds (302 → `/`); the OLD password fails (302 → `/login`).
Reproduced twice in an isolated lab (two independent password flips, fresh sessions and tokens). A full PoC script and request/response transcripts are available on request.
Impact
Full account takeover from a single session-level foothold, including administrator accounts, with victim lockout. Note the related issue reported separately: two-factor authentication can be disabled via the same trust level (session + CSRF only), so 2FA does not mitigate this.
Suggested remediation
Require and verify the current password (`password_verify()` against the stored hash) before invoking `$authDriver->update()`, reject the request otherwise with 403, invalidate other sessions and notify the user by email on password change.
CWE
CWE-620: Unverified Password Change
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Packagistphpmyfaq/phpmyfaq |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-6r2c-694w-24qvLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
