@dfinity/identity@0.21.4 vulnerabilities

JavaScript and TypeScript library to manage identity with the Internet Computer

Direct Vulnerabilities

Known vulnerabilities in the @dfinity/identity package. This does not include vulnerabilities belonging to this package’s dependencies.

Automatically find and fix vulnerabilities affecting your projects. Snyk scans for vulnerabilities and provides fixes for free.
Fix for free
Vulnerability Vulnerable Version
  • C
Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

@dfinity/identity is a JavaScript and TypeScript library to manage identity with the Internet Computer

Affected versions of this package are vulnerable to Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) due to the use of an insecure seed for key pair generation in the Ed25519KeyIdentity.generate function. An attacker can compromise the private key of an identity, potentially leading to loss of funds associated with the principal on ledgers or loss of access to a canister where this principal is the controller.

Note:

This is only exploitable if the optional parameter to provide a 32 byte seed value is not used, leading to the generation of a key pair with an insecure seed.

How to fix Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)?

Upgrade @dfinity/identity to version 1.0.1 or higher.

>=0.20.0-beta.0 <1.0.1