Skip to content

CVE-2024-27094 OpenZeppelin Contracts base64 encoding may read from potentially dirty memory

HighCVSS 7.4 EPSS 0.76%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial

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.

Upgrade path

5 packages: 4 fixed.

PackageAffectedFixed inStatus
openzeppelin @openzeppelin/contracts >= 4.5.0, < 4.9.6; >= 5.0.0, < 5.0.2 4.9.6, 5.0.2 Fixed
openzeppelin @openzeppelin/contracts(npm) >= 4.5.0, < 4.9.6; >= 5.0.0-rc.0, < 5.0.2 4.9.6, 5.0.2 Fixed
openzeppelin @openzeppelin/contracts-upgradeable(npm) >= 4.5.0, < 4.9.6; >= 5.0.0-rc.0, < 5.0.2 4.9.6, 5.0.2 Fixed
openzeppelin contracts upgradeable >= 4.5.0, <= 4.9.6; >= 5.0.0, < 5.0.2 5.0.2 Fixed
openzeppelin-contracts = >= 4.5.0, < 4.9.6; = >= 5.0.0-rc.0, < 5.0.2 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
openzeppelin @openzeppelin/contracts(npm) >= 4.5.0, < 4.9.6 4.9.6
openzeppelin @openzeppelin/contracts-upgradeable(npm) >= 5.0.0-rc.0, < 5.0.2 5.0.2
openzeppelin @openzeppelin/contracts(npm) >= 5.0.0-rc.0, < 5.0.2 5.0.2
openzeppelin @openzeppelin/contracts-upgradeable(npm) >= 4.5.0, < 4.9.6 4.9.6
openzeppelin-contracts = >= 4.5.0, < 4.9.6 No fix listed
openzeppelin-contracts = >= 5.0.0-rc.0, < 5.0.2 No fix listed
openzeppelin @openzeppelin/contracts >= 4.5.0, < 4.9.6 4.9.6
openzeppelin @openzeppelin/contracts >= 5.0.0, < 5.0.2 5.0.2
openzeppelin contracts upgradeable >= 4.5.0, <= 4.9.6 No fix listed
openzeppelin contracts upgradeable >= 5.0.0, < 5.0.2 5.0.2

References