CVE-2023-40014
JSON

5.3medium

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

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.74% (higher than 55% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-g4vp-m682-qqmp

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.

Affected

Product or packageVersionsReported by
OpenZeppelin openzeppelin-contracts>= 4.0.0, < 4.9.3CVE List
openzeppelin openzeppelin_contractsfrom 4.0.0 before 4.9.3CVE List, NVD
@openzeppelin/contracts (npm)from 4.0.0 before 4.9.3GitHub Advisory Database
@openzeppelin/contracts-upgradeable (npm)from 4.0.0 before 4.9.3GitHub Advisory Database
openzeppelin openzeppelin_contracts-upgradablefrom 4.0.0 before 4.9.3NVD

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

Classification

CWE-116

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database
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.

References

https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-g4vp-m682-qqmpvendor-advisory, web
https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4481patch, vendor-advisory, web
https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4484patch, vendor-advisory, web
https://github.com/OpenZeppelin/openzeppelin-contracts/commit/9445f96223041abf2bf08daa56f8da50b674cbcdpatch, web
https://github.com/OpenZeppelin/openzeppelin-contracts/commit/e4435eed757d4309436b1e06608e97b6d6e2fdb5patch, web
https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.9.3release-notes, web
https://nvd.nist.gov/vuln/detail/CVE-2023-40014advisory
https://github.com/OpenZeppelin/openzeppelin-contractspackage
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.3/CHANGELOG.mdweb

Sources

SourceRecordLicence
CVE ListCVE-2023-40014 changed 2024-10-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-g4vp-m682-qqmp changed 2023-11-08CC-BY-4.0
NVDCVE-2023-40014 changed 2026-06-17Public domain