OpenZeppelin Contracts's ERC2771Context with custom forwarder may lead to zero-valued _msgSender
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| OpenZeppelin | openzeppelin-contracts | 4.0.0 to before 4.9.3 | 4.9.3 | Patch available | CNA |
| — | @openzeppelin/contracts (npm) | 4.0.0 to before 4.9.3 | 4.9.3 | Patch available | GHSA-g4vp-m682-qqmp |
| — | @openzeppelin/contracts-upgradeable (npm) | 4.0.0 to before 4.9.3 | 4.9.3 | Patch available | GHSA-g4vp-m682-qqmp |
- openzeppelin-contracts VendorOpenZeppelin Affected 4.0.0 to before 4.9.3 Fixed in 4.9.3 Patch available CNA
- @openzeppelin/contracts (npm) Vendor— Affected 4.0.0 to before 4.9.3 Fixed in 4.9.3 Patch available GHSA-g4vp-m682-qqmp
- @openzeppelin/contracts-upgradeable (npm) Vendor— Affected 4.0.0 to before 4.9.3 Fixed in 4.9.3 Patch available GHSA-g4vp-m682-qqmp
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:openzeppelin:openzeppelin_contracts:*:*:*:*:*:node.js:*:* | 4.0.0 to before 4.9.3 | Vulnerable | OpenZeppelin |
| cpe:2.3:a:openzeppelin:openzeppelin_contracts-upgradable:*:*:*:*:*:node.js:*:* | 4.0.0 to before 4.9.3 | Vulnerable | OpenZeppelin |
- cpe:2.3:a:openzeppelin:openzeppelin_contracts:*:*:*:*:*:node.js:*:* Versions 4.0.0 to before 4.9.3 Vulnerable ·OpenZeppelin
- cpe:2.3:a:openzeppelin:openzeppelin_contracts-upgradable:*:*:*:*:*:node.js:*:* Versions 4.0.0 to before 4.9.3 Vulnerable ·OpenZeppelin
Remediation
- Fix · CNA openzeppelin-contracts (OpenZeppelin) Fixed in 4.9.3
- Fix · GHSA-g4vp-m682-qqmp @openzeppelin/contracts (npm) Fixed in 4.9.3 Advisory →
- Fix · GHSA-g4vp-m682-qqmp @openzeppelin/contracts-upgradeable (npm) Fixed in 4.9.3 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2023-40014
- 2026-10-03 Alias added: GHSA-g4vp-m682-qqmp
References
Patch 4
- https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4481
- https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4484
- https://github.com/OpenZeppelin/openzeppelin-contracts/commit/9445f96223041abf2bf08daa56f8da50b674cbcd
- https://github.com/OpenZeppelin/openzeppelin-contracts/commit/e4435eed757d4309436b1e06608e97b6d6e2fdb5
Advisory 2
Sources
- CVE-2023-40014 · CVE Program
- CVE-2023-40014 · NVD
- FIRST EPSS
- GHSA-g4vp-m682-qqmp · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences