Skip to content
Heist/ feed
Back to feed
Medium

OpenZeppelin Contracts for Cairo is vulnerable to signature validation bypass

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-23940
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 08:19 UTC · Revision 1

Source evidence

OpenZeppelin Contracts for Cairo is vulnerable to signature validation bypass

core-osv · Original source

Published 3 Feb 2023, 19:43 UTC

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.

osv:CVE-2023-23940
Complete source record
{
  "id": "3a5882cce5e96364b7f9d78a53ef6e311f58e89f69b7a32ff9d4806c5ae6b632",
  "url": "https://osv.dev/vulnerability/CVE-2023-23940",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "OpenZeppelin Contracts for Cairo is vulnerable to signature validation bypass",
    "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.",
    "evidence": "osv:CVE-2023-23940",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2023-23940",
      "aliases": [
        "CVE-2023-23940",
        "GHSA-626q-v9j4-mcp4",
        "PYSEC-2023-39"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:H/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/openzeppelin/cairo-contracts",
              "type": "GIT",
              "events": [
                {
                  "introduced": "d3ee30b9368d52d82dc52e2a4e7c9f93a04e171f"
                },
                {
                  "fixed": "1f9359219a92cdb1576f953db71ee993b8ef5f70"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "0.2.0"
                      },
                      {
                        "fixed": "0.6.1"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StringRangeExpression"
                  },
                  {
                    "cpe": "cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:cairo:*:*",
                    "range": [
                      {
                        "introduced": "0.2.0"
                      },
                      {
                        "fixed": "0.6.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v0.2.1",
            "v0.2.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-23940.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:33.781155979Z",
      "provider": "osv",
      "references": [
        "https://github.com/OpenZeppelin/cairo-contracts/pull/542/commits/6d4cb750478fca2fd916f73297632f899aca9299",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/23xxx/CVE-2023-23940.json",
        "https://github.com/OpenZeppelin/cairo-contracts/security/advisories/GHSA-626q-v9j4-mcp4",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-23940"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-345",
          "CWE-347"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/23xxx/CVE-2023-23940.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-23940",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 501094,
  "published_at": "2023-02-03T19:43:11.178+00:00"
}