CVE-2023-30543
JSON

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 packageVersionsReported 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.0CVE List
@web3-react/coinbase-wallet (npm)from 6.0.0 before 8.0.35-beta.0GitHub Advisory Database
@web3-react/eip1193 (npm)from 6.0.0 before 8.0.27-betaGitHub Advisory Database
@web3-react/metamask (npm)from 6.0.0 before 8.0.30-beta.0GitHub Advisory Database
@web3-react/walletconnect (npm)from 6.0.0 before 8.0.37-beta.0GitHub Advisory Database
uniswap web3-react_coinbase-walletfrom 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 moreNVD
uniswap web3-react_eip1193from 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 moreNVD
uniswap web3-react_metamaskfrom 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 moreNVD
uniswap web3-react_walletconnectfrom 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 moreNVD

All scores

GitHub_M5.2medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:L
GitHub5.2medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:L
NVD5.7medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:N/I:H/A:N

Classification

CWE-362

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

Sources

SourceRecordLicence
CVE ListCVE-2023-30543 changed 2025-02-05CVE Terms of Use
GitHub Advisory DatabaseGHSA-8pf3-6fgr-3g3g changed 2023-11-08CC-BY-4.0
NVDCVE-2023-30543 changed 2026-06-17Public domain