CVE-2024-27094

OpenZeppelin Contracts base64 encoding may read from potentially dirty memory

State
Published
Severity
6.5 Medium
Published
Feb 29, 2024
Updated
Aug 2, 2024
Reserved
Feb 19, 2024

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.16.5 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:HGitHub_M

Weaknesses

Affected Products

ProductVersions
openzeppelin-contractsOpenZeppelin
  • >= 4.5.0, < 4.9.6Affected
  • >= 5.0.0-rc.0, < 5.0.2Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.