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.
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
Fixes

Solution

No solution given by the vendor.


Workaround

No workaround given by the vendor.

History

No history.

cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2024-08-02T19:35:12.184Z

Reserved: 2024-02-19T14:43:05.993Z

Link: CVE-2024-27094

cve-icon Vulnrichment

Updated: 2024-08-02T00:27:58.413Z

cve-icon NVD

Status : Awaiting Analysis

Published: 2024-03-21T02:52:18.063

Modified: 2024-11-21T09:03:50.780

Link: CVE-2024-27094

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2025-07-12T22:45:27Z