BreachSpiderVerified, not vibes

CVE-2023-23940 in Openzeppelin Contracts

Medium 5.3 Fix available

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

Affects 1 product from 1 vendor. Facts below cite their sources.

CVSS 3.15.3
EPSS0.2%
EPSS percentile10th
FixAvailable

Remotely exploitable over the network, high complexity, low privileges required, no user interaction needed, impact contained to the vulnerable component, full confidentiality impact, no integrity impact, no availability impact.

Affected products and versions

VendorProductAffected versions
Openzeppelin Contracts ≥ 0.2.0, < 0.6.1

A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.

Fix and vendor advisory

No official vendor advisory link on record. See the CVE record.

Exploitation

CISA known-exploitedNot in the CISA KEV catalog
Public exploitNot confirmed

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

Source: NIST NVD / MITRE CVE.

Record details

CVE IDCVE-2023-23940
BreachSpider IDBS-2023-GLOBAL-062116-M
CVSS vectorCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N
Published2023-02-03
Last modified2024-11-21
Weakness (CWE)
SourceNVD

Weakness definitions

CWE-345: CWE-345

CWE-347: CWE-347

Related attack patterns (CAPEC)

CAPEC-142 DNS Cache Poisoning via CWE-345

CAPEC-218 Spoofing of UDDI/ebXML Messages via CWE-345

CAPEC-385 Transaction or Event Tampering via Application API Manipulation via CWE-345

CAPEC-387 Navigation Remapping To Propagate Malicious Content via CWE-345

CAPEC-388 Application API Button Hijacking via CWE-345

Show all 14

CAPEC-463 Padding Oracle Crypto Attack via CWE-347

CAPEC-475 Signature Spoofing by Improper Validation via CWE-347

CAPEC-665 Exploitation of Thunderbolt Protection Flaws via CWE-345

CAPEC-111 JSON Hijacking (aka JavaScript Hijacking) via CWE-345

CAPEC-141 Cache Poisoning via CWE-345

CAPEC-384 Application API Message Manipulation via Man-in-the-Middle via CWE-345

CAPEC-386 Application API Navigation Remapping via CWE-345

CAPEC-701 Browser in the Middle (BiTM) via CWE-345

CAPEC-148 Content Spoofing via CWE-345

Mapping is CWE to CAPEC per MITRE CAPEC 3.9.

Analysis AI-written, not human-reviewed

A vulnerability in OpenZeppelin Contracts for Cairo affects smart contracts using the `is_valid_eth_signature` function, potentially allowing a malicious sequencer to exploit the missing `finalize_keccak` call.

The vulnerability arises from the `is_valid_eth_signature` function in the account library, specifically the `EthAccount` preset, which does not call `finalize_keccak` after `verify_eth_signature`. This omission can be exploited by a malicious sequencer to manipulate the signature verification process.

Questions

What is CVE-2023-23940?

A vulnerability in OpenZeppelin Contracts for Cairo affects smart contracts using the `is_valid_eth_signature` function, potentially allowing a malicious sequencer to exploit the missing `finalize_keccak` call.

What is the CVSS score for CVE-2023-23940?

CVE-2023-23940 has CVSS 5.3 (Medium). Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N. EPSS: 0.2%.

Is CVE-2023-23940 actively exploited?

No confirmed active exploitation of CVE-2023-23940 as of 2026-05-30.

How do I remediate CVE-2023-23940?

Priority: HIGH.

What systems are affected by CVE-2023-23940?

CVE-2023-23940 affects Openzeppelin Contracts.

For developers and AI agents

Run this check from your own code or agent

REST API

curl -s https://breachspider.com/api/v1/assets/correlate-cves \
 -H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
 -H "Content-Type: application/json" \
 -d '{"assets":[{"asset_id":"dev-1","vendor":"Openzeppelin","product":"Contracts","version":"1.0"}]}'

API reference

Python SDK

pip install breachspider

PyPI · GitHub

MCP for AI agents

# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp

Setup for Claude, ChatGPT, Cursor

Free trial: 14 days, 750 device checks, no card.

Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2024-11-21.