Início
Tendências
Vulnerabilidades
Notícias
Pesquisadores
Por que dbugs?

Kyle Petryszak

#42676de 53,779
6.3CVSS total
Vulnerabilidades · 1
PT-2023-32941
6.3
2023-10-15
Cocoon · Cocoon · CVE-2024-21530
**Name of the Vulnerable Software and Affected Versions** cocoon versions prior to 0.4.0 **Description** The issue is related to Reusing a Nonce, Key Pair in Encryption when the `encrypt`, `wrap`, and `dump` functions are sequentially called. An attacker can generate the same ciphertext by creating a new encrypted message with the same cocoon object. This mostly affects `MiniCocoon` and `Cocoon` objects with custom seeds and RNGs, where `StdRng` is used under the hood. The issue does not affect objects created with `Cocoon::new`, which utilizes `ThreadRng`. The cause is that `StdRng` produces the same nonce because `StdRng::clone` resets its state. **Recommendations** For versions prior to 0.4.0, create a new cocoon object with a different seed per each `encrypt`, `wrap`, or `dump` call to mitigate the issue. As a temporary workaround, consider creating a new cocoon with a new seed for each encryption to minimize the risk of exploitation.