Skip to content

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

MediumCVSS 5.3 EPSS 0.74%
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.

PackageAffectedFixed inStatus
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

ProductAffected versionsFixed 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