Unbounded gas consumption in @openzeppelin/contracts
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2022-35915
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 3 Nov 2026, 16:29 UTC · Revision 1
Source evidence
Unbounded gas consumption in @openzeppelin/contracts
core-osv · Original sourcePublished 1 Aug 2022, 21:05 UTC
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.
osv:CVE-2022-35915
Complete source record
{
"id": "2ef0518d8f2b7cf028e46a0f432f7126d55ace011de05c81559abf7c6f323b6f",
"url": "https://osv.dev/vulnerability/CVE-2022-35915",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Unbounded gas consumption in @openzeppelin/contracts",
"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.",
"evidence": "osv:CVE-2022-35915",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2022-35915",
"aliases": [
"CVE-2022-35915",
"GHSA-7grf-83vw-6f5x"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/openzeppelin/openzeppelin-contracts",
"type": "GIT",
"events": [
{
"introduced": "06e265b38d3e9daeaa7b33f9035c700d6bc0c6a0"
},
{
"fixed": "64e48203cecad94f02de9891ecdeed4d629c6dae"
},
{
"introduced": "1ada3b633e5bfd9d4ffe0207d64773a11f5a7c40"
},
{
"fixed": "64e48203cecad94f02de9891ecdeed4d629c6dae"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "2.0.0"
},
{
"fixed": "4.7.2"
}
],
"source": "CPE_RANGE"
},
{
"cpe": "cpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "3.2.0"
},
{
"fixed": "4.7.2"
}
],
"source": "CPE_RANGE"
}
]
}
},
{
"repo": "https://github.com/openzeppelin/openzeppelin-contracts-upgradeable",
"type": "GIT",
"events": [
{
"introduced": "40a9298585b20113c2afc5a2cb7edc5c8f2d656d"
},
{
"fixed": "12ad9ea7c8e8e78f6eba9ad71ad156645d3c5b4c"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:*",
"range": [
{
"introduced": "3.2.0"
},
{
"fixed": "4.7.2"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-35915.json"
}
}
],
"modified": "2026-10-28T02:30:30.459102110Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35915.json",
"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-7grf-83vw-6f5x",
"https://nvd.nist.gov/vuln/detail/CVE-2022-35915",
"https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3587"
],
"provider_metadata": {
"cwe_ids": [
"CWE-400"
],
"cna_assigner": "GitHub_M",
"unresolved_ranges": [
{
"extracted_events": [
{
"range": [
{
"introduced": ">=2.0.0 < 4.7.2"
},
{
"last_affected": ">=2.0.0 < 4.7.2"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StandaloneSingleVersion"
}
]
}
],
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/35xxx/CVE-2022-35915.json"
}
},
"related_cves": [
{
"value": "CVE-2022-35915",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 497372,
"published_at": "2022-08-01T21:05:11+00:00"
}