CVE-2024-27094
Medium
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.
SeverityMedium
CVSS6.5
Exploit probability—
ProductOpenzeppelin Contracts
PublishedMar 21, 2024
First seenMar 21, 2024
Weakness typeCWE-125Out-of-bounds read
How to fix
Update
- openzeppelin contracts4.9.6, 5.0.2 or later
- openzeppelin contracts_upgradeable5.0.2 or later
- @openzeppelin/contracts4.9.6, 5.0.2 or later
- @openzeppelin/contracts-upgradeable5.0.2, 4.9.6 or later
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| openzeppelin contracts | 4.5.0 ≤ v < 4.9.6, 5.0.0 ≤ v < 5.0.2 | 4.9.6, 5.0.2 |
| openzeppelin contracts_upgradeable | 4.5.0 ≤ v ≤ 4.9.6, 5.0.0 ≤ v < 5.0.2 | 5.0.2 |
| @openzeppelin/contractsnpm | 4.5.0 ≤ v < 4.9.6, 5.0.0-rc.0 ≤ v < 5.0.2 | 4.9.6, 5.0.2 |
| @openzeppelin/contracts-upgradeablenpm | 5.0.0-rc.0 ≤ v < 5.0.2, 4.5.0 ≤ v < 4.9.6 | 5.0.2, 4.9.6 |
Check your version
Choose the product and enter the version you run to see whether it falls in the affected range.
In the Intelligence 360 plan
Attack Surface Management
See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.