{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-27094","id":"CVE-2024-27094","title":"OpenZeppelin Contracts base64 encoding may read from potentially dirty memory","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.","descriptionLong":"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.","published":"2024-02-29T18:18:24.721Z","updated":"2026-10-28T02:31:11.935206903Z","reserved":"2024-02-19T14:43:05.993Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H","rating":"medium","source":"GitHub_M"},"metrics":[{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H","rating":"medium","source":"GitHub_M"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H","rating":"medium","source":"github.com"},{"version":"3.1","score":7.4,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H","rating":"high","source":"NVD"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H","rating":"medium","source":"OSV"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H","rating":"medium","source":"GitHub"}],"rating":"medium","products":["openzeppelin-contracts"],"affectedProducts":[{"vendor":"OpenZeppelin","product":"openzeppelin-contracts","defaultStatus":null,"versions":[{"version":">= 4.5.0, < 4.9.6","status":"affected"},{"version":">= 5.0.0-rc.0, < 5.0.2","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"@openzeppelin/contracts","purl":"pkg:npm/%40openzeppelin/contracts","ranges":[">=4.5.0 <4.9.6",">=5.0.0-rc.0 <5.0.2"],"fixed":["4.9.6","5.0.2"],"advisory":"GHSA-9vx6-7xxf-x967"},{"ecosystem":"npm","name":"@openzeppelin/contracts-upgradeable","purl":"pkg:npm/%40openzeppelin/contracts-upgradeable","ranges":[">=5.0.0-rc.0 <5.0.2",">=4.5.0 <4.9.6"],"fixed":["5.0.2","4.9.6"],"advisory":"GHSA-9vx6-7xxf-x967"}],"cwes":["CWE-125"],"aliases":["GHSA-9vx6-7xxf-x967"],"references":[{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9vx6-7xxf-x967","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/commit/2d081f24cac1a867f6f73d512f2022e1fa987854","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/commit/723f8cab09cdae1aca9ec9cc1cfa040c2d4b06c1","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/commit/92224533b1263772b0774eec3134e132a3d7b2a6","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts/commit/a6286d0fded8771b3a645e5813e51993c490399c","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27094.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27094","tags":["advisory"]},{"url":"https://github.com/OpenZeppelin/openzeppelin-contracts","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial"},"epss":0.00763,"epssPercentile":0.56094,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-27094","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27094","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-27094","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-9vx6-7xxf-x967","ok":true,"note":"GHSA-9vx6-7xxf-x967"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-27094","ok":true,"note":"scored 2026-11-18"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}