CVE-2023-40014

OpenZeppelin Contracts's ERC2771Context with custom forwarder may lead to zero-valued _msgSender

MEDIUM
5.3
CVSS Score
Published: August 10, 2023 at 07:52 PM UTC
Updated: June 17, 2026 at 06:15 AM UTC
2 products affected across 1 vendorOpenzeppelin ContractsOpenzeppelin Contracts Upgradable

Using openzeppelin-contracts by OpenZeppelin?

Get instant alerts when new vulnerabilities affect openzeppelin-contracts - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.3
Exploit prediction
EPSS 0.7%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 4.9.34.0.0 ≤ v < 4.9.34.0.0
Affected range stops below 4.9.3, so it looks safe — our inference, not a vendor statement
4.0.0 ≤ v < 4.9.3
Affected range stops below 4.9.3, so it looks safe — our inference, not a vendor statement

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

5.3MEDIUMGitHub_M
Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
LOW
Availability
NONE
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-116

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card