Unbounded gas consumption in @openzeppelin/contracts
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · Low
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-400.
Summary
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.
Why it matters now
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
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| OpenZeppelin | openzeppelin-contracts | >=2.0.0 < 4.7.2 | — | No fix listed | CNA |
| — | @openzeppelin/contracts (npm) | 2.0.0 to before 4.7.2 | 4.7.2 | Patch available | GHSA-7grf-83vw-6f5x |
| — | openzeppelin-solidity (npm) | 2.0.0 – 4.6.0 | — | No fix listed | GHSA-7grf-83vw-6f5x |
| — | @openzeppelin/contracts-upgradeable (npm) | 3.2.0 to before 4.7.2 | 4.7.2 | Patch available | GHSA-7grf-83vw-6f5x |
| — | openzeppelin-eth (npm) | 2.0.0 – 2.2.0 | — | No fix listed | GHSA-7grf-83vw-6f5x |
- openzeppelin-contracts VendorOpenZeppelin Affected >=2.0.0 < 4.7.2 Fixed in — No fix listed CNA
- @openzeppelin/contracts (npm) Vendor— Affected 2.0.0 to before 4.7.2 Fixed in 4.7.2 Patch available GHSA-7grf-83vw-6f5x
- openzeppelin-solidity (npm) Vendor— Affected 2.0.0 – 4.6.0 Fixed in — No fix listed GHSA-7grf-83vw-6f5x
- @openzeppelin/contracts-upgradeable (npm) Vendor— Affected 3.2.0 to before 4.7.2 Fixed in 4.7.2 Patch available GHSA-7grf-83vw-6f5x
- openzeppelin-eth (npm) Vendor— Affected 2.0.0 – 2.2.0 Fixed in — No fix listed GHSA-7grf-83vw-6f5x
CPE configurations NVD · 4
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:* | 2.0.0 to before 4.7.2 | Vulnerable | OpenZeppelin |
| cpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:* | 3.2.0 to before 4.7.2 | Vulnerable | OpenZeppelin |
| cpe:2.3:a:openzeppelin:openzeppelin-eth:*:*:*:*:*:node.js:*:* | 2.0.0 | Vulnerable | OpenZeppelin |
| cpe:2.3:a:openzeppelin:openzeppelin-solidity:*:*:*:*:*:node.js:*:* | 2.0.0 | Vulnerable | OpenZeppelin |
- cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:* Versions 2.0.0 to before 4.7.2 Vulnerable ·OpenZeppelin
- cpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:* Versions 3.2.0 to before 4.7.2 Vulnerable ·OpenZeppelin
- cpe:2.3:a:openzeppelin:openzeppelin-eth:*:*:*:*:*:node.js:*:* Versions 2.0.0 Vulnerable ·OpenZeppelin
- cpe:2.3:a:openzeppelin:openzeppelin-solidity:*:*:*:*:*:node.js:*:* Versions 2.0.0 Vulnerable ·OpenZeppelin
Remediation
- Fix · GHSA-7grf-83vw-6f5x @openzeppelin/contracts (npm) Fixed in 4.7.2 Advisory →
- Fix · GHSA-7grf-83vw-6f5x @openzeppelin/contracts-upgradeable (npm) Fixed in 4.7.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2022-35915
- 2026-10-03 Alias added: GHSA-7grf-83vw-6f5x
References
Advisory 2
More OpenZeppelin Contracts vulnerabilities
- 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-2022-13212 OpenZeppelin Contracts's ERC165Checker may revert instead of returning false CVSS 3.1HIGH 7.5
Sources
- CVE-2022-35915 · CVE Program
- CVE-2022-35915 · NVD
- FIRST EPSS
- GHSA-7grf-83vw-6f5x · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences