GHSA-84c3-j8r2-mcm8

Suggest an improvement
Source
https://github.com/advisories/GHSA-84c3-j8r2-mcm8
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/02/GHSA-84c3-j8r2-mcm8/GHSA-84c3-j8r2-mcm8.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-84c3-j8r2-mcm8
Published
2024-02-26T20:10:10Z
Modified
2024-02-26T20:10:10Z
Severity
  • 9.1 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N CVSS Calculator
Summary
@nfid/embed has compromised private key due to @dfinity/auth-client producing insecure session keys
Details

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

Database specific
{
    "cwe_ids": [
        "CWE-321",
        "CWE-330"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2024-02-26T20:10:10Z",
    "nvd_published_at": null,
    "severity": "CRITICAL"
}
References

Affected packages

npm / @nfid/embed

Package

Name
@nfid/embed
View open source insights on deps.dev
Purl
pkg:npm/%40nfid/embed

Affected ranges

Type
SEMVER
Events
Introduced
0.10.0
Fixed
0.10.1-alpha.6

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/02/GHSA-84c3-j8r2-mcm8/GHSA-84c3-j8r2-mcm8.json"