CVE-2024-1631
What it is
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.
At a glance
- Exploitability
- Can be exploited over the network without logging in. High risk of data exposure, data tampering.
- Exploit odds
- 0.9% chance of exploitation in the next 30 days (EPSS).
- Fix
- A patch, advisory or fixed version is referenced. Upgrade or apply it.
Timeline
- PublishedDisclosed publicly on CVE.org and NVD
- Last updatedMost recent change to the record
Why it ranks here
- Exploited in the wild: no, CISA does not list it.
- Exploit odds: 0.9% in the next 30 days (EPSS).
- Severity: 9.1 CRITICAL (CVSS).
- Fix: a patch or advisory is linked.
Details
- Published
- Last modified
- Exploit probability
- 0.9% · EPSS, next 30 days
- Weakness
- CWE-321
- Record status
- Analyzed
Affected
- Dfinity icp-js-core < 1.0.1
Attack profile CVSS 3.1 · 9.1
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Raw vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Is it in your code?
Hand this to your coding agent. It searches your project for the affected products and checks versions. Nothing leaves your machine.
Read https://cve-list.com/agent/cve/CVE-2024-1631.md and follow it. Check whether this project is affected by CVE-2024-1631. Read only. Don't change anything and don't upload my code. Tell me yes, no or not sure, with the file as proof.
Fix and advisories
- https://github.com/dfinity/agent-js/pull/851
- https://github.com/dfinity/agent-js/security/advisories/GHSA-c9vv-fhgv-cjc3
- https://github.com/dfinity/agent-js/pull/851
- https://github.com/dfinity/agent-js/security/advisories/GHSA-c9vv-fhgv-cjc3
References
- https://agent-js.icp.xyz/identity/index.html
- https://github.com/dfinity/agent-js
- https://github.com/dfinity/agent-js/pull/851
- https://github.com/dfinity/agent-js/security/advisories/GHSA-c9vv-fhgv-cjc3
- https://www.npmjs.com/package/@dfinity/identity/v/1.0.1
- https://agent-js.icp.xyz/identity/index.html
- https://github.com/dfinity/agent-js
- https://github.com/dfinity/agent-js/pull/851
- https://github.com/dfinity/agent-js/security/advisories/GHSA-c9vv-fhgv-cjc3
- https://www.npmjs.com/package/@dfinity/identity/v/1.0.1