Read the docs
TI-2022-26498 Aliases GHSA-7j52-6fjp-58gr

Inconsistent storage layout for ERC2771ContextUpgradeable

Priority LOW 38Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
—
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub.

Summary

### Impact The storage layout of the ERC2771ContextUpgradeable is not constant between versions. - versions `4.0.0`, `4.1.0` and `4.2.0`, the contract has a length of 51 slots. - since `4.3.0`, the contract has a length of 50 slots - future versions will continue using 50 slots. This difference in layout could result in breaking upgrades if someone upgrades from an affected version to a non-affected version. It is thus recommended to be extremely careful when upgrading from a contract that uses ERC2771ContextUpgradeable `<4.3.0` to a newer version that uses `>=4.3.0`. We've assessed the instances of this contract found on chain (with publicly verified source code) and notified the corresponding teams of the risk that an upgrade could cause. ### Workarounds Potentially breaking upgrades would be caught by the OpenZeppelin Upgrades Plugins for Hardhat and Truffle. It is recommended to use this tooling for all your upgrades. If you need to upgrade to a newer version of the Upgradeable Contracts library, we recommend copying the previous implementation ERC2771ContextUpgradeable (available in the `release-4.2` branch) and packaging it with your code. ### Reference https://github.com/OpenZeppelin/openzeppelin-transpiler/pull/86 ### For more information If you have any questions, comments, or need assistance regarding this advisory, email us at [[email protected]](mailto:[email protected]). To submit security reports please use [our bug bounty on Immunefi](https://immunefi.com/bounty/openzeppelin/).

Why it matters now

Fix Fixed @openzeppelin/contracts-upgradeable (npm): 4.3.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—@openzeppelin/contracts-upgradeable (npm)4.0.0 to before 4.3.04.3.0Patch availableGHSA-7j52-6fjp-58gr
  • @openzeppelin/contracts-upgradeable (npm) Vendor— Affected 4.0.0 to before 4.3.0 Fixed in 4.3.0 Patch available GHSA-7j52-6fjp-58gr

Remediation

  • Fix · GHSA-7j52-6fjp-58gr @openzeppelin/contracts-upgradeable (npm) Fixed in 4.3.0 Advisory →

Timeline

  1. 2026-10-03 Threatist record created from GHSA-7j52-6fjp-58gr

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences