Lucene search

K
githubGitHub Advisory DatabaseGHSA-8PF3-6FGR-3G3G
HistoryApr 18, 2023 - 10:29 p.m.

`chainId` may be outdated if user changes chains as part of connection in @web3-react

2023-04-1822:29:53
CWE-362
GitHub Advisory Database
github.com
9
web3-react
outdated
chainid
connection
ethers
upgrade

5.7 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

HIGH

Availability Impact

NONE

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

0.001 Low

EPSS

Percentile

29.7%

Impact

chainId may be outdated if the user changes chains as part of the connection flow. This means that the value of chainId returned by useWeb3React() may be incorrect. In an application, this means that any data derived from chainId could be incorrect.

For example, if a swapping application derives a wrapped token contract address from the chainId and a user has changed chains as part of their connection flow the application could cause the user to send funds to the incorrect address when wrapping. This is a common approach when using other foundational libraries like ethers, and most users of v8 will want to upgrade past the affected versions.

Patches

Patched in https://github.com/Uniswap/web3-react/pull/749.
Users of [email protected] should upgrade to at least:

  • @web3-react/coinbase-wallet@^8.0.35-beta.0
  • @web3-react/eip1193@^8.0.27-beta.0
  • @web3-react/metamask@^8.0.30-beta.0
  • @web3-react/walletconnect@^8.0.37-beta.0

Workarounds

N/A

References

N/A

Affected configurations

Vulners
Node
web3-reactwalletconnectRange6.0.0
OR
web3-reactwalletconnectRange<8.0.37-beta.0
OR
web3-reactmetamaskRange6.0.0
OR
web3-reactmetamaskRange<8.0.30-beta.0
OR
web3-reacteip1193Range6.0.0
OR
web3-reacteip1193Range<8.0.27-beta.0
OR
web3-reactcoinbase-walletRange6.0.0
OR
web3-reactcoinbase-walletRange<8.0.35-beta.0

5.7 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

HIGH

Availability Impact

NONE

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

0.001 Low

EPSS

Percentile

29.7%

Related for GHSA-8PF3-6FGR-3G3G