Impact: The library offers a function to generate an ed25519 key pair via Ed25519KeyIdentity.generate with an optional param to provide a 32 byte seed value, which will then be used as the secret key. When no seed value is provided, it is expected that the library generates the secret key using secure randomness. However, a recent change broke this guarantee and uses an insecure seed for key pair generation. Since the private key of this identity (535yc-uxytb-gfk7h-tny7p-vjkoe-i4krp-3qmcl-uqfgr-cpgej-yqtjq-rqe) is compromised, one could lose funds associated with the principal on ledgers or lose access to a canister where this principal is the controller.
The Ed25519KeyIdentity.generate function enables the generation of an ed25519 key pair with an optional 32-byte seed provided by the user. When the seed is not provided by the caller, the library should independently generate the private key using cryptographically secure randomness. Due to a bug introduced in one of the later code changes, the library began using a predictable, insecure seed, making the generated private keys deterministic and reproducible by an attacker. A known, compromised private key corresponds to a specific identity (535yc-uxytb-gfk7h-tny7p-vjkoe-i4krp-3qmcl-uqfgr-cpgej-yqtjq-rqe).
An attacker can reproduce the private key of an identity generated by the vulnerable library version, enabling them to take control of associated resources — including stealing funds from wallets (ledgers) and taking control of canisters for which the given identity is the controller.
Update the @dfinity/identity package to version 1.0.1 or newer, available on npm (https://www.npmjs.com/package/@dfinity/identity/v/1.0.1). Any key pairs generated by vulnerable library versions without providing a custom secure seed should be considered compromised and immediately replaced, and associated resources (funds, canister control) should be secured by changing the controller identity.
@dfinity/identity library (npm package) — versions in which the change breaking secure seed generation was introduced; the fix is available in version 1.0.1 according to references.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:NDfinity Icp Js Core
APPDfinity0.20.0 – 1.0.1 (excl.)
Related vulnerabilities
When a canister method is called via ic_cdk::call* , a new Future CallFuture is created and can be awaited by...
The Candid library causes a Denial of Service while parsing a specially crafted payload with 'empty' data typ...
Motoko's incremental garbage collector is impacted by an uninitialized memory access bug, caused by incorrect ...
When storing unbounded types in a BTreeMap, a node is represented as a linked list of "memory chunks". It was ...