Vulnerabilities in pkg:maven/tech.pegasys.discovery/discovery
PACKAGECVE-2024-23688 is a LOW discovery uses the same aes/gcm vulnerability (CWE-330: Use of Insufficiently Random Values) affecting Discovery libraries in the Maven ecosystem. The issue involves discovery uses the same aes/gcm nonce throughout the session. Remediation is available by upgrading affected packages to version 0.4.5.
pkg:maven/tech.pegasys.discovery/discovery
Vulnerability advisories affecting package pkg:maven/tech.pegasys.discovery/discovery. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-w3hj-wr2q-x83g | CVE-2024-23688 | LOW | Discovery uses the same AES/GCM Nonce throughout the session |
| GHSA-wp4m-7hpj-8qp8 | - | MODERATE | Duplicate Advisory: Discovery uses the same AES/GCM Nonce throughout the session |
CVE-2024-23688 at a Glance
How to Fix CVE-2024-23688
To remediate this vulnerability, upgrade all affected Discovery dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>tech.pegasys.discovery</groupId>
<artifactId>discovery</artifactId>
<version>0.4.5</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=tech.pegasys.discovery
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2024-23688, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=tech.pegasys.discovery
Analyze the terminal output to locate any version of Discovery in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.5), your application is affected.
Note: The mvn dependency:tree -Dincludes=tech.pegasys.discovery 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-330: Use of Insufficiently Random Values, where the product uses insufficiently random numbers or values in a security context that depends on unpredictable numbers. In Discovery, 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
CVE-2024-23688 Affected Discovery Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tech.pegasys.discovery:discovery
|
Maven |
< 0.4.5
|
0.4.5
|
References
Frequently Asked Questions
What is CVE-2024-23688?
Which Discovery versions are affected?
What version fixes CVE-2024-23688?
Is discovery affected?
What CWE is associated with CVE-2024-23688?
How can I check Maven dependencies for CVE-2024-23688?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w3hj-wr2q-x83g",
"modified" : "2025-12-02T01:28:16Z",
"published" : "2021-04-06T17:22:17Z",
"aliases" : [ "CVE-2024-23688" ],
"summary" : "Discovery uses the same AES/GCM Nonce throughout the session",
"details" : "Discovery uses the same AES/GCM Nonce throughout the session though it should be generated on per message basis which can lead to the leaking of the session key. As the actual ENR record is signed with a different key it is not possible for an attacker to alter the ENR record. Note that the node private key is not compromised, only the session key generated to communicate with an individual peer.\n\nFrom [discovery spec](https://github.com/ethereum/devp2p/blob/f97b8a5b8e9589d3355ebbd9d4a58d5d1644bdf7/discv5/discv5-theory.md#session-cache):\n> The number of messages which can be encrypted with a certain session key is limited because encryption of each message requires a unique nonce for AES-GCM. In addition to the keys, the session cache must also keep track of the count of outgoing messages to ensure the uniqueness of nonce values. Since the wire protocol uses 96 bit AES-GCM nonces, it is strongly recommended to generate them by encoding the current outgoing message count into the first 32 bits of the nonce and filling the remaining 64 bits with random data generated by a cryptographically secure random number generator.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "tech.pegasys.discovery:discovery"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.4.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/ConsenSys/discovery/security/advisories/GHSA-w3hj-wr2q-x83g"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-23688"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/ConsenSys/discovery"
}, {
"type" : "WEB",
"url" : "https://vulncheck.com/advisories/vc-advisory-GHSA-w3hj-wr2q-x83g"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-323", "CWE-330" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2021-03-30T17:04:34Z",
"nvd_published_at" : null
}
}