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

GHSA-XHGX-2WJ8-G4PJ

Live TOTP secret included in user data export ZIP

Sin parche publicado
Descargar PNG JSON
CVSS 4.0
5.3
Media
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/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-XHGX-2WJ8-G4PJ divulgada · CVSS 5.3 (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

The GDPR-style self-service export (`POST /api/user/data/export`) produces a ZIP whose `userdata.json` contains the account's live TOTP shared secret in plaintext. The export is a user-facing download that typically transits browsers, download folders, mailboxes and cloud backups — all of which then silently hold a working 2FA seed. Anyone obtaining the archive can generate valid one-time codes and defeat the account's second factor. Credential material must never appear in a data export; the password hash is correctly excluded, but the TOTP seed is not.

Credit: Ahmed Ibrahim (@skeletonsec)

Affected versions

  • Verified on `main` @ `9435f34` (4.2.0-alpha.2 nightly, `phpmyfaq/src/phpMyFAQ/Controller/Frontend/Api/UserController.php:176`)
  • Same defect verified on the `4.1` stable branch (`phpmyfaq/src/phpMyFAQ/Controller/Frontend/UserController.php:161`), affecting the latest stable release line.

Root cause

`exportUserData()` builds the export array including `'secret' => (string) $this->currentUser->getUserData('secret')` — the raw TOTP seed from `faquserdata` — with no redaction or field allowlist.

Proof of concept

  1. Enable 2FA for a test account.
  2. Log in (full 2FA), `GET /user/ucp`, take the `export-userdata` CSRF token.
  3. `curl -X POST https://target/api/user/data/export -b cookies -d 'pmf-csrf-token=T&userid=2' -o export.zip` → 200 `application/zip`.
  4. `unzip -p export.zip userdata.json` → contains `"secret": "<LIVE-TOTP-SEED>"` and `"twofactor_enabled": 1`. Codes derived from the exported seed were verified against the app's own TOTP library.

Impact

Persistent 2FA compromise for any user who has ever exported their data with 2FA enabled; the seed stays valid until 2FA is reset, long after the export is forgotten in a downloads folder or backup.

Suggested remediation

Remove `secret` from the export array and maintain an explicit allowlist of non-credential export fields (audit `faquserdata` columns such as `secret` and `webauthnkeys` against it).

CWE

CWE-200: Exposure of Sensitive Information

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:L
AltoBajoNinguno
Integridad (sistema)VI:N
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-xhgx-2wj8-g4pj

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