CVE-2023-34459
JavaScript vulnerability analysis and mitigation

Overview

OpenZeppelin Contracts, a library for smart contract development, was found to contain a vulnerability (CVE-2023-34459) affecting versions 4.7.0 to 4.9.2. The vulnerability allows attackers to forge valid multiproofs for arbitrary sets of leaves in merkle trees when using specific verification functions. The issue was discovered and disclosed on June 16, 2023, and affects the library's merkle proof verification functionality (Vendor Advisory).

Technical details

The vulnerability exists in the verifyMultiProof, verifyMultiProofCalldata, processMultiProof, and processMultiProofCalldata functions. The issue occurs when a merkle tree contains a node with value 0 at depth 1 (just under the root). This can happen inadvertently in balanced trees with 3 leaves or less if the leaves are not hashed, or deliberately if a malicious tree builder includes such a node. The vulnerability has been assigned a CVSS v3.1 base score of 5.9 (Medium) with vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N (NVD).

Impact

When exploited, the vulnerability allows attackers to forge valid multiproofs for arbitrary sets of leaves in affected merkle trees. This could potentially compromise the integrity of systems relying on these merkle proof verifications. However, contracts using single-leaf proving functions (verify, verifyCalldata, processProof, or processProofCalldata) or multiproofs with known trees that have hashed leaves are not affected (Vendor Advisory).

Mitigation and workarounds

The vulnerability has been patched in version 4.9.2. For those unable to update immediately, several workarounds are available: 1) Hash the leaves when constructing merkle trees and avoid inserting empty nodes, 2) Use the @openzeppelin/merkle-tree package which is not affected by this issue, 3) Do not accept user-provided merkle roots without reconstructing at least the first level of the tree, and 4) Verify the merkle tree structure by reconstructing it from the leaves (Vendor Advisory, Release Notes).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66456CRITICAL9.1
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-66457HIGH7.5
  • JavaScriptJavaScript
  • elysia
NoYesDec 09, 2025
CVE-2025-65849MEDIUM6.9
  • JavaScriptJavaScript
  • altcha
NoNoDec 08, 2025
CVE-2025-66202MEDIUM6.5
  • JavaScriptJavaScript
  • astro
NoYesDec 09, 2025
CVE-2025-14284MEDIUM5.1
  • JavaScriptJavaScript
  • @tiptap/extension-link
NoYesDec 09, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management