Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2024-21505
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 2 Nov 2026, 18:32 UTC · Revision 1
Source evidence
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.
osv:CVE-2024-21505
Complete source record
{
"id": "f67a794b486a98ebec0ec9adf88662ed2c0529f252c27cd048fed05dc33e3509",
"url": "https://osv.dev/vulnerability/CVE-2024-21505",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2024-21505",
"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. 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.",
"evidence": "osv:CVE-2024-21505",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2024-21505",
"aliases": [
"CVE-2024-21505",
"GHSA-2g4c-8fpm-c46v"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H/E:P"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/web3/web3.js",
"type": "GIT",
"events": [
{
"introduced": "0cb67d7b306d8c159d1db7fd0e0d58a294017913"
},
{
"fixed": "a6c6dec9fef078ced630677de67dc379b4fd5b81"
},
{
"fixed": "8ed041c6635d807b3da8960ad49e125e3d1b0e80"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "3-utils"
},
{
"fixed": "4.2.1"
}
],
"source": "DESCRIPTION"
},
{
"range": [
{
"fixed": "8ed041c6635d807b3da8960ad49e125e3d1b0e80"
}
],
"source": "REFERENCES_COMMIT"
}
]
}
}
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-21505.json"
}
}
],
"modified": "2026-10-28T02:30:22.337128014Z",
"provider": "osv",
"references": [
"https://security.snyk.io/vuln/SNYK-JS-WEB3UTILS-6229337",
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21505.json",
"https://nvd.nist.gov/vuln/detail/CVE-2024-21505",
"https://github.com/web3/web3.js/commit/8ed041c6635d807b3da8960ad49e125e3d1b0e80"
],
"provider_metadata": {
"cwe_ids": [
"CWE-1321"
],
"cna_assigner": "snyk",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/21xxx/CVE-2024-21505.json"
}
},
"related_cves": [
{
"value": "CVE-2024-21505",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 488548,
"published_at": "2024-03-25T05:00:00.749+00:00"
}