CRITICAL🇵🇱 Wersja polska

CVE-2024-1631

CVSS 9.1v3.1pub. 2024-02-21upd. 2025-12-10

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.

🤖 AI Analysis
How it works

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).

Impact

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.

Mitigation & patch

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.

Who is affected

@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.

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Dfinity Icp Js Core

    APP
    Dfinity
    0.20.0 – 1.0.1 (excl.)
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
CWE
References

Related vulnerabilities

CVE-2024-7884HIGH7.5same vendor

When a canister method is called via ic_cdk::call* , a new Future CallFuture is created and can be awaited by...

CVE-2023-6245HIGH7.5same vendor

The Candid library causes a Denial of Service while parsing a specially crafted payload with 'empty' data typ...

CVE-2024-11991MEDIUM5.6same vendor

Motoko's incremental garbage collector is impacted by an uninitialized memory access bug, caused by incorrect ...

CVE-2024-4435MEDIUM5.9same vendor

When storing unbounded types in a BTreeMap, a node is represented as a linked list of "memory chunks". It was ...