5.3medium
OpenZeppelin Contracts's ERC2771Context with custom forwarder may lead to zero-valued _msgSender
- Severity
- 5.3medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.74% (higher than 55% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-g4vp-m682-qqmp
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
| Product or package | Versions | Reported by |
|---|---|---|
| OpenZeppelin openzeppelin-contracts | >= 4.0.0, < 4.9.3 | CVE List |
| openzeppelin openzeppelin_contracts | from 4.0.0 before 4.9.3 | CVE List, NVD |
| @openzeppelin/contracts (npm) | from 4.0.0 before 4.9.3 | GitHub Advisory Database |
| @openzeppelin/contracts-upgradeable (npm) | from 4.0.0 before 4.9.3 | GitHub Advisory Database |
| openzeppelin openzeppelin_contracts-upgradable | from 4.0.0 before 4.9.3 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Impact
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.
Patches
The problem has been patched in v4.9.3.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-40014 changed 2024-10-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-g4vp-m682-qqmp changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2023-40014 changed 2026-06-17 | Public domain |