5.2medium
`chainId` may be outdated if user changes chains as part of connection in @web3-react
- Severity
- 5.2medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.38% (higher than 33% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-8pf3-6fgr-3g3g
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
| Product or package | Versions | Reported by |
|---|---|---|
| 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 | CVE List |
| @web3-react/coinbase-wallet (npm) | from 6.0.0 before 8.0.35-beta.0 | GitHub Advisory Database |
| @web3-react/eip1193 (npm) | from 6.0.0 before 8.0.27-beta | GitHub Advisory Database |
| @web3-react/metamask (npm) | from 6.0.0 before 8.0.30-beta.0 | GitHub Advisory Database |
| @web3-react/walletconnect (npm) | from 6.0.0 before 8.0.37-beta.0 | GitHub Advisory Database |
| uniswap web3-react_coinbase-wallet | from 6.0.0 up to 6.2.14, 7.0.0, 7.0.1, 7.0.2, 8.0.22, 8.0.23, 8.0.24, 8.0.25 and 9 more | NVD |
| uniswap web3-react_eip1193 | from 6.0.0 up to 6.2.14, 7.0.0, 7.0.1, 7.0.2, 8.0.0, 8.0.1, 8.0.2, 8.0.3 and 23 more | NVD |
| uniswap web3-react_metamask | from 6.0.0 up to 6.2.14, 8.0.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4, 8.0.5, 8.0.6 and 23 more | NVD |
| uniswap web3-react_walletconnect | from 6.0.0 up to 6.2.14, 7.0.0, 7.0.1, 7.0.2, 8.0.0, 8.0.1, 8.0.2, 8.0.3 and 33 more | NVD |
All scores
| GitHub_M | 5.2medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:L |
| GitHub | 5.2medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:L |
| NVD | 5.7medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
@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.
GitHub Advisory Database
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 web3-react@8.0.x-beta.0 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
References
| https://github.com/Uniswap/web3-react/security/advisories/GHSA-8pf3-6fgr-3g3g | vendor-advisory, web | |
| https://github.com/Uniswap/web3-react/pull/749 | issue-tracking, patch, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2023-30543 | advisory | |
| https://github.com/Uniswap/web3-react | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-30543 changed 2025-02-05 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8pf3-6fgr-3g3g changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2023-30543 changed 2026-06-17 | Public domain |