Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @nfid/embed
  4. ›
  5. GHSA-84c3-j8r2-mcm8

GHSA-84c3-j8r2-mcm8: @nfid/embed has compromised private key due to @dfinity/auth-client producing insecure session keys

February 26, 2024

Problem

User sessions in the @nfid/embed SDK with Ed25519 keys are vulnerable due to a compromised private key 535yc-uxytb-gfk7h-tny7p-vjkoe-i4krp-3qmcl-uqfgr-cpgej-yqtjq-rqe. This exposes users to potential loss of funds on ledgers and unauthorized access to canisters they control.

Solution

Using version >1.0.1 of @dfinity/auth-client and @dfinity/identity packages, or @nfid/embed >0.10.1-alpha.6 includes patched versions of the issue.

User sessions will be automatically fixed when they re-authenticate.

Why this happened

The DFINITY auth client library provides a function, Ed25519KeyIdentity.generate, for generating an Ed25519 key pair. This function includes an optional parameter to supply a 32-byte seed value, which will be utilized as the secret key. In cases where no seed value is provided, the library is expected to generate the secret key using secure randomness. However, a recent update of DFINITY libraries has compromised this assurance by employing an insecure seed for key pair generation.

References

AgentJS CVE

References

  • github.com/advisories/GHSA-84c3-j8r2-mcm8
  • github.com/dfinity/agent-js/security/advisories/GHSA-c9vv-fhgv-cjc3
  • github.com/internet-identity-labs/sdk-ts
  • github.com/internet-identity-labs/sdk-ts/security/advisories/GHSA-84c3-j8r2-mcm8

Code Behaviors & Features

Detect and mitigate GHSA-84c3-j8r2-mcm8 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.10.0 before 0.10.1-alpha.6

Fixed versions

  • 0.10.1-alpha.6

Solution

Upgrade to version 0.10.1-alpha.6 or above. *Note*: 0.10.1-alpha.6 may be an unstable version. Use caution.

Impact 9.1 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Learn more about CVSS

Weakness

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

Source file

npm/@nfid/embed/GHSA-84c3-j8r2-mcm8.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:10 +0000.