UUPSUpgradeable Vulnerability in @openzeppelin/contracts-upgradeable

Summary

15/09/2021
CRITICAL
Yes i
Critical
Not published

GHSA-q4h9-46xg-m3x9: UUPSUpgradeable vulnerability in @openzeppelin/contracts-upgradeable. Affects @openzeppelin/contracts-upgradeable versions >= 4.1.0, < 4.3.2. Fixed in 4.3.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The @openzeppelin/contracts-upgradeable package is an open-source library for building upgradeable smart contracts on the Ethereum blockchain. It provides a set of secure and audited contracts that can be easily upgraded without losing state or disrupting the functionality of deployed contracts. The UUPSUpgradeable contract is a key component of this library, allowing for seamless upgrades of implementation contracts. However, a vulnerability has been discovered in the UUPSUpgradeable contract that could lead to uninitialized implementation contracts.

Vulnerability Detail

The UUPSUpgradeable vulnerability in @openzeppelin/contracts-upgradeable affects upgradeable contracts that use the UUPSUpgradeable contract. The vulnerability allows uninitialized implementation contracts to be exploited, potentially leading to unauthorized access, manipulation of contract state, or other malicious activities. The exact details of the vulnerability have not been disclosed at this time, but the OpenZeppelin team has released a fix in version 4.3.2 of the @openzeppelin/contracts and @openzeppelin/contracts-upgradeable packages.

How To Fix

Latest published version: 5.6.1 as of 22 Oct 2026

npm install @openzeppelin/contracts-upgradeable@5.6.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.3.2

This is the first release that contains the fix.

npm install @openzeppelin/contracts-upgradeable@4.3.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If updating the packages is not immediately feasible, a workaround is available. Implementation contracts using UUPSUpgradeable should be initialized by invoking the initializer function, typically named 'initialize'. This ensures that the implementation contract is properly initialized and mitigates the vulnerability. Here is an example of how to initialize an implementation contract using UUPSUpgradeable:

contract MyContract is UUPSUpgradeable {
  function initialize() public initializer {
    // Initialization code here
  }
}

Conclusion

The UUPSUpgradeable vulnerability in @openzeppelin/contracts-upgradeable can be mitigated by updating the packages to version 4.3.2 or later. Alternatively, implementation contracts can be initialized using the workaround provided. It is important to take action to address this vulnerability and ensure the security of your smart contracts.

See every vulnerability recorded for @openzeppelin/contracts-upgradeable →

Share this vulnerability

FAQ

The vulnerability allows uninitialized implementation contracts to be exploited, potentially leading to unauthorized access, manipulation of contract state, or other malicious activities.

To fix the vulnerability, update the @openzeppelin/contracts and @openzeppelin/contracts-upgradeable packages to version 4.3.2 or later.

Yes, a workaround is available. Initialize implementation contracts using UUPSUpgradeable by invoking the initializer function.

A post-mortem will be published in a few days on the OpenZeppelin Forum.

For assistance with mitigating this vulnerability, you can email security@openzeppelin.com.

Related vulnerabilities

Recent vulnerabilities recorded for @openzeppelin/contracts-upgradeable.

How To Fix

Latest published version: 5.6.1 as of 22 Oct 2026

npm install @openzeppelin/contracts-upgradeable@5.6.1

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

4.3.2

This is the first release that contains the fix.

npm install @openzeppelin/contracts-upgradeable@4.3.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback