CVE-2024-21505
JSON

7.5high

web3-utils Prototype Pollution vulnerability

Severity
7.5high CVSS:3.1 by snyk
Exploit likelihood
0.72% (higher than 55% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
snyk
Also known as
GHSA-2g4c-8fpm-c46v

Description

Versions of the package web3-utils before 4.2.1 are vulnerable to Prototype Pollution via the utility functions format and mergeDeep, due to insecure recursive merge. An attacker can manipulate an object's prototype, potentially leading to the alteration of the behavior of all objects inheriting from the affected prototype by passing specially crafted input to these functions.

Affected

Product or packageVersionsReported by
web3-utilsbefore 4.2.1CVE List
web3 web3-utilsbefore 4.2.1CVE List
web3-utils (npm)from 4.0.1 before 4.2.1GitHub Advisory Database

All scores

snyk7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-1321

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

Versions of the package web3-utils before 4.2.1 are vulnerable to Prototype Pollution via the utility functions format and mergeDeep, due to insecure recursive merge. An attacker can manipulate an object's prototype, potentially leading to the alteration of the behavior of all objects inheriting from the affected prototype by passing specially crafted input to these functions.

GitHub Advisory Database
Impact:

The mergeDeep() function in the web3-utils package has been identified for Prototype Pollution vulnerability. An attacker has the ability to modify an object's prototype, which could result in changing the behavior of all objects that inherit from the impacted prototype by providing carefully crafted input to function.

Patches:

It has been fixed in web3-utils version 4.2.1 so all packages and apps depending on web3-utils >=4.0.1 and <=4.2.0 should upgrade to web3-utils 4.2.1.

Workarounds:

None

NVD (es)

Las versiones del paquete web3-utils anteriores a la 4.2.1 son vulnerables a Prototype Pollution a través de las funciones de utilidad format y mergeDeep, debido a una fusión recursiva insegura. Un atacante puede manipular el prototipo de un objeto, lo que podría provocar la alteración del comportamiento de todos los objetos que heredan del prototipo afectado al pasar entradas especialmente manipuladas a estas funciones.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-21505 changed 2024-08-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-2g4c-8fpm-c46v changed 2024-03-27CC-BY-4.0
NVDCVE-2024-21505 changed 2026-06-17Public domain