{"cve":"CVE-2024-27094","nvd":{"published":"2024-03-21T02:52:18.063","modified":"2026-06-17T07:19:09.020","status":"Analyzed","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.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H","score":7.4},"cwes":["CWE-125"],"references":["https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/commit/2d081f24cac1a867f6f73d512f2022e1fa987854","https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/commit/723f8cab09cdae1aca9ec9cc1cfa040c2d4b06c1","https://github.com/OpenZeppelin/openzeppelin-contracts/commit/92224533b1263772b0774eec3134e132a3d7b2a6","https://github.com/OpenZeppelin/openzeppelin-contracts/commit/a6286d0fded8771b3a645e5813e51993c490399c","https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9vx6-7xxf-x967"],"products":["openzeppelin:contracts","openzeppelin:contracts_upgradeable"],"source":"nvd","synced_at":"2026-10-19T21:47:51.568503435+00:00"},"epss":{"cve":"CVE-2024-27094","score":0.00763,"percentile":0.55395,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-9vx6-7xxf-x967","url":"https://osv.dev/vulnerability/GHSA-9vx6-7xxf-x967","summary":"OpenZeppelin Contracts base64 encoding may read from potentially dirty memory","modified":"2025-12-05T12:36:38.324850Z","packages":[{"ecosystem":"npm","name":"@openzeppelin/contracts","purl":"pkg:npm/%40openzeppelin/contracts","ranges":[">=4.5.0 <4.9.6"],"fixed":["4.9.6"]},{"ecosystem":"npm","name":"@openzeppelin/contracts-upgradeable","purl":"pkg:npm/%40openzeppelin/contracts-upgradeable","ranges":[">=5.0.0-rc.0 <5.0.2"],"fixed":["5.0.2"]},{"ecosystem":"npm","name":"@openzeppelin/contracts","purl":"pkg:npm/%40openzeppelin/contracts","ranges":[">=5.0.0-rc.0 <5.0.2"],"fixed":["5.0.2"]},{"ecosystem":"npm","name":"@openzeppelin/contracts-upgradeable","purl":"pkg:npm/%40openzeppelin/contracts-upgradeable","ranges":[">=4.5.0 <4.9.6"],"fixed":["4.9.6"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}