CVE-2025-59432: Scram common Timing Attack Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-3wfh-36rx-9537
CWE-385 CWE-208
Published
Advisory Summary

CVE-2025-59432 is a MODERATE timing attack vulnerability vulnerability (CWE-385: Covert Timing Channel) affecting Scram common libraries in the Maven ecosystem. The issue involves timing attack vulnerability in scram authentication. Remediation is available by upgrading affected packages to version 3.2.

CVE-2025-59432 at a Glance

CVE Identifier CVE-2025-59432
GHSA Identifier GHSA-3wfh-36rx-9537
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-385: Covert Timing Channel
Affected Product Scram common
Package Ecosystem Maven
Published Date
Last Updated

How to Fix CVE-2025-59432

To remediate this vulnerability, upgrade all affected Scram common dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

com.ongres.scram:scram-common fixed: 3.2
<dependency>
    <groupId>com.ongres.scram</groupId>
    <artifactId>scram-common</artifactId>
    <version>3.2</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=com.ongres.scram

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-59432, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=com.ongres.scram

Analyze the terminal output to locate any version of Scram common in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.2), your application is affected.

Note: The mvn dependency:tree -Dincludes=com.ongres.scram command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-385: Covert Timing Channel, where covert timing channels convey information by modulating some aspect of system behavior over time, so that the program receiving the information can observe system behavior and infer protected information. In Scram common, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/security/MessageDigest.html#isEqual(byte[],byte[]))

CVE-2025-59432 Affected Scram common Versions

1 component(s)
Fixed Versions:
3.2
Product / Package Ecosystem Affected Versions Fixed Version
com.ongres.scram:scram-common
Maven
< 3.2
3.2

References

Frequently Asked Questions

What is CVE-2025-59432?
CVE-2025-59432 is a security vulnerability in Scram common involving Timing Attack Vulnerability in SCRAM Authentication under CWE-385: Covert Timing Channel.
Which Scram common versions are affected?
Affected versions include releases prior to 3.2 across affected packages: com.ongres.scram:scram-common.
What version fixes CVE-2025-59432?
Upgrading to 3.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is scram-common affected?
Yes, com.ongres.scram:scram-common is affected in releases prior to 3.2. Upgrade your dependency to 3.2 or later.
What CWE is associated with CVE-2025-59432?
CVE-2025-59432 is classified under CWE-385: Covert Timing Channel (Covert timing channels convey information by modulating some aspect of system behavior over time, so that the program receiving the information can observe system behavior and infer protected information.).
How can I check Maven dependencies for CVE-2025-59432?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.ongres.scram'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-3wfh-36rx-9537",
  "modified" : "2026-01-23T17:28:00Z",
  "published" : "2025-09-16T22:20:08Z",
  "aliases" : [ "CVE-2025-59432" ],
  "summary" : "Timing Attack Vulnerability in SCRAM Authentication",
  "details" : "### Impact\n\nA 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.\n\n### Patches\n\nThis vulnerability has been patched by replacing `Arrays.equals` with `MessageDigest.isEqual`, which ensures constant-time comparison.\n\nUsers should upgrade to version **3.2** or later to mitigate this issue.\n\n### Workarounds\n\nBecause 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).\n\n### References\n\n- [Java `MessageDigest.isEqual` Documentation](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/security/MessageDigest.html#isEqual(byte[],byte[]))",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.ongres.scram:scram-common"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/ongres/scram/security/advisories/GHSA-3wfh-36rx-9537"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-59432"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/ongres/scram/commit/e0b0cf99f05406a0d26682c72fcb5728e95124b3"
  }, {
    "type" : "WEB",
    "url" : "https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/security/MessageDigest.html#isEqual(byte%5B%5D,byte%5B%5D)"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/ongres/scram"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-208", "CWE-385" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-16T22:20:08Z",
    "nvd_published_at" : "2025-09-22T20:15:38Z"
  }
}