{"id":"CVE-2024-21505","aliases":["CVE-2024-21505","GHSA-2g4c-8fpm-c46v"],"related":[],"kind":"vulnerability","state":"published","title":"web3-utils Prototype Pollution vulnerability","summary":"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.\nAn 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.\nAn 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.","source":"cvelist"},{"lang":"en","text":"### Impact: \nThe 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.\n\n### Patches: \nIt 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.\n\n### Workarounds: \nNone","format":"markdown","source":"ghsa"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-03-25T05:00:00.749Z","modified":"2026-06-17T07:09:38.177Z","severity":{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"snyk","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-1321"],"affected":[{"ranges":[{"type":"semver","introduced":"0","fixed":"4.2.1","status":"affected"}],"product":"web3-utils","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"4.2.1","status":"affected"}],"vendor":"web3","product":"web3-utils","cpe":"cpe:2.3:a:web3:web3-utils:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"4.0.1","status":"affected","fixed":"4.2.1"}],"ecosystem":"npm","package":"web3-utils","purl":"pkg:npm/web3-utils","source":"ghsa"}],"references":[{"url":"https://security.snyk.io/vuln/SNYK-JS-WEB3UTILS-6229337","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/web3/web3.js/commit/8ed041c6635d807b3da8960ad49e125e3d1b0e80","tags":["web","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/web3/web3.js/security/advisories/GHSA-2g4c-8fpm-c46v","tags":["web"],"sources":["ghsa"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21505","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/web3/web3.js","tags":["package"],"sources":["ghsa"]}],"credits":["Tariq Hawis"],"assigner":"snyk","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-08-23T19:10:35.532Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-21505","url":"https://www.cve.org/CVERecord?id=CVE-2024-21505","licence":"CVE Terms of Use","modified":"2024-08-23T19:10:40.905Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2g4c-8fpm-c46v","url":"https://github.com/advisories/GHSA-2g4c-8fpm-c46v","licence":"CC-BY-4.0","modified":"2024-03-27T22:11:44.773Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-21505","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-21505","licence":"Public domain","modified":"2026-06-17T07:09:38.177Z"}],"updatedAt":"2026-11-25T22:58:37.873Z","epss":{"score":0.00718,"percentile":0.55084,"date":"2026-12-01T12:00:22.000Z"}}