CVE-2021-41264CWE-665

UUPSUpgradeable vulnerability in OpenZeppelin Contracts

Critical · published November 12, 2021

CVSS v3.1
9.8
EPSS
1%
Percentile
73.8
In the wild
Unconfirmed
What it is

🚨 Upgradeable contracts using `UUPSUpgradeable` are vulnerable, and attackers could exploit uninitialized implementation contracts. This is a serious wake-up call for developers! 🔥 Think of it like a hotel where the management forgot to initialize newly renovated rooms; guests could walk in and access any room without a key. Without the right initialization, these contracts are wide open to exploitation! An attacker could potentially take control of the contract, manipulate it, or even drain funds—an absolutely devastating scenario for any decentralized application. The consequences could lead to significant financial losses, making this a critical issue to address immediately!

Put simply

Think of it like a hotel where the management forgot to initialize newly renovated rooms; guests could walk in and access any room without a key. Without the right initialization, these contracts are wide open to exploitation! This vulnerability arises from uninitialized implementation contracts in the `UUPSUpgradeable` pattern, allowing attackers to execute malicious code before proper initialization occurs. Essentially, these contracts could be hijacked due to the lack of a safeguard that should ensure they're set up correctly.

What to do

An attacker could potentially take control of the contract, manipulate it, or even drain funds—an absolutely devastating scenario for any decentralized application. The consequences could lead to significant financial losses, making this a critical issue to address immediately! To protect your contracts, immediately upgrade to version 4.3.2 of `@openzeppelin/contracts` and `@openzeppelin/contracts-upgradeable`. If an upgrade isn't feasible, ensure that you explicitly invoke the initializer function (usually called `initialize`) to properly initialize your implementation contracts. Don't leave your code vulnerable! You've got this! Follow these steps, and you'll secure your contracts in no time! 🛡️

The record
Technical detail
CVSS v3.1
9.8 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.01487 · 73.8th percentile
Weakness
CWE-665 · Improper Initialization
Published
2021-11-12T17:55Z
EPSS history
Timeline
  • 12 NOV 17:55Z
    UUPSUpgradeable vulnerability in OpenZeppelin Contracts
    cvelistv5