CVE-2023-34459
OpenZeppelin Contracts's MerkleProof multiproofs may allow proving arbitrary leaves for specific trees
Also known as GHSA-wprv-93r4-jj2p
Mitigation
- Upgrade @openzeppelin/contracts to 4.9.2 or later.
- Upgrade @openzeppelin/contracts-upgradeable to 4.9.2 or later.
Who should check
- Projects that depend on npm package @openzeppelin/contracts (>= 4.7.0, < 4.9.2)
- Projects that depend on npm package @openzeppelin/contracts-upgradeable (>= 4.7.0, < 4.9.2)
- Anyone running openzeppelin-contracts >= 4.7.0, < 4.9.2
Vulnerability facts
- Affected
- @openzeppelin/contracts >= 4.7.0, < 4.9.2; @openzeppelin/contracts-upgradeable >= 4.7.0, < 4.9.2
- Fixed in
- 4.9.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 5.3 (v3.1, CNA)CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: High
- Availability impact: None
- EPSS
- 0.36% chance of exploitation in 30 days (percentile 22, 2026-11-26)
- CWE
- CWE-354
- Modified
Description
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.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm @openzeppelin/contracts | >= 4.7.0, < 4.9.2 | 4.9.2 | osv |
| npm @openzeppelin/contracts-upgradeable | >= 4.7.0, < 4.9.2 | 4.9.2 | osv |
| openzeppelin-contracts | >= 4.7.0, < 4.9.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-34459. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-34459.md Affected: @openzeppelin/contracts >= 4.7.0, < 4.9.2; @openzeppelin/contracts-upgradeable >= 4.7.0, < 4.9.2 Fixed in: 4.9.2 Steps: 1. Search this machine and project for @openzeppelin/contracts (npm), @openzeppelin/contracts-upgradeable (npm), openzeppelin-contracts: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2023-34459 being exploited?
There is no confirmed exploitation: CVE-2023-34459 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.36% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-34459?
Medium: CVSS 5.3 (v3.1, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2023-34459?
@openzeppelin/contracts >= 4.7.0, < 4.9.2; @openzeppelin/contracts-upgradeable >= 4.7.0, < 4.9.2.
Is there a fix for CVE-2023-34459?
Yes. Fixed in 4.9.2. Upgrade @openzeppelin/contracts to 4.9.2 or later. Upgrade @openzeppelin/contracts-upgradeable to 4.9.2 or later.
How do I check if I'm affected by CVE-2023-34459?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.