{"id":"GHSA-cvj7-5f3c-9vg9","summary":"AttesterSlashing number overflow","details":"### Impact\n\nPossible consensus split given maliciously-crafted `AttesterSlashing` or `ProposerSlashing` being included on-chain.\n\nSince we represent `uint64` values as native javascript `number`s, there is an issue when those variables with large (greater than 2^53) `uint64` values are included on chain. In those cases, Lodestar may view _valid_ `AttesterSlashing` or `ProposerSlashing` as _invalid_, due to rounding errors in large `number` values. This causes a consensus split, where Lodestar nodes are forked away from the main network.\n\nSimilarly Lodestar may consider _invalid_ `ProposerSlashing` as _valid_, thus including in proposed blocks that will be considered invalid by the network.\n\n### Patches\n\nhttps://github.com/ChainSafe/lodestar/pull/3977\n\n### Workarounds\n\nUse `BigInt` to represent `Slot` and `Epoch` values in `AttesterSlashing` and `ProposerSlashing` objects. `BigInt` is too slow to be used in all `Slot` and `Epoch` cases, so we will carefully use `BigInt` just where necessary for consensus.","aliases":["CVE-2022-29219"],"modified":"2023-11-08T04:09:11.059602Z","published":"2022-05-24T22:21:10Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2022-05-24T22:21:10Z","nvd_published_at":"2022-05-24T15:15:00Z","cwe_ids":["CWE-190"],"severity":"HIGH"},"references":[{"type":"WEB","url":"https://github.com/ChainSafe/lodestar/security/advisories/GHSA-cvj7-5f3c-9vg9"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-29219"},{"type":"WEB","url":"https://github.com/ChainSafe/lodestar/pull/3977"},{"type":"PACKAGE","url":"https://github.com/ChainSafe/lodestar"},{"type":"WEB","url":"https://github.com/ChainSafe/lodestar/releases/tag/v0.36.0"}],"affected":[{"package":{"name":"@chainsafe/lodestar","ecosystem":"npm","purl":"pkg:npm/%40chainsafe/lodestar"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.36.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2022/05/GHSA-cvj7-5f3c-9vg9/GHSA-cvj7-5f3c-9vg9.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"}]}