GitHub Advisoryadvisory · Maven

GHSA-3wfh-36rx-9537 Timing Attack Vulnerability in SCRAM Authentication

MEDIUM Published 2025-09-16 Modified 2026-01-23 Official page ↗
Aliases
CVE-2025-59432
Ecosystem
Maven
Packages
com.ongres.scram:scram-common
Severity
Moderate
CVSS vector
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
Weaknesses
CWE-208, CWE-385
Reviewed
2025-09-16

Affected packages

• Maven com.ongres.scram:scram-common: < 3.2 → fixed in 3.2

Description

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 • Java `MessageDigest.isEqual` Documentation)

Related

Alias · CVE (1)

  • CVE-2025-59432 SCRAM (Salted Challenge Response Authentication Mechanism) is part of the family of Simple Authentication and Security Layer (SASL, RFC… vulnerability

Weakness · CWE (2)

  • CWE-208 Observable Timing Discrepancy weakness
  • CWE-385 Covert Timing Channel weakness

References