CVE-2022-31172Openzeppelin Contracts
High 7.5 No auth needed
Follow: this CVE · Openzeppelin · Openzeppelin Contracts We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- 0.5% probability of exploitation in 30 days · percentile 37
- Auth required
- No
- Published
- Jul 22, 2022
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
What happens
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
- Apply the vendor's security update for Contracts.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| npm | @openzeppelin/contracts |
≥ 4.1.0 < 4.7.1 |
4.7.1 |
npm install @openzeppelin/contracts@4.7.1 |
| npm | @openzeppelin/contracts-upgradeable |
≥ 4.1.0 < 4.7.1 |
4.7.1 |
npm install @openzeppelin/contracts-upgradeable@4.7.1 |
Per OSV / GitHub Advisories (GHSA-4g63-c64m-25w9). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| openzeppelin | contracts | ≥ 4.1.0 < 4.7.1 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Third Party Advisory