{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-23940","id":"CVE-2023-23940","title":"OpenZeppelin Contracts for Cairo is vulnerable to signature validation bypass","description":"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. ","descriptionLong":"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","published":"2023-02-03T19:43:11.178Z","updated":"2026-10-28T02:30:33.781155979Z","reserved":"2023-01-19T21:12:31.361Z","status":"Modified","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"medium","source":"GitHub"},{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L","rating":"medium","source":"github.com"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":6.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L","rating":"medium","source":"OSV"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N","rating":"medium","source":"GitHub"}],"rating":"medium","products":["OpenZeppelin cairo-contracts"],"affectedProducts":[{"vendor":"OpenZeppelin","product":"cairo-contracts","defaultStatus":null,"versions":[{"version":">= 0.2.0, < 0.6.1","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"PyPI","name":"openzeppelin-cairo-contracts","purl":"pkg:pypi/openzeppelin-cairo-contracts","ranges":[">=0.2.0 <0.6.1"],"fixed":["0.6.1"],"advisory":"GHSA-626q-v9j4-mcp4"}],"cwes":["CWE-347","CWE-345"],"aliases":["GHSA-626q-v9j4-mcp4","PYSEC-2023-39"],"references":[{"url":"https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-626q-v9j4-mcp4","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory","web"]},{"url":"https://github.com/OpenZeppelin/cairo-contracts/pull/542/commits/6d4cb750478fca2fd916f73297632f899aca9299","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","web","fix"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/23xxx/CVE-2023-23940.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-23940","tags":["advisory"]},{"url":"https://github.com/OpenZeppelin/cairo-contracts","tags":["package"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/openzeppelin-cairo-contracts/PYSEC-2023-39.yaml","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.0023,"epssPercentile":0.13999,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-23940","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-23940","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-23940","ok":true,"note":"1 package"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-626q-v9j4-mcp4","ok":true,"note":"GHSA-626q-v9j4-mcp4"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-23940","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}