CVE-2023-40014 in Openzeppelin Contracts and 1 more product
OpenZeppelin Contracts is a library for secure smart contract development. Starting in version 4.0.0 and prior to version 4.9.3, contracts using `ERC2771Context` along with a custom trusted forwarder may see `_msgSender` return `address(0)` in calls that originate from the forwarder with calldata shorter than 20 byt...
Affects 2 products from 1 vendor. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact, no availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Openzeppelin | Openzeppelin Contracts | ≥ 4.0.0, < 4.9.3 |
| Openzeppelin | Openzeppelin Contracts-Upgradable | ≥ 4.0.0, < 4.9.3 |
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.
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
OpenZeppelin Contracts is a library for secure smart contract development. Starting in version 4.0.0 and prior to version 4.9.3, contracts using `ERC2771Context` along with a custom trusted forwarder may see `_msgSender` return `address(0)` in calls that originate from the forwarder with calldata shorter than 20 bytes. This combination of circumstances does not appear to be common, in particular it is not the case for `MinimalForwarder` from OpenZeppelin Contracts, or any deployed forwarder the team is aware of, given that the signer address is appended to all calls that originate from these forwarders. The problem has been patched in v4.9.3.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2023-40014 |
|---|---|
| BreachSpider ID | BS-2023-GLOBAL-056763-M |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| Published | 2023-08-10 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-116: CWE-116
Related attack patterns (CAPEC)
CAPEC-81 Web Server Logs Tampering via CWE-116
CAPEC-85 AJAX Footprinting via CWE-116
CAPEC-73 User-Controlled Filename via CWE-116
CAPEC-104 Cross Zone Scripting via CWE-116
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
CVE-2023-40014 affects OpenZeppelin Contracts versions 4.0.0 to 4.9.2, where the _msgSender function may return address(0) when called from a trusted forwarder with calldata shorter than 20 bytes, potentially leading to incorrect address handling in smart contracts.
An attacker could exploit this vulnerability by crafting a transaction with calldata shorter than 20 bytes to a contract using ERC2771Context with a custom trusted forwarder, causing the _msgSender function to return address(0). This could lead to unauthorized actions if the contract logic relies on the correct sender address.
Questions
What is CVE-2023-40014?
CVE-2023-40014 affects OpenZeppelin Contracts versions 4.0.0 to 4.9.2, where the _msgSender function may return address(0) when called from a trusted forwarder with calldata shorter than 20 bytes, potentially leading to incorrect address handling in smart contracts.
What is the CVSS score for CVE-2023-40014?
CVE-2023-40014 has CVSS 5.3 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N. EPSS: 0.8%.
Is CVE-2023-40014 actively exploited?
No confirmed active exploitation of CVE-2023-40014 as of 2026-09-25.
How do I remediate CVE-2023-40014?
Priority: MEDIUM. PSIRT: [email protected]
What systems are affected by CVE-2023-40014?
CVE-2023-40014 affects Openzeppelin Openzeppelin Contracts, Openzeppelin Contracts-Upgradable.
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":"Openzeppelin Contracts","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.