llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · phpmyfaq/phpmyfaq

GHSA-H96G-59XP-7R5M

Two-factor authentication can be disabled without re-authentication (session + CSRF token only)

Sin parche publicado
Descargar PNG JSON
CVSS 4.0
7.1
Alta
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
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición92 dDesde la divulgación, 20 ago 2026, 2:24 p. m.
Detección92 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
20 ago 26
20 nov 26
21 nov 26
20 ago 26
12 sept 26
5 oct 26
28 oct 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-H96G-59XP-7R5M divulgada · CVSS 7.1 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

> 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

`POST /api/user/remove-twofactor` disables TOTP two-factor authentication for the current user requiring only a session cookie and a CSRF token — no password re-entry and no current TOTP code. The same downgrade is reachable inline via `PUT /api/user/data/update`, which accepts a plain `twofactor_enabled` form field. Anyone with a foothold in the user's browser session can silently strip the account's second factor. Combined with the unverified password change reported separately, this converts any session compromise into a full, persistent account takeover.

Credit: Ahmed Ibrahim (@skeletonsec)

Affected versions

  • Verified on `main` @ `9435f34` (4.2.0-alpha.2 nightly, `phpmyfaq/src/phpMyFAQ/Controller/Frontend/Api/UserController.php:288-321` and `:105`)
  • Same defect verified on the `4.1` stable branch (`phpmyfaq/src/phpMyFAQ/Controller/Frontend/UserController.php:267-290` and inline toggle at `:93`), affecting the latest stable release line.

Root cause

`removeTwofactorConfig()` checks only the `remove-twofactor` CSRF token and `isLoggedIn()`, then executes `setUserData(['secret' => $newSecret, 'twofactor_enabled' => 0])`. No step-up authentication (password or current TOTP) is requested. `updateData()` additionally assigns `twofactor_enabled` directly from a form field under the same session+CSRF-only guard.

Proof of concept

  1. Victim account has 2FA enabled: password-only login is refused with a redirect to `/token?user-id=N` (TOTP demanded).
  2. Attacker holding the victim session: `GET /user/ucp`, take the `pmf-csrf-token-remove-twofactor` value.
  3. ```
  4. `faquserdata` now shows `twofactor_enabled = 0`; password-only login succeeds (302 → `/`, no `/token` step).

Verified end-to-end in an isolated lab with a known TOTP seed. PoC script and transcripts available on request.

Impact

Silent security-setting downgrade of any account, including administrators. After one request, password-only authentication suffices.

Suggested remediation

Require a current TOTP code (or password) and verify it before disabling 2FA; apply the same step-up check to the `twofactor_enabled` field in `updateData()`; notify the user by email and invalidate other sessions when 2FA is disabled.

CWE

CWE-308: Use of Single-factor Authentication

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 4.0

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
Requisitos de ataqueAT:N
NingunoPresentes
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaPasivaActiva
Confid. (sistema)VC:N
AltoBajoNinguno
Integridad (sistema)VI:H
AltoBajoNinguno
Disponib. (sistema)VA:N
AltoBajoNinguno
Confid. (posterior)SC:N
AltoBajoNinguno
Integridad (posterior)SI:N
AltoBajoNinguno
Disponib. (posterior)SA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida
phpmyfaq/phpmyfaq≤ 4.1.7
4.1.7
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistphpmyfaq/phpmyfaq
Sin parche — — —
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-h96g-59xp-7r5m

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.