Vulnerability · Published Apr 17, 2023 · Assigned by GitHub_M

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

Medium 5.2

In plain English

A medium-severity race condition in web3-react from Uniswap. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 32% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.2Medium
Exploit odds (30 days)0.4%top 68.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

@web3-react is a framework for building Ethereum Apps . In affected versions the `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 issue has been addressed in PR #749 and is available in updated npm artifacts. There are no known workarounds for this issue. Users are advised to upgrade.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npm@web3-react/coinbase-wallet8.0.35-beta.0GHSA-8pf3-6fgr-3g3g
npm@web3-react/eip11938.0.27-betaGHSA-8pf3-6fgr-3g3g
npm@web3-react/metamask8.0.30-beta.0GHSA-8pf3-6fgr-3g3g
npm@web3-react/walletconnect8.0.37-beta.0GHSA-8pf3-6fgr-3g3g

Affected products (as reported)

VendorProductVersions
Uniswap web3-react @web3-react/coinbase-wallet: >= 6, < 8.0.35-beta.0@web3-react/eip1193: >= 6, < 8.0.27-beta.0@web3-react/metamask: >= 6, < 8.0.30-beta.0@web3-react/walletconnect: >= 6, < 8.0.37-beta.0

Weakness: CWE-362 · Vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:L

References