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

Published Aug 10, 2023
·
Updated

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.

Other sources

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.

MITRE

Affected Software

4 affected componentsFixes available
npm/@openzeppelin/contracts-upgradeable>=4.0.0<4.9.3
4.9.3
npm/@openzeppelin/contracts>=4.0.0<4.9.3
4.9.3
OpenZeppelin Openzeppelin Contracts Node.js>=4.0.0<4.9.3
OpenZeppelin Openzeppelin Contracts-upgradable Node.js>=4.0.0<4.9.3

Event History

Aug 10, 2023
CVE Published
via MITRE·07:52 PM
Data Sourced
via MITRE·07:52 PM
DescriptionSeverityWeakness
Aug 11, 2023
Advisory Published
07:00 PM
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2023-40014?

CVE-2023-40014 is a vulnerability in OpenZeppelin Contracts library versions 4.0.0 to 4.9.3 that may result in `_msgSender` returning `address(0)` in calls originating from a trusted forwarder.

2

How does the CVE-2023-40014 vulnerability impact OpenZeppelin Contracts?

The CVE-2023-40014 vulnerability impacts OpenZeppelin Contracts by causing the `_msgSender` function to return `address(0)` in calls originating from a trusted forwarder.

3

What is the severity of CVE-2023-40014?

The severity of CVE-2023-40014 is medium with a CVSS score of 5.3.

4

Which versions of OpenZeppelin Contracts are affected by CVE-2023-40014?

Versions 4.0.0 to 4.9.3 of OpenZeppelin Contracts are affected by CVE-2023-40014.

5

How can I fix the CVE-2023-40014 vulnerability?

To fix the CVE-2023-40014 vulnerability, update OpenZeppelin Contracts to version 4.9.3.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203