CVE-2022-35915Openzeppelin Contracts
Medium 5.3 No auth needed
Follow: this CVE · Openzeppelin · Openzeppelin Contracts We alert you by email or Slack (account required).
- 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
- 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.
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 |
≥ 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)
| Vendor | Product | Versions |
|---|---|---|
| openzeppelin | contracts | ≥ 2.0.0 < 4.7.2 |
| openzeppelin | contracts_upgradeable | ≥ 3.2.0 < 4.7.2 |
| openzeppelin | openzeppelin-eth | ≥ 2.0.0 |
| openzeppelin | openzeppelin-solidity | ≥ 2.0.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch Third Party Advisory
- github.com Third Party Advisory