CVE-2023-40014 json
OpenZeppelin Contracts's ERC2771Context with custom forwarder may lead to zero-valued _msgSender
published 2023-08-10 3 y ago modified 2026-06-17 4 mo ago also GHSA-g4vp-m682-qqmp , EUVD-2023-2289
- 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 54%
- 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
- npm @openzeppelin/contracts 4.9.3
- npm @openzeppelin/contracts-upgradeable 4.9.3
- openzeppelin openzeppelin_contracts 4.9.3
- github.com/OpenZeppelin/openzeppelin-contracts@9445f96 commit
- github.com/OpenZeppelin/openzeppelin-contracts@e4435ee commit
- github.com/OpenZeppelin/openzeppelin-contracts#4481 pull request
- github.com/OpenZeppelin/openzeppelin-contracts#4484 pull request
- github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.9.3 release
CISA SSVC
- Exploitation
- none
- Automatable
- yes
- Technical impact
- partial
- Assessed
- 2 y ago
Exploit prediction
0.74% chance of exploitation in the next 30 days, higher than 54% of all scored CVEs (FIRST EPSS, 2026-11-08).
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 |
| NVD | 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 |
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
-
github.com
/OpenZeppelin/openzeppelin-contracts/pull/4481
web, patch, vendor-advisory
-
github.com
/OpenZeppelin/openzeppelin-contracts/pull/4484
web, patch, vendor-advisory
-
github.com
/OpenZeppelin/openzeppelin-contracts/commit/9445f96223041abf2bf08daa56f8da50b674cbcd
web, patch
-
github.com
/OpenZeppelin/openzeppelin-contracts/commit/e4435eed757d4309436b1e06608e97b6d6e2fdb5
web, patch
-
github.com
/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-g4vp-m682-qqmp
web, vendor-advisory
-
github.com
/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.9.3
web, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2023-40014
advisory
-
github.com
/OpenZeppelin/openzeppelin-contracts
package
-
github.com
/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/CHANGELOG.md
web
Sources
- CVE List CVE-2023-40014
- GitHub Advisory GHSA-g4vp-m682-qqmp
- NVD CVE-2023-40014
Fencer Vulns 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.