{"id":"CVE-2024-21530","published":"2024-10-02T05:00:02Z","modified":"2024-10-02T13:42:12Z","title":"Versions of the package cocoon before 0.4.0 are vulnerable to Reusing a Nonce, Key Pair in Encryption when the…","vendor":null,"product":null,"tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N/E:P","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00165,"percentile":0.03173,"provenance":"source"},"cwes":[{"id":"CWE-323","name":"Reusing a Nonce, Key Pair in Encryption"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-RUST-COCOON-6028364","tags":[]},{"url":"https://github.com/fadeevab/cocoon/issues/22","tags":[]},{"url":"https://github.com/fadeevab/cocoon/commit/1b6392173ce35db4736a94b62b2d2973f9a71441","tags":[]},{"url":"https://rustsec.org/advisories/RUSTSEC-2023-0068.html","tags":[]},{"url":"https://github.com/advisories/GHSA-6878-6wc2-pf5h","tags":[]}],"priority":{"score":3.8,"factors":[{"name":"EPSS percentile","points":0.63},{"name":"CVSS severity","points":3.15}]},"affectedVersions":[{"vendor":"n/a","product":"cocoon","versions":["< 0.4.0"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2024-10-02T13:38:37.583035Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"cocoon","vulnerableRanges":["<0.4.0",">=0.0.0-0, <0.4.0"],"patched":["0.4.0"],"from":["GHSA-6878-6wc2-pf5h","RUSTSEC-2023-0068"],"provenance":"source"}],"summary":{"text":"The flaw is a nonce and key pair reuse in encryption within the cocoon package (versions before 0.4.0), occurring when the encrypt, wrap, and dump functions are called sequentially on the same cocoon object. An attacker who can reach the affected code path can produce identical ciphertext by creating a new encrypted message with that same object, and this does not apply to objects created with Cocoon::new, which uses ThreadRng.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:22:15Z"},"euvd":{"id":"EUVD-2024-3124","exploited":false,"provenance":"source"}}