{"id":"CVE-2024-21530","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.","aliases":["GHSA-6878-6wc2-pf5h","GHSA-r2jw-c95q-rj29","RUSTSEC-2023-0068"],"modified":"2026-08-12T03:51:37.152615220Z","published":"2024-10-02T05:00:02.359Z","database_specific":{"unresolved_ranges":[{"extracted_events":[{"fixed":"0.4.0"}],"source":"AFFECTED_FIELD"},{"extracted_events":[{"fixed":"0.4.0"}],"source":"DESCRIPTION"}],"cna_assigner":"snyk","cwe_ids":["CWE-323"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21530.json"},"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"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/fadeevab/cocoon","events":[{"introduced":"0"},{"fixed":"1b6392173ce35db4736a94b62b2d2973f9a71441"}],"database_specific":{"source":"REFERENCES"}}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-21530.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N/E:P"}]}