{"id":"CVE-2023-23940","published":"2023-02-03T19:43:11Z","modified":"2025-03-10T21:16:55Z","title":"OpenZeppelin Contracts for Cairo is vulnerable to signature validation bypass","vendor":"OpenZeppelin","product":"cairo-contracts","tier":"tail","description":{"text":"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","provenance":"source","from":"CVE.org"},"cvss":{"score":6.4,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0023,"percentile":0.14158,"provenance":"source"},"cwes":[{"id":"CWE-347","name":"Improper Verification of Cryptographic Signature"},{"id":"CWE-345","name":"Insufficient Verification of Data Authenticity"}],"references":[{"url":"https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-626q-v9j4-mcp4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/OpenZeppelin/cairo-contracts/pull/542/commits/6d4cb750478fca2fd916f73297632f899aca9299","tags":["x_refsource_MISC"]}],"priority":{"score":7.3,"factors":[{"name":"EPSS percentile","points":2.83},{"name":"CVSS severity","points":4.48}]},"vendorSlug":"openzeppelin","affectedVersions":[{"vendor":"OpenZeppelin","product":"cairo-contracts","versions":[">= 0.2.0, < 0.6.1"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2025-03-10T20:58:35.252554Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"openzeppelin-cairo-contracts","vulnerableRanges":[">=0.2.0, <0.6.1"],"patched":["0.6.1"],"from":["GHSA-626q-v9j4-mcp4","PYSEC-2023-39"],"provenance":"source"}],"summary":{"text":"The flaw is in the is_valid_eth_signature function of the OpenZeppelin Contracts for Cairo library (cairo-contracts), where a call to finalize_keccak is missing after verify_eth_signature, affecting any contract that uses it, such as the EthAccount preset. An attacker who controls the StarkNet sequencer can bypass signature validation and impersonate instances of these accounts, which requires the sequencer to be malicious rather than any network, authentication, user-interaction, or configuration condition.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:14:49Z"},"euvd":{"id":"EUVD-2023-0188","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-openzeppelin-cairo-contracts-cve-2022-31153","parents":[{"from":"CVE-2022-31153","to":"CVE-2023-23940","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/openzeppelin/account/library.cairo"],"commits":["https://github.com/OpenZeppelin/cairo-contracts/commit/2cd60279c3332285d47edf9ee3888b71257acdc9","https://github.com/OpenZeppelin/cairo-contracts/commit/6d4cb750478fca2fd916f73297632f899aca9299"],"basis":"rarely changed file"}]}]}}