{"id":"CVE-2022-21685","published":"2022-01-14T17:05:11Z","modified":"2025-04-23T19:11:58Z","title":"Integer underflow in Frontier","vendor":"paritytech","product":"frontier","tier":"tail","description":{"text":"Frontier is Substrate's Ethereum compatibility layer. Prior to commit number `8a93fdc6c9f4eb1d2f2a11b7ff1d12d70bf5a664`, a bug in Frontier's MODEXP precompile implementation can cause an integer underflow in certain conditions. This will cause a node crash for debug builds. For release builds (and production WebAssembly binaries), the impact is limited as it can only cause a normal EVM out-of-gas. Users who do not use MODEXP precompile in their runtime are not impacted. A patch is available in pull request #549.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01375,"percentile":0.72704,"provenance":"source"},"cwes":[{"id":"CWE-191","name":"Integer Underflow (Wrap or Wraparound)"}],"references":[{"url":"https://github.com/paritytech/frontier/security/advisories/GHSA-cjg2-2fjg-fph4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/paritytech/frontier/pull/549","tags":["x_refsource_MISC"]},{"url":"https://github.com/paritytech/frontier/commit/8a93fdc6c9f4eb1d2f2a11b7ff1d12d70bf5a664","tags":["x_refsource_MISC"]}],"priority":{"score":19.1,"factors":[{"name":"EPSS percentile","points":14.54},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"paritytech","affectedVersions":[{"vendor":"paritytech","product":"frontier","versions":["< 8a93fdc"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-23T14:12:12.868137Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"pallet-evm-precompile-modexp","vulnerableRanges":["<=1.0.0"],"patched":[],"from":["GHSA-cjg2-2fjg-fph4"],"provenance":"source"}],"euvd":{"id":"EUVD-2022-0562","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-paritytech-frontier-cve-2022-21685","children":[{"from":"CVE-2022-21685","to":"CVE-2023-28431","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["frame/evm/precompile/modexp/src/lib.rs"],"commits":["https://github.com/paritytech/frontier/commit/8a93fdc6c9f4eb1d2f2a11b7ff1d12d70bf5a664","https://github.com/paritytech/frontier/commit/5af12e94d7dfc8a0208a290643a800f55de7b219"],"basis":"shared function","functions":["Precompile","calculate_gas_cost"]}]}]}}