CVE-2022-31172
HIGH 7.5CVSS 3.1OpenZeppelin Contracts's SignatureChecker may revert on invalid EIP-1271 signers
OpenZeppelin Contracts is a library for smart contract development. Versions 4.1.0 until 4.7.1 are vulnerable to the SignatureChecker reverting. SignatureChecker.isValidSignatureNow is not expected to revert. However, an incorrect assumption about Solidity 0.8's abi.decode allows some cases to revert, given a target contract that doesn't implement EIP-1271 as expected. The contracts that may be affected are those that use SignatureChecker to check the validity of a signature and handle invalid signatures in a way other than reverting. The issue was patched in version 4.7.1.
- Published
- 22 Jul 2022
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Modified
- Weakness
- CWE-20CWE-347
- Also known as
- GHSA-4g63-c64m-25w9
- Sources
- NVDJSONOSV GHSA-4g63-c64m-25w9JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| OSV | GitHub | CVSS 3.1 | HIGH 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | openzeppelin | contractscpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:* |
>= 4.1.0, < 4.7.1 | 4.7.1 |
| OSV | npm | @openzeppelin/contracts | >= 4.1.0, < 4.7.1 | 4.7.1 |
| OSV | npm | @openzeppelin/contracts-upgradeable | >= 4.1.0, < 4.7.1 | 4.7.1 |
References
- https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3552 · Patch, Third Party Advisory, WEB
- https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-4g63-c64m-25w9 · Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2022-31172 · ADVISORY
History
- 25 Nov 2026 20:34 UTC · NVD: first stored (published 22 Jul 2022)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 21 Jul 2022)