Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. web3-utils
  4. ›
  5. CVE-2024-21505

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

March 25, 2024

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.

References

  • github.com/advisories/GHSA-87qp-7cw8-8q9c
  • github.com/web3/web3.js
  • github.com/web3/web3.js/commit/8ed041c6635d807b3da8960ad49e125e3d1b0e80
  • nvd.nist.gov/vuln/detail/CVE-2024-21505
  • security.snyk.io/vuln/SNYK-JS-WEB3UTILS-6229337

Code Behaviors & Features

Detect and mitigate CVE-2024-21505 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.2.1

Fixed versions

  • 4.2.1

Solution

Upgrade to version 4.2.1 or above.

Impact 7.5 HIGH

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Source file

npm/web3-utils/CVE-2024-21505.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 13 May 2025 12:15:54 +0000.