{"id":"CVE-2024-27094","published":"2024-02-29T18:18:24Z","modified":"2024-08-02T19:35:12Z","title":"OpenZeppelin Contracts base64 encoding may read from potentially dirty memory","vendor":"OpenZeppelin","product":"openzeppelin-contracts","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00881,"percentile":0.5688,"provenance":"source"},"cwes":[{"id":"CWE-125","name":"Out-of-bounds Read"}],"references":[{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9vx6-7xxf-x967","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/commit/2d081f24cac1a867f6f73d512f2022e1fa987854","tags":["x_refsource_MISC"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/commit/723f8cab09cdae1aca9ec9cc1cfa040c2d4b06c1","tags":["x_refsource_MISC"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/commit/92224533b1263772b0774eec3134e132a3d7b2a6","tags":["x_refsource_MISC"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/commit/a6286d0fded8771b3a645e5813e51993c490399c","tags":["x_refsource_MISC"]}],"priority":{"score":15.9,"factors":[{"name":"EPSS percentile","points":11.38},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"openzeppelin","affectedVersions":[{"vendor":"OpenZeppelin","product":"openzeppelin-contracts","versions":[">= 4.5.0, < 4.9.6",">= 5.0.0-rc.0, < 5.0.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-08-02T19:34:52.561037Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@openzeppelin/contracts","vulnerableRanges":[">=4.5.0, <4.9.6",">=5.0.0-rc.0, <5.0.2"],"patched":["4.9.6","5.0.2"],"from":["GHSA-9vx6-7xxf-x967"],"provenance":"source"},{"ecosystem":"npm","package":"@openzeppelin/contracts-upgradeable","vulnerableRanges":[">=5.0.0-rc.0, <5.0.2",">=4.5.0, <4.9.6"],"patched":["5.0.2","4.9.6"],"from":["GHSA-9vx6-7xxf-x967"],"provenance":"source"}],"euvd":{"id":"EUVD-2024-0602","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2023-34459","published":"2023-06-16","fixed":"4.9.2","kev":false},{"cve":"CVE-2023-40014","published":"2023-08-10","fixed":"4.9.3","kev":false},{"cve":"CVE-2023-49798","published":"2023-12-08","fixed":"4.9.5","kev":false,"link":{"from":"CVE-2023-49798","to":"CVE-2024-27094","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@openzeppelin/contracts","fromFixed":"4.9.5","toFixed":"4.9.6","daysApart":83},{"kind":"version-step","provenance":"source","package":"npm:@openzeppelin/contracts-upgradeable","fromFixed":"4.9.5","toFixed":"4.9.6","daysApart":83}]}},{"cve":"CVE-2024-27094","published":"2024-02-29","fixed":"5.0.2","kev":false},{"cve":"CVE-2025-54070","published":"2025-07-17","fixed":"5.4.0","kev":false}],"package":"npm:@openzeppelin/contracts"}}