CWE-323: Reusing a Nonce, Key Pair in Encryption
BaseLikelihood of exploit: High
Nonces should be used for the present occasion and only once.
Consequences
- Access Control: Bypass Protection Mechanism, Gain Privileges or Assume Identity
How to prevent it
- Implementation: Refuse to reuse nonce values.
- Implementation: Use techniques such as requiring incrementing, time based and/or challenge response to assure uniqueness of nonces.
Recent advisories
- GHSA-qv2q-c278-pch5 — ImageMagick: Information Disclosure in PasskeyEncipherImage via AES-CTR nonce reuse
- GHSA-xr5h-phrj-8vxv — Astro: Server island encrypted parameters vulnerable to cross-component replay
- GHSA-574f-3g2m-x479 — Bouncy Castle for Java GOST 28147 CTR mode reuses keystream after 255 blocks
- GHSA-v84f-6r39-cpfc — HashiCorp Vault Improper Input Validation vulnerability
- GHSA-qp4f-2w67-c8hw — Inbound TCP Agent Protocol/3 authentication bypass in Jenkins
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor