CVE-2024-1631
CRITICAL 9.1CVSS 3.1agent-js: Insecure Key Generation in `Ed25519KeyIdentity.generate`
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.
- Published
- 21 Feb 2024
- Last modified
- 8 Jul 2026
- Assigned by
- 6b35d637-e00f-4228-858c-b20ad6e1d07b
- NVD status
- Analyzed
- Weakness
- CWE-321CWE-330
- Also known as
- GHSA-c9vv-fhgv-cjc3
- Sources
- NVDJSONOSV GHSA-c9vv-fhgv-cjc3JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | 6b35d637-e00f-4228-858c-b20ad6e1d07b (Secondary) | CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | CRITICAL 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | dfinity | icp-js-corecpe:2.3:a:dfinity:icp-js-core:*:*:*:*:*:node.js:*:* |
>= 0.20.0, < 1.0.1 | 1.0.1 |
| OSV | npm | @dfinity/identity | >= 0.20.0-beta.0, < 1.0.1 | 1.0.1 |
| OSV | npm | @dfinity/auth-client | >= 0.20.0-beta.0, < 1.0.1 | 1.0.1 |
References
- https://agent-js.icp.xyz/identity/index.html · Broken Link, WEB
- https://github.com/dfinity/agent-js · Product, PACKAGE
- https://github.com/dfinity/agent-js/pull/851 · Issue Tracking, Patch, WEB
- https://github.com/dfinity/agent-js/security/advisories/GHSA-c9vv-fhgv-cjc3 · Exploit, Vendor Advisory, WEB
- https://www.npmjs.com/package/@dfinity/identity/v/1.0.1 · Product, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-1631 · ADVISORY
History
- 25 Nov 2026 20:54 UTC · NVD: first stored (published 21 Feb 2024)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 21 Feb 2024)