CWE-323: Reusing a Nonce, Key Pair in Encryption
Description
Nonces should be used for the present occasion and only once.
- Abstraction
- BaseA weakness specific enough to point to detection and prevention methods.
- Likelihood of exploit
- High
- Status
- Incomplete
Common consequences
- 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.
Potential mitigations
- Implementation
Refuse to reuse nonce values.
- Implementation
Use techniques such as requiring incrementing, time based and/or challenge response to assure uniqueness of nonces.
Related weaknesses
Parent weaknesses
CAPEC attack patterns that exploit it
CWE 4.20 links no CAPEC attack pattern to this weakness.