CWE-1321
AllowedImproperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Abstraction: Variant · Status: Incomplete
The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.
821 vulnerabilities reference this CWE, most recent first.
GHSA-4MVJ-RQ4V-2FXW
Vulnerability from github – Published: 2021-10-21 17:50 – Updated: 2022-12-03 03:56This vulnerability affects all versions of package x-assign. The global proto object can be polluted using the proto object.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "x-assign"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.1.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-23452"
],
"database_specific": {
"cwe_ids": [
"CWE-1321",
"CWE-915"
],
"github_reviewed": true,
"github_reviewed_at": "2021-10-21T14:54:57Z",
"nvd_published_at": "2021-10-20T13:15:00Z",
"severity": "HIGH"
},
"details": "This vulnerability affects all versions of package x-assign. The global proto object can be polluted using the __proto__ object.",
"id": "GHSA-4mvj-rq4v-2fxw",
"modified": "2022-12-03T03:56:39Z",
"published": "2021-10-21T17:50:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-23452"
},
{
"type": "PACKAGE",
"url": "https://github.com/mvoorberg/x-assign"
},
{
"type": "WEB",
"url": "https://runkit.com/embed/sq8qjwemyn8t"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-XASSIGN-1759314"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L",
"type": "CVSS_V3"
}
],
"summary": "Prototype Pollution in x-assign"
}
GHSA-4Q97-FH3F-J294
Vulnerability from github – Published: 2021-05-10 15:59 – Updated: 2021-05-07 21:50All versions of package tiny-conf up to and including version 1.1.0 are vulnerable to Prototype Pollution via the set function.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "tiny-conf"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "1.1.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2020-7724"
],
"database_specific": {
"cwe_ids": [
"CWE-1321"
],
"github_reviewed": true,
"github_reviewed_at": "2021-05-07T21:50:46Z",
"nvd_published_at": "2020-09-01T10:15:00Z",
"severity": "CRITICAL"
},
"details": "All versions of package tiny-conf up to and including version 1.1.0 are vulnerable to Prototype Pollution via the set function.",
"id": "GHSA-4q97-fh3f-j294",
"modified": "2021-05-07T21:50:46Z",
"published": "2021-05-10T15:59:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-7724"
},
{
"type": "WEB",
"url": "https://github.com/tiny-conf/tiny-conf/commit/1f7be78bc68927996647cd45b4367f8975a3ea05"
},
{
"type": "WEB",
"url": "https://snyk.io/vuln/SNYK-JS-TINYCONF-598792"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Prototype Pollution in tiny-conf"
}
GHSA-4R6H-8V6P-XVW6
Vulnerability from github – Published: 2023-04-24 09:30 – Updated: 2025-09-19 15:23All versions of SheetJS CE through 0.19.2 are vulnerable to "Prototype Pollution" when reading specially crafted files. Workflows that do not read arbitrary files (for example, exporting data to spreadsheet files) are unaffected.
A non-vulnerable version cannot be found via npm, as the repository hosted on GitHub and the npm package xlsx are no longer maintained. Version 0.19.3 can be downloaded via https://cdn.sheetjs.com/.
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c 0.19.3"
},
"package": {
"ecosystem": "npm",
"name": "xlsx"
},
"ranges": [
{
"events": [
{
"introduced": "0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-30533"
],
"database_specific": {
"cwe_ids": [
"CWE-1321"
],
"github_reviewed": true,
"github_reviewed_at": "2023-04-24T22:40:42Z",
"nvd_published_at": "2023-04-24T08:15:07Z",
"severity": "HIGH"
},
"details": "All versions of SheetJS CE through 0.19.2 are vulnerable to \"Prototype Pollution\" when reading specially crafted files. Workflows that do not read arbitrary files (for example, exporting data to spreadsheet files) are unaffected.\n\nA non-vulnerable version cannot be found via npm, as the repository hosted on GitHub and the npm package `xlsx` are no longer maintained. Version 0.19.3 can be downloaded via https://cdn.sheetjs.com/.",
"id": "GHSA-4r6h-8v6p-xvw6",
"modified": "2025-09-19T15:23:40Z",
"published": "2023-04-24T09:30:19Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-30533"
},
{
"type": "WEB",
"url": "https://cdn.sheetjs.com"
},
{
"type": "WEB",
"url": "https://cdn.sheetjs.com/advisories/CVE-2023-30533"
},
{
"type": "PACKAGE",
"url": "https://git.sheetjs.com/sheetjs/sheetjs"
},
{
"type": "WEB",
"url": "https://git.sheetjs.com/sheetjs/sheetjs/issues/2667"
},
{
"type": "WEB",
"url": "https://git.sheetjs.com/sheetjs/sheetjs/issues/2986"
},
{
"type": "WEB",
"url": "https://git.sheetjs.com/sheetjs/sheetjs/src/branch/master/CHANGELOG.md"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Prototype Pollution in sheetJS"
}
GHSA-4R97-78GF-Q24V
Vulnerability from github – Published: 2020-09-04 17:53 – Updated: 2025-07-18 19:42Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-8f89-2fwj-5v5r. This link is maintained to preserve external references.
Original Description
Versions of klona prior to 1.1.1 are vulnerable to prototype pollution. The package does not restrict the modification of an Object's prototype when cloning objects, which may allow an attacker to add or modify an existing property that will exist on all objects.
Recommendation
Upgrade to version 1.1.1 or later.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "klona"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.1.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-1321"
],
"github_reviewed": true,
"github_reviewed_at": "2020-08-31T19:00:12Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-8f89-2fwj-5v5r. This link is maintained to preserve external references.\n\n## Original Description\nVersions of `klona` prior to 1.1.1 are vulnerable to prototype pollution. The package does not restrict the modification of an Object\u0027s prototype when cloning objects, which may allow an attacker to add or modify an existing property that will exist on all objects.\n\n\n\n\n## Recommendation\n\nUpgrade to version 1.1.1 or later.",
"id": "GHSA-4r97-78gf-q24v",
"modified": "2025-07-18T19:42:53Z",
"published": "2020-09-04T17:53:27Z",
"references": [
{
"type": "WEB",
"url": "https://hackerone.com/reports/778414"
},
{
"type": "WEB",
"url": "https://www.npmjs.com/advisories/1463"
}
],
"schema_version": "1.4.0",
"severity": [],
"summary": "Duplicate Advisory: Prototype Pollution in klona",
"withdrawn": "2025-07-18T19:42:53Z"
}
GHSA-4VGC-RWR6-7J6R
Vulnerability from github – Published: 2024-12-04 12:31 – Updated: 2024-12-04 12:31In JetBrains YouTrack before 2024.3.52635 multiple merge functions were vulnerable to prototype pollution attack
{
"affected": [],
"aliases": [
"CVE-2024-54156"
],
"database_specific": {
"cwe_ids": [
"CWE-1321"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-04T12:15:20Z",
"severity": "MODERATE"
},
"details": "In JetBrains YouTrack before 2024.3.52635 multiple merge functions were vulnerable to prototype pollution attack",
"id": "GHSA-4vgc-rwr6-7j6r",
"modified": "2024-12-04T12:31:45Z",
"published": "2024-12-04T12:31:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-54156"
},
{
"type": "WEB",
"url": "https://www.jetbrains.com/privacy-security/issues-fixed"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-4VJR-HFPP-2M7W
Vulnerability from github – Published: 2025-04-04 06:34 – Updated: 2025-04-04 18:24Versions of the package expand-object from 0.0.0 to 0.4.2 are vulnerable to Prototype Pollution in the expand() function in index.js. This function expands the given string into an object and allows a nested property to be set without checking the provided keys for sensitive properties like proto.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "expand-object"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "0.4.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-3197"
],
"database_specific": {
"cwe_ids": [
"CWE-1321"
],
"github_reviewed": true,
"github_reviewed_at": "2025-04-04T18:24:05Z",
"nvd_published_at": "2025-04-04T05:15:46Z",
"severity": "MODERATE"
},
"details": "Versions of the package expand-object from 0.0.0 to 0.4.2 are vulnerable to Prototype Pollution in the expand() function in index.js. This function expands the given string into an object and allows a nested property to be set without checking the provided keys for sensitive properties like __proto__.",
"id": "GHSA-4vjr-hfpp-2m7w",
"modified": "2025-04-04T18:24:05Z",
"published": "2025-04-04T06:34:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-3197"
},
{
"type": "WEB",
"url": "https://gist.github.com/miguelafmonteiro/d8f66af61d14e06338b688f90c4dfa7c"
},
{
"type": "PACKAGE",
"url": "https://github.com/jonschlinkert/expand-object"
},
{
"type": "WEB",
"url": "https://github.com/jonschlinkert/expand-object/blob/master/index.js#L13"
},
{
"type": "WEB",
"url": "https://security.snyk.io/vuln/SNYK-JS-EXPANDOBJECT-5821390"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X",
"type": "CVSS_V4"
}
],
"summary": "expand-object Vulnerable to Prototype Pollution via the expand() Function"
}
GHSA-4WM9-3QMV-GVXJ
Vulnerability from github – Published: 2024-07-01 15:32 – Updated: 2024-07-12 19:08rjrodger jsonic-next v2.12.1 was discovered to contain a prototype pollution via the function empty. This vulnerability allows attackers to execute arbitrary code or cause a Denial of Service (DoS) via injecting arbitrary properties.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "jsonic"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "2.12.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-38993"
],
"database_specific": {
"cwe_ids": [
"CWE-1321",
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2024-07-01T21:52:44Z",
"nvd_published_at": "2024-07-01T13:15:04Z",
"severity": "CRITICAL"
},
"details": "rjrodger jsonic-next v2.12.1 was discovered to contain a prototype pollution via the function empty. This vulnerability allows attackers to execute arbitrary code or cause a Denial of Service (DoS) via injecting arbitrary properties.",
"id": "GHSA-4wm9-3qmv-gvxj",
"modified": "2024-07-12T19:08:25Z",
"published": "2024-07-01T15:32:13Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-38993"
},
{
"type": "WEB",
"url": "https://gist.github.com/mestrtee/9a2b522d59c53f31f45c1edb96459693"
},
{
"type": "PACKAGE",
"url": "https://github.com/jsonicjs/jsonic"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "jsonic was discovered to contain a prototype pollution via the function empty.",
"withdrawn": "2024-07-12T19:08:25Z"
}
GHSA-4XCX-CWRQ-W792
Vulnerability from github – Published: 2023-10-06 21:30 – Updated: 2023-10-13 21:26In NASA Open MCT (aka openmct) before commit 545a177 is subject to a prototype pollution which can occur via an import action.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "openmct"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "3.0.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-45282"
],
"database_specific": {
"cwe_ids": [
"CWE-1321"
],
"github_reviewed": true,
"github_reviewed_at": "2023-10-09T00:48:28Z",
"nvd_published_at": "2023-10-06T19:15:12Z",
"severity": "HIGH"
},
"details": "In NASA Open MCT (aka openmct) before commit 545a177 is subject to a prototype pollution which can occur via an import action.",
"id": "GHSA-4xcx-cwrq-w792",
"modified": "2023-10-13T21:26:57Z",
"published": "2023-10-06T21:30:49Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-45282"
},
{
"type": "WEB",
"url": "https://github.com/nasa/openmct/pull/7094/commits/545a1770c523ecc3410dca884c6809d5ff0f9d52"
},
{
"type": "WEB",
"url": "https://github.com/nasa/openmct/commit/2243381d527c0d84cc48e9ace78be7cda5363612"
},
{
"type": "PACKAGE",
"url": "https://github.com/nasa/openmct"
},
{
"type": "WEB",
"url": "https://github.com/nasa/openmct/compare/v3.0.2...v3.1.0"
},
{
"type": "WEB",
"url": "https://nasa.github.io/openmct"
},
{
"type": "WEB",
"url": "https://www.linkedin.com/pulse/prototype-pollution-nasas-open-mct-cve-2023-45282"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "Prototype Pollution in NASA Open MCT"
}
GHSA-529Q-4J3P-7C5R
Vulnerability from github – Published: 2025-09-27 06:30 – Updated: 2025-09-30 20:54Versions of the package algoliasearch-helper from 2.0.0-rc1 and before 3.11.2 are vulnerable to Prototype Pollution in the _merge() function in merge.js, which allows constructor.prototype to be written even though doing so throws an error. In the "extreme edge-case" that the resulting error is caught, code injected into the user-supplied search parameter may be exeucted.
This is related to but distinct from the issue reported in CVE-2021-23433.
NOTE: This vulnerability is not exploitable in the default configuration of InstantSearch since searchParameters are not modifiable by users.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "algoliasearch-helper"
},
"ranges": [
{
"events": [
{
"introduced": "2.0.0-rc1"
},
{
"fixed": "3.11.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-3193"
],
"database_specific": {
"cwe_ids": [
"CWE-1321"
],
"github_reviewed": true,
"github_reviewed_at": "2025-09-30T20:54:39Z",
"nvd_published_at": "2025-09-27T05:15:30Z",
"severity": "MODERATE"
},
"details": "Versions of the package algoliasearch-helper from 2.0.0-rc1 and before 3.11.2 are vulnerable to Prototype Pollution in the _merge() function in merge.js, which allows constructor.prototype to be written even though doing so throws an error. In the \"extreme edge-case\" that the resulting error is caught, code injected into the user-supplied search parameter may be exeucted.\n\nThis is related to but distinct from the issue reported in [CVE-2021-23433](https://security.snyk.io/vuln/SNYK-JS-ALGOLIASEARCHHELPER-1570421).\n\n**NOTE:** This vulnerability is not exploitable in the default configuration of InstantSearch since searchParameters are not modifiable by users.",
"id": "GHSA-529q-4j3p-7c5r",
"modified": "2025-09-30T20:54:39Z",
"published": "2025-09-27T06:30:52Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-3193"
},
{
"type": "WEB",
"url": "https://github.com/algolia/algoliasearch-helper-js/issues/922"
},
{
"type": "WEB",
"url": "https://github.com/algolia/algoliasearch-helper-js/commit/776dff23c87b0902e554e02a8c2567d2580fe12a"
},
{
"type": "PACKAGE",
"url": "https://github.com/algolia/algoliasearch-helper-js"
},
{
"type": "WEB",
"url": "https://security.snyk.io/vuln/SNYK-JS-ALGOLIASEARCHHELPER-3318396"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
],
"summary": "algoliasearch-helper is vulnerable to Prototype Pollution in _merge()"
}
GHSA-53RP-33P8-4HM8
Vulnerability from github – Published: 2025-02-06 06:31 – Updated: 2025-02-06 15:32A prototype pollution in the lib.merge function of xe-utils v3.5.31 allows attackers to cause a Denial of Service (DoS) via supplying a crafted payload.
{
"affected": [],
"aliases": [
"CVE-2024-57074"
],
"database_specific": {
"cwe_ids": [
"CWE-1321",
"CWE-400"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-02-05T22:15:31Z",
"severity": "HIGH"
},
"details": "A prototype pollution in the lib.merge function of xe-utils v3.5.31 allows attackers to cause a Denial of Service (DoS) via supplying a crafted payload.",
"id": "GHSA-53rp-33p8-4hm8",
"modified": "2025-02-06T15:32:52Z",
"published": "2025-02-06T06:31:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-57074"
},
{
"type": "WEB",
"url": "https://gist.github.com/tariqhawis/82e3eb472d03273a74e40242e8356297"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation
By freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.
Mitigation
By blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.
Mitigation
Strategy: Input Validation
When handling untrusted objects, validating using a schema can be used.
Mitigation
By using an object without prototypes (via Object.create(null) ), adding object prototype attributes by accessing the prototype via the special attributes becomes impossible, mitigating this weakness.
Mitigation
Map can be used instead of objects in most cases. If Map methods are used instead of object attributes, it is not possible to access the object prototype or modify it.
CAPEC-1: Accessing Functionality Not Properly Constrained by ACLs
In applications, particularly web applications, access to functionality is mitigated by an authorization framework. This framework maps Access Control Lists (ACLs) to elements of the application's functionality; particularly URL's for web apps. In the case that the administrator failed to specify an ACL for a particular element, an attacker may be able to access it with impunity. An attacker with the ability to access functionality not properly constrained by ACLs can obtain sensitive information and possibly compromise the entire application. Such an attacker can access resources that must be available only to users at a higher privilege level, can access management sections of the application, or can run queries for data that they otherwise not supposed to.
CAPEC-180: Exploiting Incorrectly Configured Access Control Security Levels
An attacker exploits a weakness in the configuration of access controls and is able to bypass the intended protection that these measures guard against and thereby obtain unauthorized access to the system or network. Sensitive functionality should always be protected with access controls. However configuring all but the most trivial access control systems can be very complicated and there are many opportunities for mistakes. If an attacker can learn of incorrectly configured access security settings, they may be able to exploit this in an attack.
CAPEC-77: Manipulating User-Controlled Variables
This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An adversary can override variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the adversary can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.