{"id":"CVE-2023-40014","published":"2023-08-10T19:52:55Z","modified":"2024-10-03T14:58:56Z","title":"OpenZeppelin Contracts's ERC2771Context with custom forwarder may lead to zero-valued _msgSender","vendor":"OpenZeppelin","product":"openzeppelin-contracts","tier":"tail","description":{"text":"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.\n","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00773,"percentile":0.52093,"provenance":"source"},"cwes":[{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-g4vp-m682-qqmp","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4481","tags":["x_refsource_MISC"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4484","tags":["x_refsource_MISC"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/commit/9445f96223041abf2bf08daa56f8da50b674cbcd","tags":["x_refsource_MISC"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/commit/e4435eed757d4309436b1e06608e97b6d6e2fdb5","tags":["x_refsource_MISC"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.9.3","tags":["x_refsource_MISC"]}],"priority":{"score":14.1,"factors":[{"name":"EPSS percentile","points":10.42},{"name":"CVSS severity","points":3.71}]},"vendorSlug":"openzeppelin","affectedVersions":[{"vendor":"OpenZeppelin","product":"openzeppelin-contracts","versions":[">= 4.0.0, < 4.9.3"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2024-10-03T14:57:45.818565Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@openzeppelin/contracts","vulnerableRanges":[">=4.0.0, <4.9.3"],"patched":["4.9.3"],"from":["GHSA-g4vp-m682-qqmp"],"provenance":"source"},{"ecosystem":"npm","package":"@openzeppelin/contracts-upgradeable","vulnerableRanges":[">=4.0.0, <4.9.3"],"patched":["4.9.3"],"from":["GHSA-g4vp-m682-qqmp"],"provenance":"source"}],"summary":{"text":"OpenZeppelin Contracts' ERC2771Context, when used with a custom trusted forwarder, can cause _msgSender to return address(0) in the affected versions from 4.0.0 up to but not including 4.9.3. An attacker can trigger this only through a call that originates from that custom forwarder with calldata shorter than 20 bytes, and the issue does not arise with OpenZeppelin's MinimalForwarder, which appends the signer address to calls.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:36:19Z"},"euvd":{"id":"EUVD-2023-2289","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2023-30542","published":"2023-04-16","fixed":"4.8.3","kev":false},{"cve":"CVE-2023-34234","published":"2023-06-07","fixed":"4.9.1","kev":false},{"cve":"CVE-2023-34459","published":"2023-06-16","fixed":"4.9.2","kev":false,"link":{"from":"CVE-2023-34459","to":"CVE-2023-40014","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@openzeppelin/contracts","fromFixed":"4.9.2","toFixed":"4.9.3","daysApart":55},{"kind":"version-step","provenance":"source","package":"npm:@openzeppelin/contracts-upgradeable","fromFixed":"4.9.2","toFixed":"4.9.3","daysApart":55}]}},{"cve":"CVE-2023-40014","published":"2023-08-10","fixed":"4.9.3","kev":false},{"cve":"CVE-2023-49798","published":"2023-12-08","fixed":"4.9.5","kev":false},{"cve":"CVE-2024-27094","published":"2024-02-29","fixed":"5.0.2","kev":false},{"cve":"CVE-2025-54070","published":"2025-07-17","fixed":"5.4.0","kev":false}],"package":"npm:@openzeppelin/contracts"}}