GHSA-vg44-fw64-cpjx

Suggest an improvement
Source
https://github.com/advisories/GHSA-vg44-fw64-cpjx
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/03/GHSA-vg44-fw64-cpjx/GHSA-vg44-fw64-cpjx.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-vg44-fw64-cpjx
Published
2020-03-24T15:08:59Z
Modified
2021-08-23T14:40:05Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Incorrect Account Used for Signing
Details

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) in version >=0.2.1 of eth-ledger-bridge-keyring, and in version >=0.2.2 of @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:

Database specific
{
    "cwe_ids": [
        "CWE-287"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2020-03-23T23:11:03Z",
    "nvd_published_at": null,
    "severity": "HIGH"
}
References

Affected packages

npm / eth-ledger-bridge-keyring

Package

Name
eth-ledger-bridge-keyring
View open source insights on deps.dev
Purl
pkg:npm/eth-ledger-bridge-keyring

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.2.1

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/03/GHSA-vg44-fw64-cpjx/GHSA-vg44-fw64-cpjx.json"

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

Package

Name
@metamask/eth-ledger-bridge-keyring
View open source insights on deps.dev
Purl
pkg:npm/%40metamask/eth-ledger-bridge-keyring

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.2.2

Database specific

source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/03/GHSA-vg44-fw64-cpjx/GHSA-vg44-fw64-cpjx.json"