CVE-2023-30543

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

State
Published
Severity
5.2 Medium
Published
Apr 17, 2023
Updated
Feb 5, 2025
Reserved
Apr 12, 2023

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.15.2 MediumCVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:LGitHub_M

Weaknesses

  • CWE-362 Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')

Affected Products

ProductVersions
web3-reactUniswap
  • @web3-react/coinbase-wallet: >= 6, < 8.0.35-beta.0Affected
  • @web3-react/eip1193: >= 6, < 8.0.27-beta.0Affected
  • @web3-react/metamask: >= 6, < 8.0.30-beta.0Affected
  • @web3-react/walletconnect: >= 6, < 8.0.37-beta.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.