CVE-2024-21530Versions of the package cocoon before 0.4.0 are vulnerable to Reusing a Nonce, Key Pair in Encryption when the encrypt, wrap, and dump…
- 4.5MediumCVSS base score
- 0.14%Exploitation in 30 daysEPSS · top 97% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- YesPublic exploitsa reference or SSVC says so
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.
Public exploit
An exploit or proof of concept is public: anyone can try it against an unpatched system. CISA's SSVC rates its exploitation: a proof of concept is public.
Timeline
ID reserved
By snyk
- 10 months later
· 10 months later
Published
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| snykCNA (assigner) | 3.1 | Medium4.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N/E:P |
| NVDNVD · Deferred | 3.1 | Medium4.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N |
- EPSS (exploitation in 30 days)
- 0.14% · top 97% of all CVEs (17 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 4.5.
Affected products
cocoon
- affected < 0.4.0
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- crates.iococoonGHSA-6878-6wc2-pf5h (opens in a new tab)
References
References5
- https://security.snyk.io/vuln/SNYK-RUST-COCOON-6028364 (opens in a new tab)
- https://github.com/fadeevab/cocoon/issues/22 (opens in a new tab)
- https://github.com/fadeevab/cocoon/commit/1b6392173ce35db4736a94b62b2d2973f9a71441 (opens in a new tab)
- https://rustsec.org/advisories/RUSTSEC-2023-0068.html (opens in a new tab)
- https://github.com/advisories/GHSA-6878-6wc2-pf5h (opens in a new tab)
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-3124 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-6878-6wc2-pf5h (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-21530)Record last updated .