Live threats

All CVEs / Openzeppelin

CVE-2024-27094Openzeppelin Contracts

High 7.4 No auth needed

Priority
59
CVSS 3.1
7.4
EPSS
0.9%
probability of exploitation in 30 days · percentile 57
Auth required
No
Published
Mar 21, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-125
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H

What happens

OpenZeppelin Contracts is a library for secure smart contract development. The `Base64.encode` function encodes a `bytes` input by iterating over it in chunks of 3 bytes. When this input is not a multiple of 3, the last iteration may read parts of the memory that are beyond the input buffer. The vulnerability is fixed in 5.0.2 and 4.9.6.

Original NVD text.

What to do

  1. Apply the vendor's security update for Contracts.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm @openzeppelin/contracts ≥ 4.5.0 < 4.9.6 4.9.6 npm install @openzeppelin/contracts@4.9.6
npm @openzeppelin/contracts ≥ 5.0.0-rc.0 < 5.0.2 5.0.2 npm install @openzeppelin/contracts@5.0.2
npm @openzeppelin/contracts-upgradeable ≥ 5.0.0-rc.0 < 5.0.2 5.0.2 npm install @openzeppelin/contracts-upgradeable@5.0.2
npm @openzeppelin/contracts-upgradeable ≥ 4.5.0 < 4.9.6 4.9.6 npm install @openzeppelin/contracts-upgradeable@4.9.6

Per OSV / GitHub Advisories (GHSA-9vx6-7xxf-x967). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
openzeppelincontracts≥ 4.5.0 < 4.9.6
openzeppelincontracts≥ 5.0.0 < 5.0.2
openzeppelincontracts_upgradeable≥ 4.5.0 ≤ 4.9.6
openzeppelincontracts_upgradeable≥ 5.0.0 < 5.0.2

Official sources

References

Links published by the sources. Open them with care.