CVEfocus › CVE database › CVE-2023-30543

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

CVSS 5.2 MediumEPSS 0.5% (higher than 33% of CVEs)Published 2023-04-17Updated 2025-02-05Assigner: GitHub_M

@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.

CWE-362

What to do

Fixed builds are available from npm: see the table below for the fixed version per release.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

4Fixed

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
npm library@web3-react/coinbase-walletFixed8.0.35-beta.0GHSA-8pf3-6fgr-3g3g
npm library@web3-react/eip1193Fixed8.0.27-betaGHSA-8pf3-6fgr-3g3g
npm library@web3-react/metamaskFixed8.0.30-beta.0GHSA-8pf3-6fgr-3g3g
npm library@web3-react/walletconnectFixed8.0.37-beta.0GHSA-8pf3-6fgr-3g3g

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.