{"id":"CVE-2024-21530","aliases":["GHSA-6878-6wc2-pf5h","GHSA-r2jw-c95q-rj29","RUSTSEC-2023-0068"],"url":"https://o3.security/vulnerability/CVE-2024-21530","summary":"Sequential calls of encryption API (`encrypt`, `wrap`, and `dump`) result in nonce reuse","details":"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.\r\r**Note:**\rThe issue does NOT affect objects created with Cocoon::new which utilizes ThreadRng.","published":"2024-10-02T05:00:02.359Z","modified":"2026-07-15T01:49:05.553804005Z","cvss":{"score":4.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N/E:P"},"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"crates.io","name":"cocoon","fixedVersion":"0.4.0"}],"fix":{"url":"https://github.com/fadeevab/cocoon/commit/1b6392173ce35db4736a94b62b2d2973f9a71441","label":"fadeevab/cocoon@1b63921"},"references":[{"type":"WEB","url":"https://security.snyk.io/vuln/SNYK-RUST-COCOON-6028364"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21530.json"},{"type":"ADVISORY","url":"https://github.com/advisories/GHSA-6878-6wc2-pf5h"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21530"},{"type":"ADVISORY","url":"https://rustsec.org/advisories/RUSTSEC-2023-0068.html"},{"type":"REPORT","url":"https://github.com/fadeevab/cocoon/issues/22"},{"type":"FIX","url":"https://github.com/fadeevab/cocoon/commit/1b6392173ce35db4736a94b62b2d2973f9a71441"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-15T01:49:05.553804005Z"}}