CVE-2022-31172: OpenZeppelin 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.
Affected Software
Remediation
Event History
Frequently Asked Questions
What is CVE-2022-31172?
CVE-2022-31172 is a vulnerability in OpenZeppelin Contracts library versions 4.1.0 until 4.7.1 that allows a SignatureChecker function to revert unexpectedly.
How severe is CVE-2022-31172?
CVE-2022-31172 has a severity score of 7.5, which is considered high.
How does CVE-2022-31172 affect OpenZeppelin Contracts?
CVE-2022-31172 affects OpenZeppelin Contracts library versions 4.1.0 until 4.7.1 and may cause the SignatureChecker function to revert unexpectedly.
How can I fix CVE-2022-31172?
To fix CVE-2022-31172, update your OpenZeppelin Contracts library to a version higher than 4.7.1.
Where can I find more information about CVE-2022-31172?
You can find more information about CVE-2022-31172 in the GitHub security advisory: [link].