CVE-2024-1631 json
agent-js: Insecure Key Generation in `Ed25519KeyIdentity.generate`
published 2024-02-21 2 y ago modified 2026-07-08 4 mo ago also GHSA-c9vv-fhgv-cjc3 , EUVD-2024-0614
- cvss
- 9.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.9%
- EPSS 0.9% chance of exploitation in 30 days, percentile 59%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- npm @dfinity/identity 1.0.1
- npm @dfinity/auth-client 1.0.1
- Internet Computer agent-js v1.0.1
- dfinity agent-js v1.0.1
- github.com/dfinity/agent-js#851 pull request
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- total
- Assessed
- 2 y ago
Exploit prediction
0.88% chance of exploitation in the next 30 days, higher than 59% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/dfinity/agent-js/security/advisories/GHSA-c9vv-fhgv-cjc3 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| npm | @dfinity/identity | >=0.20.0-beta.0, <1.0.1 |
1.0.1 |
| npm | @dfinity/auth-client | >=0.20.0-beta.0, <1.0.1 |
1.0.1 |
Affected products
- Internet Computer agent-js
- dfinity agent-js
Classification
References
-
github.com
/dfinity/agent-js/pull/851
web, issue-tracking, patch
-
github.com
/dfinity/agent-js/security/advisories/GHSA-c9vv-fhgv-cjc3
web, exploit, vendor-advisory
-
npmjs.com
/package/@dfinity/identity/v/1.0.1
web, product
-
github.com
/dfinity/agent-js
package, product
-
agent-js.icp.xyz
/identity/index.html
web, broken-link
-
nvd.nist.gov
/vuln/detail/CVE-2024-1631
advisory
Sources
- CVE List CVE-2024-1631
- GitHub Advisory GHSA-c9vv-fhgv-cjc3
- NVD CVE-2024-1631
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.