{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2022-31170","published":"2022-07-22T04:15:14.547000Z","last_modified":"2026-06-17T04:44:57.307000Z","status":"Modified","cvss":{"version":"3.1","score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","source":"nvd@nist.gov","primary":true},"auth":false,"cwes":["CWE-20","CWE-252"],"cpes":[{"criteria":"cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:*","part":"a","vendor":"openzeppelin","product":"contracts","version_start_including":"4.0.0","version_end_excluding":"4.7.1"}],"cpes_truncated":false,"vendors":["openzeppelin"],"products":["openzeppelin/contracts"],"ssvc":{"exploitation":"none","automatable":"yes","technical_impact":"partial"},"epss":{"score":0.00823,"percentile":0.54479,"date":"2026-11-29","model_version":"v2026.06.15"},"cat":"app","platform":"multi","eol":false,"packages":[{"advisory":"GHSA-qh9x-gcfh-pcrw","ecosystem":"npm","name":"@openzeppelin/contracts","purl":"pkg:npm/%40openzeppelin/contracts","ranges":[{"introduced":"4.0.0","fixed":"4.7.1"}],"versions":[],"versions_truncated":false},{"advisory":"GHSA-qh9x-gcfh-pcrw","ecosystem":"npm","name":"@openzeppelin/contracts-upgradeable","purl":"pkg:npm/%40openzeppelin/contracts-upgradeable","ranges":[{"introduced":"4.0.0","fixed":"4.7.1"}],"versions":[],"versions_truncated":false}],"severity":"high","priority_score":60,"links":{"html_es":"/es/cve/CVE-2022-31170/","html_en":"/en/cve/CVE-2022-31170/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-31170","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-31170"},"untrusted":{"vendor_name":"Openzeppelin","product_name":"Contracts","desc_en":"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.","affected":[{"untrusted_vendor":"OpenZeppelin","untrusted_product":"openzeppelin-contracts","versions":[]}],"references":[{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3552","tags":["Patch","Third Party Advisory"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-qh9x-gcfh-pcrw","tags":["Third Party Advisory"]}]}}