# CVE-2023-34459: OpenZeppelin Contracts's MerkleProof multiproofs may allow proving arbitrary leaves for specific trees

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.3
- **CVSS:** 5.3 (v3.1, CNA) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N`
- **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
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.36% (percentile 22, 2026-11-26)
- **CWE:** CWE-354
- **Aliases:** GHSA-wprv-93r4-jj2p
- **Published:** 2023-06-16T22:13:18.181Z
- **Modified:** 2026-09-10T03:50:02.441Z

## 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

## 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

- npm `@openzeppelin/contracts`: affected \>= 4.7.0, \< 4.9.2; fixed 4.9.2 (osv)
- npm `@openzeppelin/contracts-upgradeable`: affected \>= 4.7.0, \< 4.9.2; fixed 4.9.2 (osv)
- openzeppelin-contracts: \>= 4.7.0, \< 4.9.2 (cvelist)

## Mitigation

- Upgrade @openzeppelin/contracts to 4.9.2 or later.
- Upgrade @openzeppelin/contracts-upgradeable to 4.9.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- vendor: <https://github.com/OpenZeppelin/openzeppelin-contracts/security/advisories/GHSA-wprv-93r4-jj2p>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2023-34459>
- patch: <https://github.com/OpenZeppelin/openzeppelin-contracts/commit/4d2383e17186be3e8ccf5a442e9686ecc7de1c55>
- other: <https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v4.9.2>
- other: <https://github.com/OpenZeppelin/openzeppelin-contracts>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-34459>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-wprv-93r4-jj2p> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2023-34459> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-34459>
