GHSA-q4h9-46xg-m3x9 UUPSUpgradeable vulnerability in @openzeppelin/contracts-upgradeable
Attackers can exploit uninitialized UUPS implementation contracts to gain unauthorized control or execute code, affecting developers using OpenZeppelin upgradeable contracts.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-q4h9-46xg-m3x9?
GHSA-q4h9-46xg-m3x9 is a missing authorization vulnerability in @openzeppelin/contracts-upgradeable, published on 15 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Impact
Upgradeable contracts using UUPSUpgradeable may be vulnerable to an attack affecting uninitialized implementation contracts. We will update this advisory with more information soon.
Patches
A fix is included in version 4.3.2 of @openzeppelin/contracts and @openzeppelin/contracts-upgradeable.
Workarounds
Initialize implementation contracts using UUPSUpgradeable by invoking the initializer function (usually called initialize). An example is provided in the forum.
References
A post-mortem will be published in a few days in the OpenZeppelin Forum.
For more information
If you have any questions or comments about this advisory, or need assistance executing the mitigation, email us at [email protected].
Which versions are affected by GHSA-q4h9-46xg-m3x9?
2 open source packages ship an affected version, including @openzeppelin/contracts-upgradeable.
| Package | Affected | Fixed in |
|---|---|---|
@openzeppelin/contracts-upgradeable npm | From 4.1.0 | 4.3.2 |
@openzeppelin/contracts-upgradeable npm | From 4.1.0 | 4.3.2 |
How do I fix GHSA-q4h9-46xg-m3x9?
Upgrade @openzeppelin/contracts-upgradeable to 4.3.2 or later.
Upgrade, and check permissions on every request on the server, not only in the interface. More about Missing authorization.
Is GHSA-q4h9-46xg-m3x9 being exploited?
There is no known exploitation of GHSA-q4h9-46xg-m3x9 in the wild and no public exploit code.