GitHub Advisoryadvisory · Maven

GHSA-w3hj-wr2q-x83g Discovery uses the same AES/GCM Nonce throughout the session

LOW Published 2021-04-06 Modified 2025-12-02 Official page ↗
Aliases
CVE-2024-23688
Ecosystem
Maven
Packages
tech.pegasys.discovery:discovery
Severity
Low
Weaknesses
CWE-323, CWE-330
Reviewed
2021-03-30

Affected packages

• Maven tech.pegasys.discovery:discovery: < 0.4.5 → fixed in 0.4.5

Description

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. From discovery spec: > 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.

Related

Alias · CVE (1)

  • CVE-2024-23688 Consensys Discovery versions less than 0.4.5 uses the same AES/GCM nonce for the entire session. vulnerability

Weakness · CWE (2)

  • CWE-323 Reusing a Nonce, Key Pair in Encryption weakness
  • CWE-330 Use of Insufficiently Random Values weakness

References