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

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.74%, higher than 55% of CVEs (2026-12-01)
- Published: 2023-08-10T19:52:55.699Z
- Modified: 2026-06-17T06:15:45.027Z
- Also known as: GHSA-g4vp-m682-qqmp
- Weaknesses: CWE-116
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- OpenZeppelin openzeppelin-contracts: >= 4.0.0, < 4.9.3
- openzeppelin openzeppelin_contracts: from 4.0.0 before 4.9.3
- @openzeppelin/contracts (npm): from 4.0.0 before 4.9.3
- @openzeppelin/contracts-upgradeable (npm): from 4.0.0 before 4.9.3
- openzeppelin openzeppelin_contracts-upgradable: from 4.0.0 before 4.9.3

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N`

## References

- <https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-g4vp-m682-qqmp> (vendor-advisory, web)
- <https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4481> (patch, vendor-advisory, web)
- <https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4484> (patch, vendor-advisory, web)
- <https://github.com/OpenZeppelin/openzeppelin-contracts/commit/9445f96223041abf2bf08daa56f8da50b674cbcd> (patch, web)
- <https://github.com/OpenZeppelin/openzeppelin-contracts/commit/e4435eed757d4309436b1e06608e97b6d6e2fdb5> (patch, web)
- <https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.9.3> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2023-40014> (advisory)
- <https://github.com/OpenZeppelin/openzeppelin-contracts> (package)
- <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/CHANGELOG.md> (web)

## Sources

- CVE List: [CVE-2023-40014](https://www.cve.org/CVERecord?id=CVE-2023-40014), CVE Terms of Use, modified 2024-10-03
- GitHub Advisory Database: [GHSA-g4vp-m682-qqmp](https://github.com/advisories/GHSA-g4vp-m682-qqmp), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2023-40014](https://nvd.nist.gov/vuln/detail/CVE-2023-40014), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-40014 · Whole record: https://cve.day/CVE-2023-40014.json · Rebuilt by cve.day 2026-11-25T22:58:27.033Z
