CVE-2024-27094
HIGH 7.4CVSS 3.1OpenZeppelin Contracts base64 encoding may read from potentially dirty memory
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
- 21 Mar 2024
- Last modified
- 17 Jun 2026
- Assigned by
- security-advisories@github.com
- NVD status
- Analyzed
- Weakness
- CWE-125
- Also known as
- GHSA-9vx6-7xxf-x967
- Sources
- NVDJSONOSV GHSA-9vx6-7xxf-x967JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 7.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H |
| NVD | security-advisories@github.com (Secondary) | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H |
| OSV | GitHub | CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | openzeppelin | contractscpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:* |
>= 4.5.0, < 4.9.6 | 4.9.6 |
| NVD | openzeppelin | contractscpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:* |
>= 5.0.0, < 5.0.2 | 5.0.2 |
| NVD | openzeppelin | contracts_upgradeablecpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:* |
>= 4.5.0, <= 4.9.6 | |
| NVD | openzeppelin | contracts_upgradeablecpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:* |
>= 5.0.0, < 5.0.2 | 5.0.2 |
| OSV | npm | @openzeppelin/contracts | >= 4.5.0, < 4.9.6 | 4.9.6 |
| OSV | npm | @openzeppelin/contracts-upgradeable | >= 5.0.0-rc.0, < 5.0.2 | 5.0.2 |
| OSV | npm | @openzeppelin/contracts | >= 5.0.0-rc.0, < 5.0.2 | 5.0.2 |
| OSV | npm | @openzeppelin/contracts-upgradeable | >= 4.5.0, < 4.9.6 | 4.9.6 |
References
- https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/commit/2d081f24cac1a867f6f73d512f2022e1fa987854 · Patch, WEB
- https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/commit/723f8cab09cdae1aca9ec9cc1cfa040c2d4b06c1 · Patch, WEB
- https://github.com/OpenZeppelin/openzeppelin-contracts/commit/92224533b1263772b0774eec3134e132a3d7b2a6 · Patch, WEB
- https://github.com/OpenZeppelin/openzeppelin-contracts/commit/a6286d0fded8771b3a645e5813e51993c490399c · Patch, WEB
- https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-9vx6-7xxf-x967 · Vendor Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-27094 · ADVISORY
- https://github.com/OpenZeppelin/openzeppelin-contracts · PACKAGE
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 21 Mar 2024)
- 25 Nov 2026 20:10 UTC · OSV: first stored (published 29 Feb 2024)