GitHub Advisoryadvisory · npm
GHSA-mx2q-35m2-x2rh OpenZeppelin Contracts TransparentUpgradeableProxy clashing selector calls may not be delegated
MEDIUM
Official page ↗
- Aliases
- CVE-2023-30541
- Ecosystem
- npm
- Packages
- @openzeppelin/contracts, @openzeppelin/contracts-upgradeable
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- Weaknesses
- CWE-436
- Reviewed
- 2023-04-17
Affected packages
• npm @openzeppelin/contracts: >= 3.2.0, < 4.8.3 → fixed in 4.8.3
• npm @openzeppelin/contracts-upgradeable: >= 3.2.0, < 4.8.3 → fixed in 4.8.3
Description
Impact
A function in the implementation contract may be inaccessible if its selector clashes with one of the proxy's own selectors. Specifically, if the clashing function has a different signature with incompatible ABI encoding, the proxy could revert while attempting to decode the arguments from calldata.
The probability of an accidental clash is negligible, but one could be caused deliberately.
Patches
The issue has been fixed in v4.8.3.
Workarounds
If a function appears to be inaccessible for this reason, it may be possible to craft the calldata such that ABI decoding does not fail at the proxy and the function is properly proxied through.
References
https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4154
Related
Alias · CVE (1)
- CVE-2023-30541 OpenZeppelin Contracts is a library for secure smart contract development. vulnerability
Weakness · CWE (1)
- CWE-436 Interpretation Conflict weakness
References
- https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-mx2q-35m2-x2rh web
- https://nvd.nist.gov/vuln/detail/CVE-2023-30541 advisory
- https://github.com/OpenZeppelin/openzeppelin-contracts/pull/4154 web
- https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/commit/58fa0f81c4036f1a3b616fdffad2fd27e5d5ce21 web
- https://github.com/OpenZeppelin/openzeppelin-contracts package
- https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.8.3 web