{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-21530","id":"CVE-2024-21530","title":"Sequential calls of encryption API (`encrypt`, `wrap`, and `dump`) result in nonce reuse","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.\r\r**Note:**\rThe issue does NOT affect objects created with Cocoon::new which utilizes ThreadRng.","descriptionLong":"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","updated":"2026-10-28T02:31:14.234437764Z","reserved":"2023-12-22T12:33:20.122Z","status":"Deferred","rejected":false,"assigner":"snyk","metric":{"version":"3.1","score":4.5,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N/E:P","rating":"medium","source":"snyk"},"metrics":[{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N","rating":"medium","source":"GitHub"},{"version":"3.1","score":4.5,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N/E:P","rating":"medium","source":"snyk"},{"version":"3.1","score":4.5,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N","rating":"medium","source":"snyk.io"},{"version":"3.1","score":4.5,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N/E:P","rating":"medium","source":"OSV"},{"version":"3.1","score":4.5,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N","rating":"medium","source":"GitHub"},{"version":"3.1","score":4.5,"vector":"CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:L/I:L/A:N","rating":"medium","source":"OSV"}],"rating":"medium","products":["cocoon"],"affectedProducts":[{"vendor":"n/a","product":"cocoon","defaultStatus":null,"versions":[{"version":"0","lessThan":"0.4.0","status":"affected","versionType":"semver"}],"platforms":[]}],"packages":[{"ecosystem":"crates.io","name":"cocoon","purl":"pkg:cargo/cocoon","ranges":["<0.4.0",">=0.0.0-0 <0.4.0"],"fixed":["0.4.0"],"advisory":"GHSA-6878-6wc2-pf5h"}],"cwes":["CWE-323"],"aliases":["GHSA-6878-6wc2-pf5h","GHSA-r2jw-c95q-rj29","RUSTSEC-2023-0068"],"references":[{"url":"https://security.snyk.io/vuln/SNYK-RUST-COCOON-6028364","tags":["web"]},{"url":"https://github.com/fadeevab/cocoon/issues/22","tags":["report","web"]},{"url":"https://github.com/fadeevab/cocoon/commit/1b6392173ce35db4736a94b62b2d2973f9a71441","tags":["fix","web"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2023-0068.html","tags":["advisory","web"]},{"url":"https://github.com/advisories/GHSA-6878-6wc2-pf5h","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21530.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21530","tags":["advisory"]},{"url":"https://github.com/fadeevab/cocoon/commit","tags":["package"]},{"url":"https://github.com/fadeevab/cocoon","tags":["package"]},{"url":"https://crates.io/crates/cocoon","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial"},"epss":0.0014,"epssPercentile":0.0345,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-21530","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21530","ok":true,"note":"Deferred"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-21530","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-6878-6wc2-pf5h","ok":true,"note":"GHSA-6878-6wc2-pf5h"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-r2jw-c95q-rj29","ok":true,"note":"GHSA-r2jw-c95q-rj29"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-21530","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}