{"id":"CVE-2022-35915","published":"2022-08-01T21:05:11Z","modified":"2025-04-23T17:54:51Z","title":"Unbounded gas consumption in @openzeppelin/contracts","vendor":"OpenZeppelin","product":"openzeppelin-contracts","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00799,"percentile":0.57463,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"references":[{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-7grf-83vw-6f5x","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3587","tags":["x_refsource_MISC"]}],"priority":{"score":15.2,"factors":[{"name":"EPSS percentile","points":11.49},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"openzeppelin","affectedVersions":[{"vendor":"OpenZeppelin","product":"openzeppelin-contracts","versions":[">=2.0.0 < 4.7.2"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-04-23T15:52:38.822969Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@openzeppelin/contracts","vulnerableRanges":[">=2.0.0, <4.7.2"],"patched":["4.7.2"],"from":["GHSA-7grf-83vw-6f5x"],"provenance":"source"},{"ecosystem":"npm","package":"openzeppelin-solidity","vulnerableRanges":[">=2.0.0, <=4.6.0"],"patched":[],"from":["GHSA-7grf-83vw-6f5x"],"provenance":"source"},{"ecosystem":"npm","package":"@openzeppelin/contracts-upgradeable","vulnerableRanges":[">=3.2.0, <4.7.2"],"patched":["4.7.2"],"from":["GHSA-7grf-83vw-6f5x"],"provenance":"source"},{"ecosystem":"npm","package":"openzeppelin-eth","vulnerableRanges":[">=2.0.0, <=2.2.0"],"patched":[],"from":["GHSA-7grf-83vw-6f5x"],"provenance":"source"}],"summary":{"text":"The flaw lies in the OpenZeppelin Contracts library (openzeppelin-contracts), where the EIP-165 supportsInterface query can be made to consume unbounded gas because the target contract may return a large amount of data, even though the operation is generally assumed to have a bounded cost. An attacker with network access and no privileges or user interaction can trigger this excessive gas consumption by querying a contract that returns large amounts of data, with the effect limited to availability impact.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:33:53Z"},"euvd":{"id":"EUVD-2022-6503","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2022-31170","published":"2022-07-21","fixed":"4.7.1","kev":false},{"cve":"CVE-2022-31172","published":"2022-07-21","fixed":"4.7.1","kev":false,"link":{"from":"CVE-2022-31172","to":"CVE-2022-35915","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@openzeppelin/contracts","fromFixed":"4.7.1","toFixed":"4.7.2","daysApart":11},{"kind":"version-step","provenance":"source","package":"npm:@openzeppelin/contracts-upgradeable","fromFixed":"4.7.1","toFixed":"4.7.2","daysApart":11}]}},{"cve":"CVE-2022-31198","published":"2022-08-01","fixed":"4.7.2","kev":false},{"cve":"CVE-2022-35915","published":"2022-08-01","fixed":"4.7.2","kev":false},{"cve":"CVE-2022-35916","published":"2022-08-01","fixed":"4.7.2","kev":false},{"cve":"CVE-2022-35961","published":"2022-08-14","fixed":"4.7.3","kev":false},{"cve":"CVE-2023-26488","published":"2023-03-03","fixed":"4.8.2","kev":false}],"package":"npm:@openzeppelin/contracts"}}