CWE-323 · Słabość
Reusing a Nonce, Key Pair in Encryption
- Abstrakcja
- Bazowa
- Status
- Niekompletny
- Ryzyko wykorzystania
- wysokie
- Dodano
- 19 lipca 2006
- Ostatnia zmiana
- 30 kwietnia 2026
Opis
Nonces should be used for the present occasion and only once.
Skutki
Access Control
Bypass Protection Mechanism; Gain Privileges or Assume Identity
Potentially a replay attack, in which an attacker could send the same data twice, could be crafted if nonces are allowed to be reused. This could allow a user to send a message which masquerades as a valid message from a valid user.
Zapobieganie
Implementation
Refuse to reuse nonce values.
Implementation
Use techniques such as requiring incrementing, time based and/or challenge response to assure uniqueness of nonces.
Przykłady podatności
- CVE-2024-36289 social networking app reuses a nonce/key pair, allowing MITM attackers to manipulate direct messages
- CVE-2024-21530 Rust package reuses a nonce/key pair when an object is cloned, which resets the random number generation
Słabość nadrzędna
Kiedy powstaje
- Architecture and Design — REALIZATION: This weakness is caused during implementation of an architectural security tactic.
Dotyczy
Not Language-Specific
Źródła
- The CLASP Application Security Process — Secure Software, Inc., 2005
Wpis z katalogu CWE 4.20.