agent-js: Insecure Key Generation in `Ed25519KeyIdentity.generate`
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-321.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Internet Computer | agent-js | v0.20.0-beta.0 to before v1.0.1 | v1.0.1 | Patch available | CNA |
| — | @dfinity/identity (npm) | 0.20.0-beta.0 to before 1.0.1 | 1.0.1 | Patch available | GHSA-c9vv-fhgv-cjc3 |
| — | @dfinity/auth-client (npm) | 0.20.0-beta.0 to before 1.0.1 | 1.0.1 | Patch available | GHSA-c9vv-fhgv-cjc3 |
- agent-js VendorInternet Computer Affected v0.20.0-beta.0 to before v1.0.1 Fixed in v1.0.1 Patch available CNA
- @dfinity/identity (npm) Vendor— Affected 0.20.0-beta.0 to before 1.0.1 Fixed in 1.0.1 Patch available GHSA-c9vv-fhgv-cjc3
- @dfinity/auth-client (npm) Vendor— Affected 0.20.0-beta.0 to before 1.0.1 Fixed in 1.0.1 Patch available GHSA-c9vv-fhgv-cjc3
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:dfinity:icp-js-core:*:*:*:*:*:node.js:*:* | 0.20.0 to before 1.0.1 | Vulnerable | Internet Computer |
- cpe:2.3:a:dfinity:icp-js-core:*:*:*:*:*:node.js:*:* Versions 0.20.0 to before 1.0.1 Vulnerable ·Internet Computer
Remediation
- Fix · CNA agent-js (Internet Computer) Fixed in v1.0.1
- Fix · GHSA-c9vv-fhgv-cjc3 @dfinity/identity (npm) Fixed in 1.0.1 Advisory →
- Fix · GHSA-c9vv-fhgv-cjc3 @dfinity/auth-client (npm) Fixed in 1.0.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-1631
- 2026-10-03 Alias added: GHSA-c9vv-fhgv-cjc3
References
Sources
- CVE-2024-1631 · CVE Program
- CVE-2024-1631 · NVD
- FIRST EPSS
- GHSA-c9vv-fhgv-cjc3 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences