OpenZeppelin Contracts's ERC2771Context with custom forwarder may lead to zero-valued _msgSender (OpenZeppelin openzeppelin-contracts)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.74 % Β· percentile 55 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Modified
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.
Weaknesses (CWE)
- CWE-116 β Improper Encoding or Escaping of Output
References
- https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-g4vp-m682-qqmp
- https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4481
- https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4484
- https://github.com/OpenZeppelin/openzeppelin-contracts/commit/9445f96223041abf2bf08daa56f8da50b674cbcd
- https://github.com/OpenZeppelin/openzeppelin-contracts/commit/e4435eed757d4309436b1e06608e97b6d6e2fdb5
- https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.9.3
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N | GitHub_M |
| CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N | NVD Β· security-advisories@github.com (Secondary) |
| CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N | NVD Β· nvd@nist.gov (Primary) |
Advisories
- GHSA-g4vp-m682-qqmp β OpenZeppelin Contracts vulnerable to Improper Escaping of Output
European references
- ENISA EUVD Β· EUVD-2023-2289
- GCVE Β· GCVE-0-2023-40014
Affected configurations (NVD CPE)
cpe:2.3:a:openzeppelin:openzeppelin_contracts:*:*:*:*:*:node.js:*:*β₯ 4.0.0 < 4.9.3cpe:2.3:a:openzeppelin:openzeppelin_contracts-upgradable:*:*:*:*:*:node.js:*:*β₯ 4.0.0 < 4.9.3
Affected products
| Product | Versions |
|---|---|
| OpenZeppelin Β· openzeppelin-contracts | affected >= 4.0.0, < 4.9.3 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST β attribution requested |
| ENISA EUVD | ENISA β reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain β this product uses data from the NVD API but is not endorsed or certified by the NVD |