CVE-2024-21530 json
Duplicate Advisory: cocoon Reuses a Nonce, Key Pair in Encryption
published 2023-10-15 3 y ago modified 2026-06-17 4 mo ago also GHSA-6878-6wc2-pf5h , GHSA-r2jw-c95q-rj29 , RUSTSEC-2023-0068 , EUVD-2024-3124
- cvss
- 4.5
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.1%
- EPSS 0.1% chance of exploitation in 30 days, percentile 3%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- crates.io cocoon 0.4.0
- n/a cocoon 0.4.0
- cocoon cocoon 0.4.0
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.14% chance of exploitation in the next 30 days, higher than 3% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 4.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N/E:P |
| CNA | 3.1 | 4.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N |
| OSV | 3.1 | 4.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 4.5 | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | cocoon | <0.4.0 >=0.0.0-0, <0.4.0 |
0.4.0 |
Affected products
- n/a cocoon
- cocoon cocoon
Classification
- Weakness
-
- CWE-323 Reusing a Nonce, Key Pair in Encryption
References
-
github.com
/fadeevab/cocoon/commit/1b6392173ce35db4736a94b62b2d2973f9a71441
web
-
security.snyk.io
/vuln/SNYK-RUST-COCOON-6028364
web
-
github.com
/fadeevab/cocoon/issues/22
web, report
-
rustsec.org
/advisories/RUSTSEC-2023-0068.html
web, advisory
-
github.com
/advisories/GHSA-6878-6wc2-pf5h
advisory
-
nvd.nist.gov
/vuln/detail/CVE-2024-21530
advisory
-
github.com
/fadeevab/cocoon
package
-
github.com
/fadeevab/cocoon/commit
package
-
crates.io
/crates/cocoon
package
Sources
- CVE List CVE-2024-21530
- GitHub Advisory GHSA-r2jw-c95q-rj29
- GitHub Advisory GHSA-6878-6wc2-pf5h
- NVD CVE-2024-21530
- OSV RUSTSEC-2023-0068
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.