CVE-2023-30543 `chainId` may be outdated if user changes chains as part of connection in @web3-react
Outdated chainId during connection flow may cause applications to send funds to incorrect addresses, requiring users to upgrade the library.
- Exploited in the wild
- Not known
- Login needed
- An administrator
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2023-30543?
CVE-2023-30543 is a medium-severity vulnerability in Uniswap web3-react, published on 17 Apr 2023. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
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.
Weakness: CWE-362
Which versions are affected by CVE-2023-30543?
8 open source packages ship an affected version, including @web3-react/coinbase-wallet, @web3-react/eip1193 and @web3-react/metamask. It affects 4 products.
| Package | Affected | Fixed in |
|---|---|---|
@web3-react/coinbase-wallet npm | From 6.0.0 | 8.0.35-beta.0 |
@web3-react/coinbase-wallet npm | From 6.0.0 | 8.0.35-beta.0 |
@web3-react/eip1193 npm | From 6.0.0 | 8.0.27-beta |
@web3-react/eip1193 npm | From 6.0.0 | 8.0.27-beta |
@web3-react/metamask npm | From 6.0.0 | 8.0.30-beta.0 |
@web3-react/metamask npm | From 6.0.0 | 8.0.30-beta.0 |
2 more packages
@web3-react/walletconnect npm | From 6.0.0 | 8.0.37-beta.0 |
@web3-react/walletconnect npm | From 6.0.0 | 8.0.37-beta.0 |
Products include Uniswap Web3-React Coinbase-Wallet, Uniswap Web3-React Eip1193, Uniswap Web3-React Metamask, Uniswap Web3-React Walletconnect.
How do I fix CVE-2023-30543?
Upgrade @web3-react/coinbase-wallet to 8.0.35-beta.0 or later.
Is CVE-2023-30543 being exploited?
There is no known exploitation of CVE-2023-30543 in the wild and no public exploit code.
Sources
Also known as GHSA-8pf3-6fgr-3g3g.