Skip to main content

Over 150 LLM Providers · Over 5,300 Models The most extensible AI-powered pentesting platform. Open source. Star on GitHub

CVE-2022-31170

7.5 · HIGH
Published Jul 22, 2022 openzeppelin CWE-20 EPSS 0.75% (52th pctl)

Overview

CVE-2022-31170 is a high-severity vulnerability affecting openzeppelin contracts. It was published on July 22, 2022 and has a CVSS 3.1 base score of 7.5 (HIGH).

This vulnerability has a CVSS 3.1 base score of 7.5, rated HIGH. It can be exploited remotely over the network. No authentication or special privileges are required for exploitation.

Technical Description

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.

Remediation

Check the references section for vendor advisories and patches from openzeppelin. Update contracts to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

Affected Products

Vendor Product Versions Status
openzeppelin contracts >= 4.0.0, < 4.7.1 Affected

Frequently Asked Questions

What is CVE-2022-31170?

CVE-2022-31170 is a high-severity vulnerability affecting openzeppelin contracts. It was published on July 22, 2022 and has a CVSS 3.1 base score of 7.5 (HIGH).

How severe is CVE-2022-31170?

This vulnerability has a CVSS 3.1 base score of 7.5, rated HIGH. It can be exploited remotely over the network. No authentication or special privileges are required for exploitation.

How do I fix or remediate CVE-2022-31170?

Check the references section for vendor advisories and patches from openzeppelin. Update contracts to the latest patched version. If immediate patching is not possible, review the CVSS vector to understand the attack surface and apply compensating controls such as network segmentation or access restrictions.

How can CyberStrike help with CVE-2022-31170?

CyberStrike's AI-powered security agents can automatically detect CVE-2022-31170 across your infrastructure using autonomous pentesting, DAST scanning, and HackBrowser. The platform continuously monitors for known vulnerabilities and provides actionable remediation guidance prioritized by real-world exploitability.