Read the docs
TI-2022-13212 Aliases CVE-2022-31170GHSA-qh9x-gcfh-pcrw

OpenZeppelin Contracts's ERC165Checker may revert instead of returning false

Priority MEDIUM 40CWE-20Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Impact type
—
Confidentiality · integrity · availability
None · High · None
Fix status
Fixed

Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.

Summary

OpenZeppelin Contracts is a library for smart contract development. Versions 4.0.0 until 4.7.1 are vulnerable to ERC165Checker reverting instead of returning `false`. `ERC165Checker.supportsInterface` is designed to always successfully return a boolean, and under no circumstance 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-165 as expected, specifically if it returns a value other than 0 or 1. The contracts that may be affected are those that use `ERC165Checker` to check for support for an interface and then handle the lack of support in a way other than reverting. The issue was patched in version 4.7.1.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.00788 56th percentileScored 2026-11-07
Fix Fixed openzeppelin-contracts (OpenZeppelin): 4.7.1@openzeppelin/contracts (npm): 4.7.1+1 more product

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
OpenZeppelinopenzeppelin-contracts4.0.0 to before 4.7.14.7.1Patch availableCNA
—@openzeppelin/contracts (npm)4.0.0 to before 4.7.14.7.1Patch availableGHSA-qh9x-gcfh-pcrw
—@openzeppelin/contracts-upgradeable (npm)4.0.0 to before 4.7.14.7.1Patch availableGHSA-qh9x-gcfh-pcrw
  • openzeppelin-contracts VendorOpenZeppelin Affected 4.0.0 to before 4.7.1 Fixed in 4.7.1 Patch available CNA
  • @openzeppelin/contracts (npm) Vendor— Affected 4.0.0 to before 4.7.1 Fixed in 4.7.1 Patch available GHSA-qh9x-gcfh-pcrw
  • @openzeppelin/contracts-upgradeable (npm) Vendor— Affected 4.0.0 to before 4.7.1 Fixed in 4.7.1 Patch available GHSA-qh9x-gcfh-pcrw

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:*4.0.0 to before 4.7.1VulnerableOpenZeppelin
  • cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:* Versions 4.0.0 to before 4.7.1 Vulnerable ·OpenZeppelin

Remediation

  • Fix · CNA openzeppelin-contracts (OpenZeppelin) Fixed in 4.7.1
  • Fix · GHSA-qh9x-gcfh-pcrw @openzeppelin/contracts (npm) Fixed in 4.7.1 Advisory →
  • Fix · GHSA-qh9x-gcfh-pcrw @openzeppelin/contracts-upgradeable (npm) Fixed in 4.7.1 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2022-31170
  2. 2026-10-03 Alias added: GHSA-qh9x-gcfh-pcrw

References

  • TI-2022-13196 OpenZeppelin Contracts for Cairo account cannot process transactions on Goerli CVSS 3.1MEDIUM 6.5
  • TI-2021-16554 TimelockController vulnerability in OpenZeppelin Contracts CVSS 3.1CRITICAL 10.0
  • TI-2021-16553 TimelockController vulnerability in OpenZeppelin Contracts CVSS 3.1CRITICAL 10.0
  • TI-2021-18096 UUPSUpgradeable vulnerability in OpenZeppelin Contracts CVSS 3.1CRITICAL 9.8
  • TI-2022-13238 GovernorVotesQuorumFraction updates to quorum may affect past defeated proposals in @openzeppelin/contracts CVSS 3.1HIGH 7.5
  • TI-2023-14377 GovernorCompatibilityBravo may trim proposal calldata CVSS 3.1HIGH 8.8
See all 19 →

Sources