Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS04NGMzLWo4cjItbWNtOM4AA5gp

@nfid/embed has compromised private key due to @dfinity/auth-client producing insecure session keys

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

Permalink: https://github.com/advisories/GHSA-84c3-j8r2-mcm8
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS04NGMzLWo4cjItbWNtOM4AA5gp
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Critical
Classification: General
Published: 9 months ago
Updated: 9 months ago


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

Identifiers: GHSA-84c3-j8r2-mcm8
References: Repository: https://github.com/dfinity/agent-js
Blast Radius: 0.0

Affected Packages

npm:@nfid/embed
Dependent packages: 1
Dependent repositories: 1
Downloads: 638 last month
Affected Version Ranges: >= 0.10.0, < 0.10.1-alpha.6
Fixed in: 0.10.1-alpha.6
All affected versions: 0.10.0, 0.10.1-alpha.0, 0.10.1-alpha.1, 0.10.1-alpha.2, 0.10.1-alpha.3, 0.10.1-alpha.4, 0.10.1-alpha.5
All unaffected versions: 0.2.0, 0.10.1, 0.10.2, 0.10.3