# CVE-2022-21685: Integer underflow in Frontier

- Severity: Medium 6.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.38%, higher than 72% of CVEs (2026-12-01)
- Published: 2022-01-14T17:05:11.000Z
- Modified: 2026-06-17T04:26:45.607Z
- Also known as: GHSA-cjg2-2fjg-fph4
- Weaknesses: CWE-191
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- paritytech frontier: < 8a93fdc
- pallet-evm-precompile-modexp (crates.io): up to 1.0.0
- parity frontier: up to 2022-01-13

## Every score

- GitHub_M: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- GitHub: rating Medium
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:2.0 4.0 Medium `AV:N/AC:L/Au:S/C:N/I:N/A:P`

## References

- <https://github.com/paritytech/frontier/security/advisories/GHSA-cjg2-2fjg-fph4> (patch, third-party-advisory, web)
- <https://github.com/paritytech/frontier/pull/549> (patch, third-party-advisory, web)
- <https://github.com/paritytech/frontier/commit/8a93fdc6c9f4eb1d2f2a11b7ff1d12d70bf5a664> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-21685> (advisory)
- <https://github.com/paritytech/frontier> (package)

## Sources

- CVE List: [CVE-2022-21685](https://www.cve.org/CVERecord?id=CVE-2022-21685), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-cjg2-2fjg-fph4](https://github.com/advisories/GHSA-cjg2-2fjg-fph4), CC-BY-4.0, modified 2024-10-24
- NVD: [CVE-2022-21685](https://nvd.nist.gov/vuln/detail/CVE-2022-21685), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-21685 · Whole record: https://cve.day/CVE-2022-21685.json · Rebuilt by cve.day 2026-11-25T22:58:09.248Z
