Vulnerability · Published Jul 21, 2022 · Assigned by GitHub_M

CVE-2022-31172OpenZeppelin Contracts's SignatureChecker may revert on invalid EIP-1271 signers

High 7.5

In plain English

A high-severity improper input validation in openzeppelin-contracts from OpenZeppelin. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 43% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.5%top 56.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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 packages & fixed versions

EcosystemPackageFixed inAdvisory
npm@openzeppelin/contracts4.7.1GHSA-4g63-c64m-25w9
npm@openzeppelin/contracts-upgradeable4.7.1GHSA-4g63-c64m-25w9

Affected products (as reported)

VendorProductVersions
OpenZeppelin openzeppelin-contracts >= 4.1.0, < 4.7.1

Weakness: CWE-20 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

References