Średnia

OpenZeppelin Contracts using MerkleProof multiproofs may allow proving arbitrary leaves for specific trees

  • Ujawniono: 19.06.2023
  • Aktualizacja: 11.10.2026 10:22

Impact

When the verifyMultiProof, verifyMultiProofCalldata, processMultiProof, or processMultiProofCalldata 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 inadvertently 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.

Patches

The problem has been patched in 4.9.2.

Workarounds

If you are 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.

Czego dotyczy

Kliknij technologię, aby zobaczyć wszystkie dotyczące jej podatności.

PlatformaPaczkaPodatne wersjePoprawka w wersji
Paczka npm @openzeppelin/contracts >= 4.7.0, < 4.9.2 4.9.2
Paczka npm @openzeppelin/contracts-upgradeable >= 4.7.0, < 4.9.2 4.9.2

Odnośniki

Ocena CVSS 5.3/10
Wektor CVSS
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
Słabość (CWE)
CWE-354
Platforma
npm
Paczka
@openzeppelin/contracts, @openzeppelin/contracts-upgradeable
Ujawniono
19.06.2023
Aktualizacja
11.10.2026 10:22

Źródła i licencje

OSV / GitHub Advisory Database - GHSA-wprv-93r4-jj2p - CC BY 4.0

Historia podatności: @openzeppelin/contracts

Wszystkie opisane podatności tej paczki (Paczka npm), od najnowszej. Widać, czy to jednorazowa wpadka, czy paczka, której trzeba pilnować.

Wszystkie (20) w archiwum
Wszystkich wpisów
20
Pierwsza → ostatnia
08.2021 07.2025
Bez poprawki
0
Wykorzystywana w atakach
0

Rozkład istotności

  • Krytyczna 2
  • Wysoka 5
  • Średnia 12
  • Niska 1

Ujawnienia w latach

  1. 2021: 4
  2. 2022: 7
  3. 2023: 7
  4. 2024: 1
  5. 2025: 1
  6. 2026: 0
Istotność:
  1. OpenZeppelin Contracts using MerkleProof multiproofs may allow proving arbitrary leaves for specific trees ten wpis
    Średnia · 5.3 CVE-2023-34459 >= 4.7.0, < 4.9.2 4.9.2
  2. Wysoka · 8.8 CVE-2023-30542 >= 4.3.0, < 4.8.3 4.8.3
  3. Wysoka · 7.9 CVE-2022-35961 >= 4.1.0, < 4.7.3 4.7.3
  4. Wysoka · 7.5 CVE-2022-31172 >= 4.1.0, < 4.7.1 4.7.1
  5. Wysoka · 7.5 CVE-2022-31170 >= 4.0.0, < 4.7.1 4.7.1
  6. Krytyczna · 9.8 CVE-2021-41264 >= 4.1.0, < 4.3.2 4.3.2
  7. Krytyczna · 10.0 CVE-2021-39167 >= 4.0.0, < 4.3.1, >= 3.3.0, < 3.4.2 4.3.1, 3.4.2

Dowiedz się, które podatności dotyczą Twojej aplikacji

Po podłączeniu integracji DockRay i włączeniu raportowania oprogramowania DockRay porównuje zgłoszone wersje komponentów ze znanymi podatnościami i powiadamia o potwierdzonych dopasowaniach. Zakres zależy od obsługiwanej technologii i dostępnych biuletynów.

Podłącz swoją aplikację
Newsletter DockRay

Bezpieczeństwo aplikacji w Twojej skrzynce

Najważniejsze podatności, konkretne zalecenia i praktyczne wskazówki dla Twoich aplikacji. Wybierz technologie i śledź to, co ma znaczenie dla Twojego projektu.

  • Codzienne zestawienie nowych podatności, także krytycznych.
  • Powiadomienia o ważnych aktualizacjach.
  • Praktyczne porady o bezpieczeństwie i monitoringu aplikacji.

Pozostaw puste, aby otrzymywać informacje o wszystkich technologiach.

Zapis jest bezpłatny. Wypiszesz się jednym kliknięciem w wiadomości.