llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Packagist · poweradmin/poweradmin

GHSA-PCX2-9RWJ-RJ4R

Account takeover via password reset due to collation-dependent email lookup (accent/case-insensitive) without normalization or byte-exact re-check

Parche disponible
Descargar PNG JSON
CVSS 3.1
7.7
Alta
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:L Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
Parche3 versiones4.2.7 · 4.3.6 · 4.4.2
Exposición32 dDesde la divulgación, 19 oct 2026, 10:32 p. m.
Detección30 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Modificada
Explotación
Remediación
Monitoreo
Detectada +1
20 oct 26
22 oct 26
19 nov 26
21 nov 26
20 oct 26
28 oct 26
5 nov 26
13 nov 26
21 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-PCX2-9RWJ-RJ4R divulgada · CVSS 7.7 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés
Summary

When `security.password_reset.enabled` is set to `true`, an unauthenticated attacker who controls a mailbox that differs from a victim's stored email address only by accents or letter case can receive the victim's password reset link and take over the victim's SQL-authenticated account, including superuser accounts.

On MySQL/MariaDB installations using the default accent- and case-insensitive collation (e.g. `utf8mb4_0900_ai_ci` on MySQL 8.x), `DbUserRepository::getUserByEmail()` resolves `WHERE users.email = :email` with that collation, so a submitted `jose@gmail.com` matches a stored `josé@gmail.com`. The reset email is sent to the submitted address (the attacker's mailbox) and `PasswordResetService::validateToken()` re-resolves the account using the same collation-dependent comparison without any byte-exact re-check.

The maintainer has already fixed this class of bug for username lookup (`DbUserRepository::findByUsername()`) and OIDC/SAML provisioning via `DbCompat::accentSensitiveEquals()` (see GHSA-cmwh-g2h8-c222), but the password reset flow was not covered.

Details

Code path:

  1. Public, unauthenticated endpoint POST `/password/forgot` (`ForgotPasswordController`, constructed with no authentication required). The submitted email is only trimmed and checked with `filter_var(FILTER_VALIDATE_EMAIL)`; no normalization (lowercasing or Unicode NFC) is applied before the lookup.
  2. `PasswordResetService::canUserResetPassword()` / `createResetRequest()` resolve the account via `DbUserRepository::getUserByEmail()`: `SELECT users.* ... WHERE users.email = :email LIMIT 1`, a plain comparison whose result depends on the column collation. The `users.email` column is declared without an explicit COLLATE (`sql/poweradmin-mysql-db-structure.sql`), so it inherits the server default, which is accent-insensitive and case-insensitive on MySQL 8.x (`utf8mb4_0900_ai_ci`) and MariaDB (`uca1400_ai_ci`).
  3. The token row stores the submitted email and the reset link is sent to that address: `sendResetEmail($email, ...)` where `$email` is the attacker-submitted value. No user id is embedded in the link; account resolution happens at validation time.
  4. On `/password/reset?token=...`, `validateToken()` re-runs `getUserByEmail($tokenData['email'])` (same collation-dependent comparison). The only guards are `countUsersByEmail(...) > 1` (also collation-dependent, equals 1 in this scenario) and the external auth method check. There is no byte-exact re-check of the stored email against the token's email.
  5. `resetPassword()` then runs `UPDATE users SET password = ? WHERE id = ?` on the victim's row.

Verified empirically with mysql:8.4 using the exact schema from `sql/poweradmin-mysql-db-structure.sql`: inserting a user with email `josé@gmail.com`, then running `SELECT id FROM users WHERE email = 'jose@gmail.com';` returns that user's row (same for case variants). On PHP 8.3/8.4, `filter_var('josé@gmail.com', FILTER_VALIDATE_EMAIL)` is `false`, so the attacker submits the ASCII variant while the stored victim email may be accented.

PoC

Preconditions: `security.password_reset.enabled = true`; MySQL/MariaDB backend with default collation; victim account using SQL auth (`auth_method='sql'`) whose stored email has an ownable accent or case variant (e.g. `josé@gmail.com`).

  1. The attacker owns the mailbox `jose@gmail.com` and submits the public `/password/forgot` form with `email=jose@gmail.com`.
  2. The lookup resolves the victim's row; a token is created for `jose@gmail.com` and the reset link is emailed to `jose@gmail.com` (the attacker).
  3. The attacker opens `/password/reset?token=...`; validation re-resolves the victim's row (count guard = 1, auth method = sql) and accepts the token.
  4. The attacker sets a new password; the victim's account password is updated.
  5. The attacker logs in with the victim's username and the new password: full session, including superuser if the victim is one (no superuser exclusion exists in this flow).
Impact

Unauthenticated account takeover of any SQL-authenticated account whose stored email has an ownable variant, including superusers. With a superuser account: full control of Poweradmin and of all managed DNS zones (MX/SPF/DKIM hijack, ACME records, user management).

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

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:H
BajaAlta
PrivilegiosPR:N
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:H
AltoBajoNinguno
IntegridadI:H
AltoBajoNinguno
DisponibilidadA:L
AltoBajoNinguno
Score de explotaciónQué tan fácil y probable es que la exploten
7.1/ 10Alto
Vector 7.1 (fácil) · sin evidencia de explotación.
Versiones

Rangos afectados

Afectada Corregida
poweradmin/poweradmin≥ 4.0.0 < 4.2.7
poweradmin/poweradmin≥ 4.3.0 < 4.3.6
poweradmin/poweradmin≥ 4.4.0 < 4.4.2
4.0.0
4.2.7
4.3.0
4.3.6
4.4.0
4.4.2
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
Packagistpoweradmin/poweradmin
Corregida 4.2.7, 4.3.6, 4.4.2 — —
Versiones corregidas4.2.74.3.64.4.2
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/poweradmin/poweradmin/security/advisories/GHSA-pcx2-9rwj-rj4r

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