Live threats

All CVEs / cocoon

CVE-2024-21530cocoon

Medium 4.5

Priority
27
CVSS 3.1
4.5
EPSS
0.2%
probability of exploitation in 30 days · percentile 3
Auth required
Yes
Published
Oct 2, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-323
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for cocoon.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
crates.io cocoon < 0.4.0 0.4.0 cargo update -p cocoon --precise 0.4.0
crates.io cocoon ≥ 0.0.0-0 < 0.4.0 0.4.0 cargo update -p cocoon --precise 0.4.0

Per OSV / GitHub Advisories (GHSA-6878-6wc2-pf5h, RUSTSEC-2023-0068). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.