OpenZeppelin Contracts up to 4.9.2 Merkle Tree Structure integrity check
CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
---|---|---|
5.1 | $0-$5k | 0.00 |
A vulnerability was found in OpenZeppelin Contracts up to 4.9.2. It has been rated as problematic. This issue affects the function verifyMultiProof/verifyMultiProofCalldata/procesprocessMultiProof/processMultiProofCalldat
of the component Merkle Tree Structure Handler. The manipulation with an unknown input leads to a integrity check vulnerability. Using CWE to declare the problem leads to CWE-354. The product does not validate or incorrectly validates the integrity check values or "checksums" of a message. This may prevent it from detecting if the data has been modified or corrupted in transmission. Impacted is integrity, and availability. The summary by CVE is:
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.
The weakness was disclosed 06/17/2023 as GHSA-wprv-93r4-jj2p. It is possible to read the advisory at github.com. The identification of this vulnerability is CVE-2023-34459 since 06/06/2023. Technical details of the vulnerability are known, but there is no available exploit.
Upgrading to version 4.9.2 eliminates this vulnerability. The upgrade is hosted for download at github.com. Applying the patch 4d2383e17186be3e8ccf5a442e9686ecc7de1c55 is able to eliminate this problem. The bugfix is ready for download at github.com. The best possible mitigation is suggested to be upgrading to the latest version.
The entries VDB-186619, VDB-206420, VDB-212996 and VDB-220077 are pretty similar.
Product
Vendor
Name
Version
License
CPE 2.3
CPE 2.2
CVSSv4
VulDB CVSS-B Score: 🔒VulDB CVSS-BT Score: 🔒
VulDB Vector: 🔒
VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 5.1VulDB Meta Temp Score: 5.1
VulDB Base Score: 4.2
VulDB Temp Score: 4.0
VulDB Vector: 🔒
VulDB Reliability: 🔍
NVD Base Score: 5.9
NVD Vector: 🔒
CNA Base Score: 5.3
CNA Vector (GitHub, Inc.): 🔒
CVSSv2
AV | AC | Au | C | I | A |
---|---|---|---|---|---|
💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
---|---|---|---|---|---|
unlock | unlock | unlock | unlock | unlock | unlock |
unlock | unlock | unlock | unlock | unlock | unlock |
unlock | unlock | unlock | unlock | unlock | unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Integrity checkCWE: CWE-354 / CWE-345
CAPEC: 🔒
ATT&CK: 🔒
Local: No
Remote: Yes
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
0-Day | unlock | unlock | unlock | unlock |
---|---|---|---|---|
Today | unlock | unlock | unlock | unlock |
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Contracts 4.9.2
Patch: 4d2383e17186be3e8ccf5a442e9686ecc7de1c55
Timeline
06/06/2023 CVE reserved06/17/2023 Advisory disclosed
06/17/2023 VulDB entry created
07/14/2023 VulDB entry last update
Sources
Advisory: GHSA-wprv-93r4-jj2pStatus: Confirmed
CVE: CVE-2023-34459 (🔒)
See also: 🔒
Entry
Created: 06/17/2023 08:03Updated: 07/14/2023 14:22
Changes: 06/17/2023 08:03 (54), 07/14/2023 14:22 (11)
Complete: 🔍
Cache ID: 18:5F4:103
No comments yet. Languages: en.
Please log in to comment.