Vulnerabilites related to OpenZeppelin - cairo-contracts
CVE-2022-31153 (GCVE-0-2022-31153)
Vulnerability from cvelistv5
Published
2022-07-15 17:50
Modified
2025-04-22 17:48
Severity ?
VLAI Severity ?
EPSS score ?
CWE
- CWE-664 - Improper Control of a Resource Through its Lifetime
Summary
OpenZeppelin Contracts for Cairo is a library for contract development written in Cairo for StarkNet, a decentralized ZK Rollup. Version 0.2.0 is vulnerable to an error that renders account contracts unusable on live networks. This issue affects all accounts (vanilla and ethereum flavors) in the v0.2.0 release of OpenZeppelin Contracts for Cairo, which are not whitelisted on StarkNet mainnet. Only goerli deployments of v0.2.0 accounts are affected. This faulty behavior is not observed in StarkNet's testing framework. This bug has been patched in v0.2.1.
References
► | URL | Tags |
---|---|---|
|
Impacted products
Vendor | Product | Version | ||
---|---|---|---|---|
OpenZeppelin | cairo-contracts |
Version: = 0.2.0 |
{ "containers": { "adp": [ { "providerMetadata": { "dateUpdated": "2024-08-03T07:11:39.549Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "tags": [ "x_refsource_CONFIRM", "x_transferred" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-8mjr-jr5h-q2xr" }, { "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/issues/386" }, { "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/pull/387" }, { "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/commit/2cd60279c3332285d47edf9ee3888b71257acdc9" }, { "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/blob/release-0.2.0/src/openzeppelin/account/library.cairo#L203" }, { "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/releases/tag/v0.2.1" } ], "title": "CVE Program Container" }, { "metrics": [ { "other": { "content": { "id": "CVE-2022-31153", "options": [ { "Exploitation": "poc" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2025-04-22T15:45:31.784349Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2025-04-22T17:48:58.458Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" } ], "cna": { "affected": [ { "product": "cairo-contracts", "vendor": "OpenZeppelin", "versions": [ { "status": "affected", "version": "= 0.2.0" } ] } ], "descriptions": [ { "lang": "en", "value": "OpenZeppelin Contracts for Cairo is a library for contract development written in Cairo for StarkNet, a decentralized ZK Rollup. Version 0.2.0 is vulnerable to an error that renders account contracts unusable on live networks. This issue affects all accounts (vanilla and ethereum flavors) in the v0.2.0 release of OpenZeppelin Contracts for Cairo, which are not whitelisted on StarkNet mainnet. Only goerli deployments of v0.2.0 accounts are affected. This faulty behavior is not observed in StarkNet\u0027s testing framework. This bug has been patched in v0.2.1." } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "baseScore": 6.5, "baseSeverity": "MEDIUM", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "privilegesRequired": "LOW", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "version": "3.1" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-664", "description": "CWE-664: Improper Control of a Resource Through its Lifetime", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2022-07-15T17:50:14.000Z", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-8mjr-jr5h-q2xr" }, { "tags": [ "x_refsource_MISC" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/issues/386" }, { "tags": [ "x_refsource_MISC" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/pull/387" }, { "tags": [ "x_refsource_MISC" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/commit/2cd60279c3332285d47edf9ee3888b71257acdc9" }, { "tags": [ "x_refsource_MISC" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/blob/release-0.2.0/src/openzeppelin/account/library.cairo#L203" }, { "tags": [ "x_refsource_MISC" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/releases/tag/v0.2.1" } ], "source": { "advisory": "GHSA-8mjr-jr5h-q2xr", "discovery": "UNKNOWN" }, "title": "OpenZeppelin Contracts for Cairo account cannot process transactions on Goerli", "x_legacyV4Record": { "CVE_data_meta": { "ASSIGNER": "security-advisories@github.com", "ID": "CVE-2022-31153", "STATE": "PUBLIC", "TITLE": "OpenZeppelin Contracts for Cairo account cannot process transactions on Goerli" }, "affects": { "vendor": { "vendor_data": [ { "product": { "product_data": [ { "product_name": "cairo-contracts", "version": { "version_data": [ { "version_value": "= 0.2.0" } ] } } ] }, "vendor_name": "OpenZeppelin" } ] } }, "data_format": "MITRE", "data_type": "CVE", "data_version": "4.0", "description": { "description_data": [ { "lang": "eng", "value": "OpenZeppelin Contracts for Cairo is a library for contract development written in Cairo for StarkNet, a decentralized ZK Rollup. Version 0.2.0 is vulnerable to an error that renders account contracts unusable on live networks. This issue affects all accounts (vanilla and ethereum flavors) in the v0.2.0 release of OpenZeppelin Contracts for Cairo, which are not whitelisted on StarkNet mainnet. Only goerli deployments of v0.2.0 accounts are affected. This faulty behavior is not observed in StarkNet\u0027s testing framework. This bug has been patched in v0.2.1." } ] }, "impact": { "cvss": { "attackComplexity": "LOW", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "baseScore": 6.5, "baseSeverity": "MEDIUM", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "privilegesRequired": "LOW", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H", "version": "3.1" } }, "problemtype": { "problemtype_data": [ { "description": [ { "lang": "eng", "value": "CWE-664: Improper Control of a Resource Through its Lifetime" } ] } ] }, "references": { "reference_data": [ { "name": "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-8mjr-jr5h-q2xr", "refsource": "CONFIRM", "url": "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-8mjr-jr5h-q2xr" }, { "name": "https://github.com/OpenZeppelin/cairo-contracts/issues/386", "refsource": "MISC", "url": "https://github.com/OpenZeppelin/cairo-contracts/issues/386" }, { "name": "https://github.com/OpenZeppelin/cairo-contracts/pull/387", "refsource": "MISC", "url": "https://github.com/OpenZeppelin/cairo-contracts/pull/387" }, { "name": "https://github.com/OpenZeppelin/cairo-contracts/commit/2cd60279c3332285d47edf9ee3888b71257acdc9", "refsource": "MISC", "url": "https://github.com/OpenZeppelin/cairo-contracts/commit/2cd60279c3332285d47edf9ee3888b71257acdc9" }, { "name": "https://github.com/OpenZeppelin/cairo-contracts/blob/release-0.2.0/src/openzeppelin/account/library.cairo#L203", "refsource": "MISC", "url": "https://github.com/OpenZeppelin/cairo-contracts/blob/release-0.2.0/src/openzeppelin/account/library.cairo#L203" }, { "name": "https://github.com/OpenZeppelin/cairo-contracts/releases/tag/v0.2.1", "refsource": "MISC", "url": "https://github.com/OpenZeppelin/cairo-contracts/releases/tag/v0.2.1" } ] }, "source": { "advisory": "GHSA-8mjr-jr5h-q2xr", "discovery": "UNKNOWN" } } } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2022-31153", "datePublished": "2022-07-15T17:50:14.000Z", "dateReserved": "2022-05-18T00:00:00.000Z", "dateUpdated": "2025-04-22T17:48:58.458Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }
CVE-2024-45304 (GCVE-0-2024-45304)
Vulnerability from cvelistv5
Published
2024-08-30 23:51
Modified
2024-09-03 19:52
Severity ?
VLAI Severity ?
EPSS score ?
CWE
- CWE-670 - Always-Incorrect Control Flow Implementation
Summary
Cairo-Contracts are OpenZeppelin Contracts written in Cairo for Starknet, a decentralized ZK Rollup. This vulnerability can lead to unauthorized ownership transfer, contrary to the original owner's intention of leaving the contract without an owner. It introduces a security risk where an unintended party (pending owner) can gain control of the contract after the original owner has renounced ownership. This could also be used by a malicious owner to simulate leaving a contract without an owner, to later regain ownership by previously having proposed himself as a pending owner. This issue has been addressed in release version 0.16.0. All users are advised to upgrade. There are no known workarounds for this vulnerability.
References
► | URL | Tags |
---|---|---|
|
Impacted products
Vendor | Product | Version | ||
---|---|---|---|---|
OpenZeppelin | cairo-contracts |
Version: < 0.16.0 |
{ "containers": { "adp": [ { "metrics": [ { "other": { "content": { "id": "CVE-2024-45304", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2024-09-03T19:52:10.317679Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2024-09-03T19:52:20.818Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" } ], "cna": { "affected": [ { "product": "cairo-contracts", "vendor": "OpenZeppelin", "versions": [ { "status": "affected", "version": "\u003c 0.16.0" } ] } ], "descriptions": [ { "lang": "en", "value": "Cairo-Contracts are OpenZeppelin Contracts written in Cairo for Starknet, a decentralized ZK Rollup. This vulnerability can lead to unauthorized ownership transfer, contrary to the original owner\u0027s intention of leaving the contract without an owner. It introduces a security risk where an unintended party (pending owner) can gain control of the contract after the original owner has renounced ownership. This could also be used by a malicious owner to simulate leaving a contract without an owner, to later regain ownership by previously having proposed himself as a pending owner. This issue has been addressed in release version 0.16.0. All users are advised to upgrade. There are no known workarounds for this vulnerability." } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "HIGH", "attackVector": "NETWORK", "availabilityImpact": "NONE", "baseScore": 5.3, "baseSeverity": "MEDIUM", "confidentialityImpact": "NONE", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N", "version": "3.1" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-670", "description": "CWE-670: Always-Incorrect Control Flow Implementation", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2024-08-30T23:51:18.368Z", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "name": "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-w2px-25pm-2cf9", "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-w2px-25pm-2cf9" }, { "name": "https://github.com/OpenZeppelin/cairo-contracts/commit/ef87d7847980e0cf83f4b7f3ff23e6590fb643ec", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/commit/ef87d7847980e0cf83f4b7f3ff23e6590fb643ec" }, { "name": "https://github.com/OpenZeppelin/cairo-contracts/releases/tag/v0.16.0", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/releases/tag/v0.16.0" } ], "source": { "advisory": "GHSA-w2px-25pm-2cf9", "discovery": "UNKNOWN" }, "title": "OwnableTwoStep allows a pending owner to accept ownership after the original owner has renounced ownership in cairo-contracts" } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2024-45304", "datePublished": "2024-08-30T23:51:01.301Z", "dateReserved": "2024-08-26T18:25:35.443Z", "dateUpdated": "2024-09-03T19:52:20.818Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }
CVE-2023-23940 (GCVE-0-2023-23940)
Vulnerability from cvelistv5
Published
2023-02-03 19:43
Modified
2025-03-10 21:16
Severity ?
VLAI Severity ?
EPSS score ?
CWE
Summary
OpenZeppelin Contracts for Cairo is a library for secure smart contract development written in Cairo for StarkNet, a decentralized ZK Rollup. `is_valid_eth_signature` is missing a call to `finalize_keccak` after calling `verify_eth_signature`. As a result, any contract using `is_valid_eth_signature` from the account library (such as the `EthAccount` preset) is vulnerable to a malicious sequencer. Specifically, the malicious sequencer would be able to bypass signature validation to impersonate an instance of these accounts. The issue has been patched in 0.6.1.
References
► | URL | Tags |
---|---|---|
Impacted products
Vendor | Product | Version | ||
---|---|---|---|---|
OpenZeppelin | cairo-contracts |
Version: >= 0.2.0, < 0.6.1 |
{ "containers": { "adp": [ { "providerMetadata": { "dateUpdated": "2024-08-02T10:49:07.630Z", "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE" }, "references": [ { "name": "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-626q-v9j4-mcp4", "tags": [ "x_refsource_CONFIRM", "x_transferred" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-626q-v9j4-mcp4" }, { "name": "https://github.com/OpenZeppelin/cairo-contracts/pull/542/commits/6d4cb750478fca2fd916f73297632f899aca9299", "tags": [ "x_refsource_MISC", "x_transferred" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/pull/542/commits/6d4cb750478fca2fd916f73297632f899aca9299" } ], "title": "CVE Program Container" }, { "metrics": [ { "other": { "content": { "id": "CVE-2023-23940", "options": [ { "Exploitation": "none" }, { "Automatable": "no" }, { "Technical Impact": "partial" } ], "role": "CISA Coordinator", "timestamp": "2025-03-10T20:58:35.252554Z", "version": "2.0.3" }, "type": "ssvc" } } ], "providerMetadata": { "dateUpdated": "2025-03-10T21:16:55.772Z", "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0", "shortName": "CISA-ADP" }, "title": "CISA ADP Vulnrichment" } ], "cna": { "affected": [ { "product": "cairo-contracts", "vendor": "OpenZeppelin", "versions": [ { "status": "affected", "version": "\u003e= 0.2.0, \u003c 0.6.1" } ] } ], "descriptions": [ { "lang": "en", "value": "OpenZeppelin Contracts for Cairo is a library for secure smart contract development written in Cairo for StarkNet, a decentralized ZK Rollup. `is_valid_eth_signature` is missing a call to `finalize_keccak` after calling `verify_eth_signature`. As a result, any contract using `is_valid_eth_signature` from the account library (such as the `EthAccount` preset) is vulnerable to a malicious sequencer. Specifically, the malicious sequencer would be able to bypass signature validation to impersonate an instance of these accounts. The issue has been patched in 0.6.1.\n" } ], "metrics": [ { "cvssV3_1": { "attackComplexity": "HIGH", "attackVector": "NETWORK", "availabilityImpact": "LOW", "baseScore": 6.4, "baseSeverity": "MEDIUM", "confidentialityImpact": "LOW", "integrityImpact": "HIGH", "privilegesRequired": "LOW", "scope": "UNCHANGED", "userInteraction": "NONE", "vectorString": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L", "version": "3.1" } } ], "problemTypes": [ { "descriptions": [ { "cweId": "CWE-347", "description": "CWE-347: Improper Verification of Cryptographic Signature", "lang": "en", "type": "CWE" } ] }, { "descriptions": [ { "cweId": "CWE-345", "description": "CWE-345: Insufficient Verification of Data Authenticity", "lang": "en", "type": "CWE" } ] } ], "providerMetadata": { "dateUpdated": "2023-02-03T19:43:11.178Z", "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "shortName": "GitHub_M" }, "references": [ { "name": "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-626q-v9j4-mcp4", "tags": [ "x_refsource_CONFIRM" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-626q-v9j4-mcp4" }, { "name": "https://github.com/OpenZeppelin/cairo-contracts/pull/542/commits/6d4cb750478fca2fd916f73297632f899aca9299", "tags": [ "x_refsource_MISC" ], "url": "https://github.com/OpenZeppelin/cairo-contracts/pull/542/commits/6d4cb750478fca2fd916f73297632f899aca9299" } ], "source": { "advisory": "GHSA-626q-v9j4-mcp4", "discovery": "UNKNOWN" }, "title": "OpenZeppelin Contracts for Cairo is vulnerable to signature validation bypass" } }, "cveMetadata": { "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa", "assignerShortName": "GitHub_M", "cveId": "CVE-2023-23940", "datePublished": "2023-02-03T19:43:11.178Z", "dateReserved": "2023-01-19T21:12:31.361Z", "dateUpdated": "2025-03-10T21:16:55.772Z", "state": "PUBLISHED" }, "dataType": "CVE_RECORD", "dataVersion": "5.1" }