Reusing a Nonce, Key Pair in Encryption Affecting cocoon package, versions <0.4.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.05% (18th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUST-COCOON-6028364
  • published30 Sept 2024
  • disclosed15 Oct 2023
  • creditKyle Petryszak

Introduced: 15 Oct 2023

CVE-2024-21530  (opens in a new tab)
CWE-323  (opens in a new tab)

How to fix?

Upgrade cocoon to version 0.4.0 or higher.

Overview

Affected versions of this package 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.

CVSS Scores

version 3.1