CVE-2024-27094

OpenZeppelin Contracts base64 encoding may read from potentially dirty memory

Published Feb 29, 2024 CVSS 3.1 · 6.5 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2024-0602 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.
Github GHSA Github GHSA GHSA-9vx6-7xxf-x967 OpenZeppelin Contracts base64 encoding may read from potentially dirty memory
History
Type Values Removed Values Added
First Time appeared Openzeppelin contracts
Openzeppelin contracts Upgradeable
CPEs cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:*
cpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:*
Vendors & Products Openzeppelin contracts
Openzeppelin contracts Upgradeable
Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 2, 2024, 7:35 PM
Reserved
Feb 19, 2024, 2:43 PM
Status
Analyzed
Published
Mar 21, 2024, 2:52 AM
Modified
Jun 17, 2026, 7:19 AM