Skip to content
Fencer Vulns
critical 9.1

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

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

Weakness
  • CWE-321 Use of Hard-coded Cryptographic Key
  • CWE-330 Use of Insufficiently Random Values

References

Sources

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.