Skip to main content
← All vulnerabilities
CVE-2024-27094GHSA-9VX6-7XXF-X967

OpenZeppelin Contracts base64 encoding may read from potentially dirty memory

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 4.9.6, 5.0.2
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: none
  • Automatable: no
  • Technical impact: partial

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: none · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • OpenZeppelin openzeppelin-contracts

    From 4.5.0 · fixed in 4.9.6; From 5.0.0-rc.0 · fixed in 5.0.2

  • @openzeppelin/contractsnpm

    From 4.5.0 · fixed in 4.9.6

  • @openzeppelin/contracts-upgradeablenpm

    From 5.0.0-rc.0 · fixed in 5.0.2

  • @openzeppelin/contractsnpm

    From 5.0.0-rc.0 · fixed in 5.0.2

  • @openzeppelin/contracts-upgradeablenpm

    From 4.5.0 · fixed in 4.9.6

References 5

GitHub · OpenZeppelin/openzeppelin-contracts

GitHub · OpenZeppelin/openzeppelin-contracts-upgradeable