Skip to content
Fencer Intel
medium 5.3

CVE-2023-40014 json

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

published 3y ago modified 4mo ago also EUVD-2023-2289 , GHSA-g4vp-m682-qqmp

cvss
5.3
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.7%
EPSS 0.7% chance of exploitation in 30 days, percentile 55%
public exploits
0
none known

Summary

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.

Patch / fix

Is CVE-2023-40014 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
partial
Assessed
2y ago

Exploit prediction

0.74% chance of exploitation in the next 30 days, higher than 55% of all scored CVEs (FIRST EPSS, 2026-11-15).

CVSS scores

assigned by version score vector
CNA 3.1 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
GitHub 3.1 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
NVD 3.1 5.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Affected packages

ecosystem package affected fixed in
npm @openzeppelin/contracts
>=4.0.0, <4.9.3
4.9.3
npm @openzeppelin/contracts-upgradeable
>=4.0.0, <4.9.3
4.9.3

Affected products

  • OpenZeppelin openzeppelin-contracts
  • openzeppelin openzeppelin_contracts

Classification

Weakness
  • CWE-116 Improper Encoding or Escaping of Output

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

The maintainers of OpenZeppelin/openzeppelin-contracts published their own advisory on GitHub. Reviewed sources take precedence over it.