Live threats

All CVEs / Openzeppelin

CVE-2022-35915Openzeppelin Contracts

Medium 5.3 No auth needed

Priority
47
CVSS 3.1
5.3
EPSS
0.9%
probability of exploitation in 30 days · percentile 57
Auth required
No
Published
Aug 1, 2022
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-400, CWE-770
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:N/A:L

What happens

OpenZeppelin Contracts is a library for secure smart contract development. The target contract of an EIP-165 `supportsInterface` query can cause unbounded gas consumption by returning a lot of data, while it is generally assumed that this operation has a bounded cost. The issue has been fixed in v4.7.2. Users are advised to upgrade. There are no known workarounds for this issue.

Original NVD text.

What to do

  1. Apply the vendor's security update for Contracts.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm @openzeppelin/contracts ≥ 2.0.0 < 4.7.2 4.7.2 npm install @openzeppelin/contracts@4.7.2
npm @openzeppelin/contracts-upgradeable ≥ 3.2.0 < 4.7.2 4.7.2 npm install @openzeppelin/contracts-upgradeable@4.7.2
npm openzeppelin-eth ≥ 2.0.0 ≤ 2.2.0 no fixed version —
npm openzeppelin-solidity ≥ 2.0.0 ≤ 4.6.0 no fixed version —

Per OSV / GitHub Advisories (GHSA-7grf-83vw-6f5x). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
openzeppelincontracts≥ 2.0.0 < 4.7.2
openzeppelincontracts_upgradeable≥ 3.2.0 < 4.7.2
openzeppelinopenzeppelin-eth≥ 2.0.0
openzeppelinopenzeppelin-solidity≥ 2.0.0

Official sources

References

Links published by the sources. Open them with care.