CVE-2023-40014 OpenZeppelin Contracts's ERC2771Context with custom forwarder may lead to zero-valued _msgSender
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: yes · technical impact: partial
- Technology
- Ubuntu
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.
Upgrade path
7 packages: 4 fixed, 2 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/smart(Ubuntu 16.04) | = 1.4-2; All versions | No fix listed | No fix yet |
| ubuntu/smart(Ubuntu 18.04) | = 1.4-2; All versions | No fix listed | No fix yet |
| openzeppelin @openzeppelin/contracts(npm) | >= 4.0.0, < 4.9.3 | 4.9.3 | Fixed |
| openzeppelin @openzeppelin/contracts-upgradeable(npm) | >= 4.0.0, < 4.9.3 | 4.9.3 | Fixed |
| openzeppelin contracts | >= 4.0.0, < 4.9.3 | 4.9.3 | Fixed |
| openzeppelin contracts-upgradable | >= 4.0.0, < 4.9.3 | 4.9.3 | Fixed |
| openzeppelin-contracts | = >= 4.0.0, < 4.9.3 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| openzeppelin @openzeppelin/contracts(npm) | >= 4.0.0, < 4.9.3 | 4.9.3 |
| openzeppelin @openzeppelin/contracts-upgradeable(npm) | >= 4.0.0, < 4.9.3 | 4.9.3 |
| openzeppelin-contracts | = >= 4.0.0, < 4.9.3 | No fix listed |
| openzeppelin contracts | >= 4.0.0, < 4.9.3 | 4.9.3 |
| openzeppelin contracts-upgradable | >= 4.0.0, < 4.9.3 | 4.9.3 |
| ubuntu/smart(Ubuntu:16.04) | All versions | No fix listed |
| ubuntu/smart(Ubuntu:16.04) | = 1.4-2 | No fix listed |
| ubuntu/smart(Ubuntu:18.04) | All versions | No fix listed |
| ubuntu/smart(Ubuntu:18.04) | = 1.4-2 | No fix listed |
References
- https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-g4vp-m682-qqmp issue-tracking vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4481 issue-tracking patch vendor-advisory
- https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4484 issue-tracking patch vendor-advisory
- https://github.com/OpenZeppelin/openzeppelin-contracts/commit/9445f96223041abf2bf08daa56f8da50b674cbcd issue-tracking patch
- https://github.com/OpenZeppelin/openzeppelin-contracts/commit/e4435eed757d4309436b1e06608e97b6d6e2fdb5 issue-tracking patch
- github.com
- https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.9.3 issue-tracking release-notes
- github.com
- github.com product
- ubuntu.com issue-tracking
- www.cve.org issue-tracking