OpenZeppelin Contracts up to 4.9.2 Merkle Tree Structure integrity check

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.1$0-$5k0.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.

Productinfo

Vendor

Name

Version

License

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB CVSS-B Score: 🔒
VulDB CVSS-BT Score: 🔒
VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.1
VulDB 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.): 🔒

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock
unlockunlockunlockunlockunlockunlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Integrity check
CWE: 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-Dayunlockunlockunlockunlock
Todayunlockunlockunlockunlock

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: Contracts 4.9.2
Patch: 4d2383e17186be3e8ccf5a442e9686ecc7de1c55

Timelineinfo

06/06/2023 CVE reserved
06/17/2023 +11 days Advisory disclosed
06/17/2023 +0 days VulDB entry created
07/14/2023 +27 days VulDB entry last update

Sourcesinfo

Advisory: GHSA-wprv-93r4-jj2p
Status: Confirmed

CVE: CVE-2023-34459 (🔒)
See also: 🔒

Entryinfo

Created: 06/17/2023 08:03
Updated: 07/14/2023 14:22
Changes: 06/17/2023 08:03 (54), 07/14/2023 14:22 (11)
Complete: 🔍
Cache ID: 18:5F4:103

Discussion

No comments yet. Languages: en.

Please log in to comment.

Interested in the pricing of exploits?

See the underground prices here!