CVE-2023-34459
Last modified
CVE-2023-34459 is a medium-severity vulnerability rated 5.9/10 on the CVSS scale. 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). EPSS estimates a 0.37% chance of exploitation in the next 30 days.
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.
Metrics
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Weakness Enumeration
Affected Software
| Vendor | Product | Versions |
|---|---|---|
| Openzeppelin | Contracts | >= 4.7.0, < 4.9.2 |
| Openzeppelin | Contracts Upgradeable | >= 4.7.0, < 4.9.2 |
References
Timeline
- Published
- Last Modified
- Status
- Modified
Frequently Asked Questions
What is CVE-2023-34459?
How severe is CVE-2023-34459?
How do I fix CVE-2023-34459?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2023
- CVE-2023-34452Grav is a flat-file content management system. In versions 1…6.1
- CVE-2023-34453snappy-java is a fast compressor/decompressor for Java. Due …7.5
- CVE-2023-34454snappy-java is a fast compressor/decompressor for Java. Due …7.5
- CVE-2023-34455snappy-java is a fast compressor/decompressor for Java. Due …7.5
- CVE-2023-34457MechanicalSoup is a Python library for automating interactio…7.5
- CVE-2023-34458mx-chain-go is the official implementation of the MultiversX…5.3
- CVE-2023-3446Issue summary: Checking excessively long DH keys or paramete…5.3
- CVE-2023-34460Tauri is a framework for building binaries for all major des…9.8
- CVE-2023-34461PyBB is an open source bulletin board. A manual code review …5.4
- CVE-2023-34462Netty is an asynchronous event-driven network application fr…6.5
- CVE-2023-34463DataEase is an open source data visualization analysis tool …8.1
- CVE-2023-34464XWiki Platform is a generic wiki platform offering runtime s…5.4
Are you affected by CVE-2023-34459?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
