OpenZeppelin Contracts's MerkleProof multiproofs may allow proving arbitrary leaves for specific trees
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Impact type
- —
- Confidentiality · integrity · availability
- None · High · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.
Summary
OpenZeppelin Contracts is a library for smart contract development. Starting in version 4.7.0 and prior to version 4.9.2, when the `verifyMultiProof`, `verifyMultiProofCalldata`, `procesprocessMultiProof`, or `processMultiProofCalldat` functions are in use, it is possible to construct merkle trees that allow forging a valid multiproof for an arbitrary set of leaves. A contract may be vulnerable if it uses multiproofs for verification and the merkle tree that is processed includes a node with value 0 at depth 1 (just under the root). This could happen inadvertedly for balanced trees with 3 leaves or less, if the leaves are not hashed. This could happen deliberately if a malicious tree builder includes such a node in the tree. A contract is not vulnerable if it uses single-leaf proving (`verify`, `verifyCalldata`, `processProof`, or `processProofCalldata`), or if it uses multiproofs with a known tree that has hashed leaves. Standard merkle trees produced or validated with the @openzeppelin/merkle-tree library are safe. The problem has been patched in version 4.9.2. Some workarounds are available. For those using multiproofs: When constructing merkle trees hash the leaves and do not insert empty nodes in your trees. Using the @openzeppelin/merkle-tree package eliminates this issue. Do not accept user-provided merkle roots without reconstructing at least the first level of the tree. Verify the merkle tree structure by reconstructing it from the leaves.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| OpenZeppelin | openzeppelin-contracts | 4.7.0 to before 4.9.2 | 4.9.2 | Patch available | CNA |
| — | @openzeppelin/contracts (npm) | 4.7.0 to before 4.9.2 | 4.9.2 | Patch available | GHSA-wprv-93r4-jj2p |
| — | @openzeppelin/contracts-upgradeable (npm) | 4.7.0 to before 4.9.2 | 4.9.2 | Patch available | GHSA-wprv-93r4-jj2p |
- openzeppelin-contracts VendorOpenZeppelin Affected 4.7.0 to before 4.9.2 Fixed in 4.9.2 Patch available CNA
- @openzeppelin/contracts (npm) Vendor— Affected 4.7.0 to before 4.9.2 Fixed in 4.9.2 Patch available GHSA-wprv-93r4-jj2p
- @openzeppelin/contracts-upgradeable (npm) Vendor— Affected 4.7.0 to before 4.9.2 Fixed in 4.9.2 Patch available GHSA-wprv-93r4-jj2p
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:* | 4.7.0 to before 4.9.2 | Vulnerable | OpenZeppelin |
| cpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:* | 4.7.0 to before 4.9.2 | Vulnerable | OpenZeppelin |
- cpe:2.3:a:openzeppelin:contracts:*:*:*:*:*:node.js:*:* Versions 4.7.0 to before 4.9.2 Vulnerable ·OpenZeppelin
- cpe:2.3:a:openzeppelin:contracts_upgradeable:*:*:*:*:*:node.js:*:* Versions 4.7.0 to before 4.9.2 Vulnerable ·OpenZeppelin
Remediation
- Fix · CNA openzeppelin-contracts (OpenZeppelin) Fixed in 4.9.2
- Fix · GHSA-wprv-93r4-jj2p @openzeppelin/contracts (npm) Fixed in 4.9.2 Advisory →
- Fix · GHSA-wprv-93r4-jj2p @openzeppelin/contracts-upgradeable (npm) Fixed in 4.9.2 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2023-34459
- 2026-10-03 Alias added: GHSA-wprv-93r4-jj2p
References
Advisory 2
More OpenZeppelin Contracts vulnerabilities
- TI-2022-13196 OpenZeppelin Contracts for Cairo account cannot process transactions on Goerli CVSS 3.1MEDIUM 6.5
- TI-2021-16554 TimelockController vulnerability in OpenZeppelin Contracts CVSS 3.1CRITICAL 10.0
- TI-2021-16553 TimelockController vulnerability in OpenZeppelin Contracts CVSS 3.1CRITICAL 10.0
- TI-2021-18096 UUPSUpgradeable vulnerability in OpenZeppelin Contracts CVSS 3.1CRITICAL 9.8
- TI-2022-13238 GovernorVotesQuorumFraction updates to quorum may affect past defeated proposals in @openzeppelin/contracts CVSS 3.1HIGH 7.5
- TI-2022-13212 OpenZeppelin Contracts's ERC165Checker may revert instead of returning false CVSS 3.1HIGH 7.5
Sources
- CVE-2023-34459 · CVE Program
- CVE-2023-34459 · NVD
- FIRST EPSS
- GHSA-wprv-93r4-jj2p · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences