GHSA-W49G-F2JC-QXHG
SAML assertion replay via non-atomic nonce check and missing UNIQUE constraint
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-W49G-F2JC-QXHG divulgada | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
The SAML acs handler dedups replayed assertions with a check-then-insert pattern against the `saml_nonces` table. Two structural conditions removed the protection: the `saml_nonces.nonce` column carried a non-unique index rather than `UNIQUE`, and the check + insert straddled `Auth::login()` without a transaction. Two concurrent `POST /saml/acs` requests with the same captured assertion could both pass the count-zero check, both call `Auth::login()`, and both insert the nonce, yielding two parallel authenticated sessions for the victim from a single captured assertion.
Impact
An attacker who captured one valid SAML assertion (network-positioned MITM on the IdP-to-SP path, malicious browser extension, log or Referer leak) could replay it concurrently from two cookie jars and obtain multiple valid sessions for the same victim. Subsequent IdP-driven session revocation reaches only one of the sessions.
Affected
- `app/Http/Controllers/Auth/LoginController.php::loginViaSaml`
- `database/migrations/2024_01_24_145544_create_saml_nonce_table.php` (non-unique index)
Affected versions: `<= 8.4.1`.
Fix
Fixed in commit `5b0a779c07`. Application layer switched to insert-first-catch-on-duplicate around `Auth::login()`. Schema layer picked up a `unique('nonce')` constraint via `database/migrations/2026_05_05_125206_add_unique_index_to_nonces.php`, which runs `saml:clear_expired_nonces` before applying the constraint to purge stale rows.
Patched in `8.5.0` and later.
Conditions for exploitability
- SAML SSO enabled and configured (`saml_enabled = 1` with valid IdP metadata).
- The attacker can obtain a single valid SAML assertion for the victim.
- The attacker can submit the assertion twice within the race window (sub-second under realistic load).
References
- CWE-294 (Authentication Bypass by Capture-Replay)
- CWE-367 (Time-of-check Time-of-use)
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Estado del parche por paquete
La fuente no informa paquetes ni versiones corregidas.
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/grokability/snipe-it/security/advisories/GHSA-w49g-f2jc-qxhgLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
