# CVE-2023-23940: OpenZeppelin Contracts for Cairo is vulnerable to signature validation bypass

- Severity: Medium 6.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.23%, higher than 14% of CVEs (2026-12-01)
- Published: 2023-02-02T16:59:46.000Z
- Modified: 2026-06-17T05:38:20.130Z
- Also known as: GHSA-626q-v9j4-mcp4, PYSEC-2023-39
- Weaknesses: CWE-345, CWE-347
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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. 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.

(As written by CVE List.)

## Affected

- OpenZeppelin cairo-contracts: >= 0.2.0, < 0.6.1
- openzeppelin-cairo-contracts (PyPI): from 0.2.0 before 0.6.1; before 6d4cb750478fca2fd916f73297632f899aca9299
- openzeppelin contracts: from 0.2.0 before 0.6.1

## Every score

- GitHub_M: CVSS:3.1 6.4 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:4.0 Medium `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`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-626q-v9j4-mcp4> (advisory, third-party-advisory, web)
- <https://github.com/OpenZeppelin/cairo-contracts/pull/542/commits/6d4cb750478fca2fd916f73297632f899aca9299> (fix, patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-23940> (advisory)
- <https://github.com/OpenZeppelin/cairo-contracts> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/openzeppelin-cairo-contracts/PYSEC-2023-39.yaml> (web)

## Sources

- CVE List: [CVE-2023-23940](https://www.cve.org/CVERecord?id=CVE-2023-23940), CVE Terms of Use, modified 2025-03-10
- GitHub Advisory Database: [GHSA-626q-v9j4-mcp4](https://github.com/advisories/GHSA-626q-v9j4-mcp4), CC-BY-4.0, modified 2026-02-22
- NVD: [CVE-2023-23940](https://nvd.nist.gov/vuln/detail/CVE-2023-23940), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2023-39](https://osv.dev/vulnerability/PYSEC-2023-39), CC-BY-4.0, modified 2026-02-22

---

Page: https://cve.day/CVE-2023-23940 · Whole record: https://cve.day/CVE-2023-23940.json · Rebuilt by cve.day 2026-11-25T22:58:21.828Z
