LIBRARY SECURITY

OpenZeppelin Contracts vulnerabilities by version

By Michael Lip (Mike), independent smart contract security researcher. Data fetched 2026-10-29.

This page lists the 24 GitHub advisory ids for @openzeppelin/contracts and @openzeppelin/contracts-upgradeable, from the 2021 TimelockController advisory to the 2025 lastIndexOf memory-access bug. The two OpenZeppelin repositories published 23 of them. GitHub added GHSA-88g8-f5mf-f5rj. The page counts the advisories per stable npm release, and the lookup shows the advisories for your version.

On this page Version lookup All advisories Duplicates All versions By major line Support status Method

24
GHSA ids in the GitHub database (21 issues)
23
advisories in the two OpenZeppelin repositories
8
repository advisories rated higher by GitHub
5.6.1
npm dist-tag latest (dev is 5.7.0)

Lookup a version

Ranges and severities below are read from the global GitHub Advisory Database on 2026-10-29. Where the repository advisory gives a different severity, both are shown. Every count on this page and the worst severity in the lookup use the GitHub database rating.

The lookup covers only @openzeppelin/contracts and @openzeppelin/contracts-upgradeable. GHSA-7grf-83vw-6f5x also names the legacy packages openzeppelin-solidity and openzeppelin-eth, which have no patched version.

All 24 advisories, newest first

Show all 24 advisories with severities and first patched versions
Published (GitHub database)AdvisoryTitle, packageSeverity (GitHub database; repository if different)First patched
2025-07-17GHSA-9rcw-c2f9-2j55OpenZeppelin Contracts Bytes's lastIndexOf function with position argument performs out-of-bound memory access on empty bufferscontracts, contracts-upgradeablemedium (repo: low)5.4.0
2024-02-29GHSA-9vx6-7xxf-x967OpenZeppelin Contracts base64 encoding may read from potentially dirty memorycontracts, contracts-upgradeablemedium (repo: low)4.9.6, 5.0.2
2023-12-12GHSA-699g-q6qh-q4v8OpenZeppelin Contracts and Contracts Upgradeable duplicated execution of subcalls in v4.9.4contracts, contracts-upgradeablemedium4.9.5
2023-08-11GHSA-g4vp-m682-qqmpOpenZeppelin Contracts vulnerable to Improper Escaping of Outputcontracts, contracts-upgradeablemedium (repo: low)4.9.3
2023-06-19GHSA-wprv-93r4-jj2pOpenZeppelin Contracts using MerkleProof multiproofs may allow proving arbitrary leaves for specific treescontracts, contracts-upgradeablemedium4.9.2
2023-06-08GHSA-5h3x-9wvq-w4m2OpenZeppelin Contracts's governor proposal creation may be blocked by frontrunningcontracts, contracts-upgradeablemedium4.9.1
2023-04-20GHSA-93hq-5wgc-jc82GovernorCompatibilityBravo may trim proposal calldatacontracts, contracts-upgradeablehigh (repo: medium)4.8.3
2023-04-17GHSA-mx2q-35m2-x2rhOpenZeppelin Contracts TransparentUpgradeableProxy clashing selector calls may not be delegatedcontracts, contracts-upgradeablemedium (repo: low)4.8.3
2023-03-03GHSA-878m-3g6q-594qOpenZeppelin Contracts contains Incorrect Calculationcontracts, contracts-upgradeablemedium4.8.2
2022-08-18GHSA-xrc4-737v-9q75OpenZeppelin Contracts's GovernorVotesQuorumFraction updates to quorum may affect past defeated proposalscontracts, contracts-upgradeablehigh4.7.2
2022-08-18GHSA-4h98-2769-gh6hOpenZeppelin Contracts vulnerable to ECDSA signature malleabilitycontracts, contracts-upgradeablehigh4.7.3
2022-08-14GHSA-9j3m-g383-29qrOpenZeppelin Contracts's Cross chain utilities for Arbitrum L2 see EOA calls as cross chain callscontracts, contracts-upgradeablemedium (repo: low)4.7.2
2022-08-14GHSA-7grf-83vw-6f5xOpenZeppelin Contracts ERC165Checker unbounded gas consumptioncontracts, contracts-upgradeable, openzeppelin-eth, openzeppelin-soliditymedium4.7.2
2022-07-21GHSA-qh9x-gcfh-pcrwOpenZeppelin Contracts's ERC165Checker may revert instead of returning falsecontracts, contracts-upgradeablehigh4.7.1
2022-07-21GHSA-4g63-c64m-25w9OpenZeppelin Contracts's SignatureChecker may revert on invalid EIP-1271 signerscontracts, contracts-upgradeablehigh (repo: medium)4.7.1
2022-03-14GHSA-7j52-6fjp-58grInconsistent storage layout for ERC2771ContextUpgradeablecontracts-upgradeablelow4.3.0
2022-02-05GHSA-88g8-f5mf-f5rjImproper Initialization in OpenZeppelincontractshigh (no repository advisory)4.4.1
2022-01-13GHSA-m6w8-fq7v-ph4mGovernorCompatibilityBravo incorrect ABI encoding may lead to unexpected behaviorcontracts, contracts-upgradeablemedium4.4.2
2021-12-14GHSA-9c22-pwxw-p6hxOpenZeppelin Contracts initializer reentrancy may lead to double initializationcontracts, contracts-upgradeablemedium (repo: low)4.4.1
2021-11-15GHSA-wmpv-c2jp-j2xgERC1155Supply vulnerability in OpenZeppelin Contractscontracts, contracts-upgradeablelow4.3.3
2021-09-15GHSA-q4h9-46xg-m3x9UUPSUpgradeable vulnerability in @openzeppelin/contracts-upgradeablecontracts-upgradeablecritical4.3.2
2021-09-15GHSA-5vp3-v4hc-gx76UUPSUpgradeable vulnerability in @openzeppelin/contractscontracts, contracts-upgradeablecritical4.3.2
2021-08-30GHSA-vrw4-w73r-6mm8TimelockController vulnerability in OpenZeppelin Contractscontracts-upgradeablecritical3.4.2, 4.3.1
2021-08-30GHSA-fg47-3c2x-m2wrTimelockController vulnerability in OpenZeppelin Contracts contractscritical3.4.2, 4.3.1

Duplicate advisories

Three issues have two GHSA ids each. GHSA-88g8-f5mf-f5rj is a GitHub-reviewed entry for the issue of GHSA-9c22-pwxw-p6hx; OSV lists CVE-2021-46320 and CVE-2022-39384 as aliases of both. The TimelockController and UUPSUpgradeable issues have one advisory in each OpenZeppelin repository. The other 18 ids are one issue each.

IssueAdvisories
Initializer reentrancy (CVE-2021-46320)GHSA-9c22-pwxw-p6hx and GHSA-88g8-f5mf-f5rj
TimelockController (CVE-2021-39167, CVE-2021-39168)GHSA-fg47-3c2x-m2wr and GHSA-vrw4-w73r-6mm8
UUPSUpgradeable (CVE-2021-41264; GHSA-q4h9-46xg-m3x9 has no CVE)GHSA-5vp3-v4hc-gx76 and GHSA-q4h9-46xg-m3x9

24 GHSA ids are 21 distinct issues. The advisory table and the version table count ids; the major-line table counts issues.

All 51 stable npm releases of @openzeppelin/contracts

contracts-upgradeable has 45 stable releases. Its releases 4.5.1 and 4.5.2 are not in this table. Use the lookup for them.

Counts use the global database ranges for @openzeppelin/contracts only. Use the lookup for @openzeppelin/contracts-upgradeable. The severity columns use the GitHub database rating.

Show all 51 stable releases with per-version advisory counts
VersionAdvisory idsCritical or high (GitHub)Medium (GitHub)Low (GitHub)
5.7.0 (newest release, npm dist-tag dev; dist-tag latest is 5.6.1)0000
5.6.10000
5.6.00000
5.5.00000
5.4.00000
5.3.01010
5.2.01010
5.1.00000
5.0.20000
5.0.11010
5.0.01010
4.9.60000
4.9.51010
4.9.4 deprecated on npm2020
4.9.31010
4.9.22020
4.9.13030
4.9.04040
4.8.34040
4.8.26150
4.8.17160
4.8.07160
4.7.36150
4.7.27250
4.7.110370
4.7.012570
4.6.011560
4.5.010550
4.4.29540
4.4.110550
4.4.012660
4.3.312660
4.3.213661
4.3.114761
4.3.015861
4.2.011641
4.1.010640
4.0.07340
3.4.24130
3.4.15230
3.4.05230
3.3.05230
3.2.04130
3.1.02110
3.0.22110
3.0.12110
3.0.02110
2.5.12110
2.5.02110
2.4.02110
2.3.02110

By major release line

Distinct issues per major line. An issue counts once in a line when its range covers at least one stable npm release of that line. Each duplicate pair counts as one issue. 4.x carries the bulk of the history: it lived through the 2021 to 2023 advisory cluster.

Package2.x3.x4.x5.x
@openzeppelin/contracts24192
@openzeppelin/contracts-upgradeableno release4202

Support status and upgrade advice

The project's own security policy says, quoting:

Security patches will be released for the latest minor of a given major release. For example, if an issue is found in versions >=4.6.0 and the latest is 4.8.0, the patch will be released only in version 4.8.1.
Only critical severity bug fixes will be backported to past major releases.

Supported lines, quoted from the same policy (5.x gets all security fixes; 4.9 and 3.4 get critical fixes only; 2.5 and versions below 2.0 get none):

VersionCritical security fixesOther security fixes
5.xyesyes
4.9yesno
3.4yesno
2.5nono
< 2.0nono

If you are on 4.9.x or 3.4.x, the policy promises only critical fixes. Two non-critical fixes still reached 4.9.x after 5.0.0 (released 2023-10-05): 4.9.5 for GHSA-699g-q6qh-q4v8 and 4.9.6 for GHSA-9vx6-7xxf-x967. The policy does not promise more.

The TimelockController critical advisory

One critical TimelockController issue has two ids in the GitHub database: GHSA-fg47-3c2x-m2wr for contracts and GHSA-vrw4-w73r-6mm8 for contracts-upgradeable. In both packages it affects the stable releases 4.0.0 to 4.3.0 and 3.3.0 to 3.4.1. The TimelockController advisory (CVE-2021-39167) says, quoting:

Deployed instances of TimelockController should be replaced with a fixed version by migrating all assets, ownership, and roles.

Replacing a deployed contract is not an npm update. The workaround of the advisory, quoting: "Revoke the executor role from accounts not strictly under the team's control."

The deprecated 4.9.4 release

The 4.9.4 advisory (CVE-2023-49798, duplicated delegatecall in Multicall) says, quoting:

The duplicated delegatecall was removed in 4.9.5. The 4.9.4 version is marked as deprecated.

npm confirms: both @openzeppelin/contracts@4.9.4 and @openzeppelin/contracts-upgradeable@4.9.4 carry an npm deprecation notice. If your lockfile pins 4.9.4, move to 4.9.6. Version 4.9.5 is still in the range of GHSA-9vx6-7xxf-x967.

The 5.0 to 4.9 backport pattern

The Base64 advisory (CVE-2024-27094) patches two branches at once. Its fix line, quoting:

Upgrade to 5.0.2 or 4.9.6.

The policy promises backports to past majors only for critical fixes. This advisory is low in the repository and medium in the GitHub database. This fix was also backported to 4.9.6.

Method and sources

Fetched 2026-10-29 with the GitHub API: the advisories of both repositories (repos/OpenZeppelin/openzeppelin-contracts/security-advisories and repos/OpenZeppelin/openzeppelin-contracts-upgradeable/security-advisories), the global GitHub Advisory Database entries for both packages (advisories?ecosystem=npm&affects=@openzeppelin/contracts and the same query for @openzeppelin/contracts-upgradeable). Also fetched: the npm registry metadata for both packages (versions, dist-tags and deprecation notices), the project's SECURITY.md, and the OSV record of each of the 24 ids (api.osv.dev/v1/vulns/<id>), which gives the CVE aliases in the duplicate section. The lookup and the tables use global-database ranges; where the repository advisory disagrees on severity, the advisory table shows the global rating and names the repository rating next to it. First-patched versions come from the advisory's first_patched_version field. Data fetched 2026-10-29 at 07:30 UTC. A second fetch at 10:33 UTC gave the same ids, severities, ranges, stable versions and npm dist-tags.

Counts in the version table are advisory ids whose published range for @openzeppelin/contracts covers the version, computed from the global database ranges in the fetched files. The major-line table counts issues per package, as its note says. npm also lists 53 pre-releases and solc-0.7 builds of @openzeppelin/contracts and 35 of @openzeppelin/contracts-upgradeable (rc and beta tags, and builds named like 3.4.2-solc-0.7). The tables and the lookup do not count them; only stable npm releases are counted.

Related: Solidity compiler bugs by version, Vyper compiler bugs by version.