CVE-2024-27094

Medium

Description

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.

SeverityMedium
CVSS6.5
Exploit probability—
ProductOpenzeppelin Contracts
PublishedMar 21, 2024
First seenMar 21, 2024

How to fix

Update
  • openzeppelin contracts4.9.6, 5.0.2 or later
  • openzeppelin contracts_upgradeable5.0.2 or later
  • @openzeppelin/contracts4.9.6, 5.0.2 or later
  • @openzeppelin/contracts-upgradeable5.0.2, 4.9.6 or later

Affected products

ProductAffected versionsFixed in
openzeppelin contracts4.5.0 ≤ v < 4.9.6, 5.0.0 ≤ v < 5.0.24.9.6, 5.0.2
openzeppelin contracts_upgradeable4.5.0 ≤ v ≤ 4.9.6, 5.0.0 ≤ v < 5.0.25.0.2
@openzeppelin/contractsnpm4.5.0 ≤ v < 4.9.6, 5.0.0-rc.0 ≤ v < 5.0.24.9.6, 5.0.2
@openzeppelin/contracts-upgradeablenpm5.0.0-rc.0 ≤ v < 5.0.2, 4.5.0 ≤ v < 4.9.65.0.2, 4.9.6

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.