Skip to content

CVE-2024-21530 Sequential calls of encryption API (`encrypt`, `wrap`, and `dump`) result in nonce reuse

MediumCVSS 4.5 EPSS 0.14%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial

Description

Versions of the package cocoon before 0.4.0 are vulnerable 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.

Note:
The issue does NOT affect objects created with Cocoon::new which utilizes ThreadRng.

Upgrade path

2 packages: 2 fixed.

PackageAffectedFixed inStatus
cocoon < 0.4.0 0.4.0 Fixed
crates.io cocoon(crates.io) < 0.4.0; >= 0.0.0-0, < 0.4.0 0.4.0 Fixed

Affected products

ProductAffected versionsFixed in
crates.io cocoon(crates.io) < 0.4.0 0.4.0
crates.io cocoon(crates.io) >= 0.0.0-0, < 0.4.0 0.4.0
cocoon < 0.4.0 0.4.0

References