6.6medium
Timing Attack Vulnerability in SCRAM Authentication
- Severity
- 6.6medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.73% (higher than 55% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-3wfh-36rx-9537
Description
SCRAM (Salted Challenge Response Authentication Mechanism) is part of the family of Simple Authentication and Security Layer (SASL, RFC 4422) authentication mechanisms. Prior to version 3.2, a timing attack vulnerability exists in the SCRAM Java implementation. The issue arises because Arrays.equals was used to compare secret values such as client proofs and server signatures. Since Arrays.equals performs a short-circuit comparison, the execution time varies depending on how many leading bytes match. This behavior could allow an attacker to perform a timing side-channel attack and potentially infer sensitive authentication material. All users relying on SCRAM authentication are impacted. This vulnerability has been patched in version 3.1 by replacing Arrays.equals with MessageDigest.isEqual, which ensures constant-time comparison.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| ongres scram | < 3.2 | CVE List |
| com.ongres.scram:scram-common (Maven) | before 3.2 | GitHub Advisory Database |
All scores
| GitHub_M | 6.6medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U |
Classification
What each source says
CVE List
SCRAM (Salted Challenge Response Authentication Mechanism) is part of the family of Simple Authentication and Security Layer (SASL, RFC 4422) authentication mechanisms. Prior to version 3.2, a timing attack vulnerability exists in the SCRAM Java implementation. The issue arises because Arrays.equals was used to compare secret values such as client proofs and server signatures. Since Arrays.equals performs a short-circuit comparison, the execution time varies depending on how many leading bytes match. This behavior could allow an attacker to perform a timing side-channel attack and potentially infer sensitive authentication material. All users relying on SCRAM authentication are impacted. This vulnerability has been patched in version 3.1 by replacing Arrays.equals with MessageDigest.isEqual, which ensures constant-time comparison.
GitHub Advisory Database
Impact
A timing attack vulnerability exists in the SCRAM Java implementation. The issue arises because Arrays.equals was used to compare secret values such as client proofs and server signatures. Since Arrays.equals performs a short-circuit comparison, the execution time varies depending on how many leading bytes match. This behavior could allow an attacker to perform a timing side-channel attack and potentially infer sensitive authentication material. All users relying on SCRAM authentication are impacted.
Patches
This vulnerability has been patched by replacing Arrays.equals with MessageDigest.isEqual, which ensures constant-time comparison.
Users should upgrade to version 3.2 or later to mitigate this issue.
Workarounds
Because the attack requires high precision and repeated attempts, the risk is limited, but the only reliable mitigation is to upgrade to a patched release (version 3.2 or later).
References
NVD (es)
SCRAM (Mecanismo de Autenticación de Respuesta a Desafío Salado) forma parte de la familia de mecanismos de autenticación de la Capa de Autenticación y Seguridad Simple (SASL, RFC 4422). Antes de la versión 3.2, existe una vulnerabilidad de ataque de temporización en la implementación Java de SCRAM. El problema surge porque se utilizó Arrays.equals para comparar valores secretos como pruebas del cliente y firmas del servidor. Dado que Arrays.equals realiza una comparación de cortocircuito, el tiempo de ejecución varía dependiendo de cuántos bytes iniciales coincidan. Este comportamiento podría permitir a un atacante realizar un ataque de canal lateral de temporización y potencialmente inferir material de autenticación sensible. Todos los usuarios que dependen de la autenticación SCRAM se ven afectados. Esta vulnerabilidad ha sido parcheada en la versión 3.1 al reemplazar Arrays.equals con MessageDigest.isEqual, lo que asegura una comparación de tiempo constante.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2025-59432 changed 2026-01-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-3wfh-36rx-9537 changed 2026-02-03 | CC-BY-4.0 |
| NVD | CVE-2025-59432 changed 2026-10-11 | Public domain |