Skip to content
Heist/ feed
Back to feed
Medium

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

Type: advisorySources: OSV

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

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-30543
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 03:09 UTC · Revision 1

Source evidence

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

core-osv · Original source

Published 17 Apr 2023, 21:02 UTC

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

osv:CVE-2023-30543
Complete source record
{
  "id": "1472f9a352cbf54042509b1d5f1289ee27be424e022e2abbad9344e5bcc33bd4",
  "url": "https://osv.dev/vulnerability/CVE-2023-30543",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "`chainId` may be outdated if user changes chains as part of connection in @web3-react",
    "summary": "@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.",
    "evidence": "osv:CVE-2023-30543",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2023-30543",
      "aliases": [
        "CVE-2023-30543",
        "GHSA-8pf3-6fgr-3g3g"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/uniswap/web3-react",
              "type": "GIT",
              "events": [
                {
                  "introduced": "a4f7ba204abd4bac2f30c9361526d0250a86e705"
                },
                {
                  "last_affected": "17882f0e4279a8fa425f79b96a1536bbf292e1db"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:uniswap:web3-react_coinbase-wallet:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "6.0.0"
                      },
                      {
                        "last_affected": "6.2.14"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:uniswap:web3-react_eip1193:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "6.0.0"
                      },
                      {
                        "last_affected": "6.2.14"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:uniswap:web3-react_metamask:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "6.0.0"
                      },
                      {
                        "last_affected": "6.2.14"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:uniswap:web3-react_walletconnect:*:*:*:*:*:node.js:*:*",
                    "range": [
                      {
                        "introduced": "6.0.0"
                      },
                      {
                        "last_affected": "6.2.14"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v6.2.14",
            "v6.2.13",
            "v6.2.12",
            "v6.2.11",
            "v6.2.10",
            "v6.2.9",
            "v6.2.8",
            "v6.2.6",
            "v6.2.5",
            "v7.0.2-alpha.0",
            "v7.0.1-alpha.0",
            "v7.0.0-alpha.0",
            "v6.2.4",
            "v6.2.3",
            "v6.2.2",
            "v6.2.1",
            "v6.2.0",
            "v6.1.9",
            "v6.1.8",
            "v6.1.7",
            "v6.1.6",
            "v6.1.5",
            "v6.1.4",
            "v6.1.3",
            "v6.1.2",
            "v6.1.1",
            "v6.1.0",
            "v6.0.9",
            "v6.0.8",
            "v6.0.7",
            "v6.0.6",
            "v6.0.5",
            "v6.0.4",
            "v6.0.3",
            "v6.0.2",
            "v6.0.1",
            "v6.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-30543.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:33.015692531Z",
      "provider": "osv",
      "references": [
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/30xxx/CVE-2023-30543.json",
        "https://github.com/Uniswap/web3-react/security/advisories/GHSA-8pf3-6fgr-3g3g",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-30543",
        "https://github.com/Uniswap/web3-react/pull/749"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-362"
        ],
        "cna_assigner": "GitHub_M",
        "unresolved_ranges": [
          {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "@web3-react/coinbase-wallet: >= 6, < 8.0.35-beta.0"
                  },
                  {
                    "last_affected": "@web3-react/coinbase-wallet: >= 6, < 8.0.35-beta.0"
                  },
                  {
                    "introduced": "@web3-react/eip1193: >= 6, < 8.0.27-beta.0"
                  },
                  {
                    "last_affected": "@web3-react/eip1193: >= 6, < 8.0.27-beta.0"
                  },
                  {
                    "introduced": "@web3-react/metamask: >= 6, < 8.0.30-beta.0"
                  },
                  {
                    "last_affected": "@web3-react/metamask: >= 6, < 8.0.30-beta.0"
                  },
                  {
                    "introduced": "@web3-react/walletconnect: >= 6, < 8.0.37-beta.0"
                  },
                  {
                    "last_affected": "@web3-react/walletconnect: >= 6, < 8.0.37-beta.0"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandaloneSingleVersion"
              }
            ]
          }
        ],
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/30xxx/CVE-2023-30543.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-30543",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 499930,
  "published_at": "2023-04-17T21:02:20.566+00:00"
}