Vulnerabilities in pkg:npm/@metamask/eth-ledger-bridge-keyring

PACKAGE
Advisory Summary

GHSA-vg44-fw64-cpjx is a HIGH (CVSS 7.5) incorrect account used for signing vulnerability (CWE-287: Improper Authentication) affecting Eth ledger bridge keyring libraries in the npm ecosystem. The issue involves incorrect account used for signing. Remediation is available by upgrading affected packages to version 0.2.1, 0.2.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@metamask/eth-ledger-bridge-keyring

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@metamask/eth-ledger-bridge-keyring. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-vg44-fw64-cpjx - HIGH Incorrect Account Used for Signing

GHSA-vg44-fw64-cpjx at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-vg44-fw64-cpjx
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-287: Improper Authentication
Affected Product Eth ledger bridge keyring
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix GHSA-vg44-fw64-cpjx

To remediate this vulnerability, upgrade all affected Eth ledger bridge keyring dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

eth-ledger-bridge-keyring fixed: 0.2.1
npm install eth-ledger-bridge-keyring@0.2.1
@metamask/eth-ledger-bridge-keyring fixed: 0.2.2
npm install @metamask/eth-ledger-bridge-keyring@0.2.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls eth-ledger-bridge-keyring

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-vg44-fw64-cpjx, inspect your project dependencies using npm:

npm ls eth-ledger-bridge-keyring

Analyze the terminal output to locate any version of Eth ledger bridge keyring in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.1), your application is affected.

Note: The npm ls eth-ledger-bridge-keyring command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. In Eth ledger bridge keyring, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Anybody using this library to sign with a BIP44 account other than the first account may be affected. If a user is signing with the first account (i.e. the account at index `0`), or with the legacy MEW/MyCrypto HD path, they are not affected. The vulnerability impacts cases where the user signs a personal message or transaction without first adding the account. This includes cases where the user has already added the account in a previous session (i.e. they added the account, reset the application, then signed something). The serialization/deserialization process does restore a previously added account, but it doesn't restore the index instructing the keyring to use that account for signing. As a result, after serializing then deserializing the keyring state, the account at index `0` is always used for signing even if it isn't the current account. ### Patches This has been patched ([#14](https://github.com/MetaMask/eth-ledger-bridge-keyring/pull/14)) in version >=0.2.1 of [`eth-ledger-bridge-keyring`](https://www.npmjs.com/package/eth-ledger-bridge-keyring), and in version >=0.2.2 of [`@metamask/eth-ledger-bridge-keyring`](https://www.npmjs.com/package/@metamask/eth-ledger-bridge-keyring). Users are encouraged to migrate to the new package name. ### Workarounds To work around this problem without updating, you should remove then re-add the account before use. As long as the account was added during the lifetime of that process, signing with that account should work correctly. ### For more information If you have any questions or comments about this advisory: * Open an issue in [MetaMask/eth-ledger-bridge-keyring on GitHub](https://github.com/MetaMask/eth-ledger-bridge-keyring) * Email the MetaMask team at [hello@metamask.io](mailto:hello@metamask.io)

GHSA-vg44-fw64-cpjx Affected Eth ledger bridge keyring Versions

2 component(s)
Fixed Versions:
0.2.10.2.2
Product / Package Ecosystem Affected Versions Fixed Version
eth-ledger-bridge-keyring
npm
< 0.2.1
0.2.1
@metamask/eth-ledger-bridge-keyring
npm
< 0.2.2
0.2.2

References

Frequently Asked Questions

What is GHSA-vg44-fw64-cpjx?
GHSA-vg44-fw64-cpjx is a security vulnerability in Eth ledger bridge keyring involving Incorrect Account Used for Signing under CWE-287: Improper Authentication.
Which Eth ledger bridge keyring versions are affected?
Affected versions include releases prior to 0.2.1, 0.2.2 across affected packages: eth-ledger-bridge-keyring, @metamask/eth-ledger-bridge-keyring.
What version fixes GHSA-vg44-fw64-cpjx?
Upgrading to 0.2.1, 0.2.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is eth-ledger-bridge-keyring affected?
Yes, eth-ledger-bridge-keyring is affected in releases prior to 0.2.1. Upgrade your dependency to 0.2.1 or later.
Is @metamask/eth-ledger-bridge-keyring affected?
Yes, @metamask/eth-ledger-bridge-keyring is affected in releases prior to 0.2.2. Upgrade your dependency to 0.2.2 or later.
What is the CVSS score of GHSA-vg44-fw64-cpjx?
GHSA-vg44-fw64-cpjx has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-vg44-fw64-cpjx?
GHSA-vg44-fw64-cpjx is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check npm dependencies for GHSA-vg44-fw64-cpjx?
Run the dependency tree command: 'npm ls eth-ledger-bridge-keyring'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-vg44-fw64-cpjx",
  "modified" : "2021-08-23T14:40:05Z",
  "published" : "2020-03-24T15:08:59Z",
  "aliases" : [ ],
  "summary" : "Incorrect Account Used for Signing",
  "details" : "### Impact\n\nAnybody using this library to sign with a BIP44 account other than the first account may be affected. If a user is signing with the first account (i.e. the account at index `0`), or with the legacy MEW/MyCrypto HD path, they are not affected.\n\nThe vulnerability impacts cases where the user signs a personal message or transaction without first adding the account. This includes cases where the user has already added the account in a previous session (i.e. they added the account, reset the application, then signed something). The serialization/deserialization process does restore a previously added account, but it doesn&#39;t restore the index instructing the keyring to use that account for signing. As a result, after serializing then deserializing the keyring state, the account at index `0` is always used for signing even if it isn&#39;t the current account.\n\n### Patches\n\nThis has been patched ([#14](https://github.com/MetaMask/eth-ledger-bridge-keyring/pull/14)) in version &gt;=0.2.1 of [`eth-ledger-bridge-keyring`](https://www.npmjs.com/package/eth-ledger-bridge-keyring), and in version &gt;=0.2.2 of [`@metamask/eth-ledger-bridge-keyring`](https://www.npmjs.com/package/@metamask/eth-ledger-bridge-keyring). Users are encouraged to migrate to the new package name.\n\n### Workarounds\n\nTo work around this problem without updating, you should remove then re-add the account before use. As long as the account was added during the lifetime of that process, signing with that account should work correctly.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [MetaMask/eth-ledger-bridge-keyring on GitHub](https://github.com/MetaMask/eth-ledger-bridge-keyring)\n* Email the MetaMask team at [hello@metamask.io](mailto:hello@metamask.io)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "eth-ledger-bridge-keyring"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@metamask/eth-ledger-bridge-keyring"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.2.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/MetaMask/eth-ledger-bridge-keyring/security/advisories/GHSA-vg44-fw64-cpjx"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MetaMask/eth-ledger-bridge-keyring/pull/14"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MetaMask/eth-ledger-bridge-keyring/commit/f32e529d13a53e55f558d903534d631846dc26ce"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-vg44-fw64-cpjx"
  }, {
    "type" : "WEB",
    "url" : "https://snyk.io/vuln/SNYK-JS-ETHLEDGERBRIDGEKEYRING-561121"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1497"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1498"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-03-23T23:11:03Z",
    "nvd_published_at" : null
  }
}