# CVE-2024-21505: web3-utils Prototype Pollution vulnerability

- Severity: High 7.5 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.72%, higher than 55% of CVEs (2026-12-01)
- Published: 2024-03-25T05:00:00.749Z
- Modified: 2026-06-17T07:09:38.177Z
- Also known as: GHSA-2g4c-8fpm-c46v
- Weaknesses: CWE-1321
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: snyk

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

(As written by CVE List.)

## Affected

- web3-utils: before 4.2.1
- web3 web3-utils: before 4.2.1
- web3-utils (npm): from 4.0.1 before 4.2.1

## Every score

- snyk: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://security.snyk.io/vuln/SNYK-JS-WEB3UTILS-6229337> (web)
- <https://github.com/web3/web3.js/commit/8ed041c6635d807b3da8960ad49e125e3d1b0e80> (web)
- <https://github.com/web3/web3.js/security/advisories/GHSA-2g4c-8fpm-c46v> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-21505> (advisory)
- <https://github.com/web3/web3.js> (package)

## Sources

- CVE List: [CVE-2024-21505](https://www.cve.org/CVERecord?id=CVE-2024-21505), CVE Terms of Use, modified 2024-08-23
- GitHub Advisory Database: [GHSA-2g4c-8fpm-c46v](https://github.com/advisories/GHSA-2g4c-8fpm-c46v), CC-BY-4.0, modified 2024-03-27
- NVD: [CVE-2024-21505](https://nvd.nist.gov/vuln/detail/CVE-2024-21505), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-21505 · Whole record: https://cve.day/CVE-2024-21505.json · Rebuilt by cve.day 2026-11-25T22:58:37.873Z
