{"cve":"CVE-2023-28431","nvd":{"published":"2023-03-22T21:15:18.170","modified":"2026-06-17T05:47:42.077","status":"Modified","description":"Frontier is an Ethereum compatibility layer for Substrate. Frontier's `modexp` precompile uses `num-bigint` crate under the hood. In the implementation prior to pull request 1017, the cases for modulus being even and modulus being odd are treated separately. Odd modulus uses the fast Montgomery multiplication, and even modulus uses the slow plain power algorithm. This gas cost discrepancy was not accounted for in the `modexp` precompile, leading to possible denial of service attacks.\n\nNo fixes for `num-bigint` are currently available, and thus this issue is fixed in the short term by raising the gas costs for even modulus, and in the long term fixing it in `num-bigint` or switching to another modexp implementation. The short-term fix for Frontier is deployed at pull request 1017. There are no known workarounds aside from applying the fix.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-682"],"references":["https://github.com/paritytech/frontier/commit/5af12e94d7dfc8a0208a290643a800f55de7b219","https://github.com/paritytech/frontier/pull/1017","https://github.com/paritytech/frontier/security/advisories/GHSA-fcmm-54jp-7vf6","https://github.com/rust-num/num-bigint/blob/6f2b8e0fc218dbd0f49bebb8db2d1a771fe6bafa/src/biguint/power.rs#L134","https://github.com/paritytech/frontier/commit/5af12e94d7dfc8a0208a290643a800f55de7b219"],"products":["parity:frontier"],"source":"nvd","synced_at":"2026-10-19T21:37:48.383111019+00:00"},"epss":{"cve":"CVE-2023-28431","score":0.00873,"percentile":0.58919,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-fcmm-54jp-7vf6","url":"https://osv.dev/vulnerability/GHSA-fcmm-54jp-7vf6","summary":"Frontier's modexp precompile is slow for even modulus","modified":"2024-10-24T21:21:00Z","packages":[{"ecosystem":"crates.io","name":"pallet-evm-precompile-modexp","purl":"pkg:cargo/pallet-evm-precompile-modexp","ranges":["<=1.0.0"],"fixed":[]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}