CWEweakness
CWE-1321 Improperly Controlled Modification of Object Prototype Attributes
- Alternate terms
- Prototype Pollution
- Abstraction
- Variant
- Structure
- Simple
- Status
- Incomplete
- Languages
- JavaScript
- CWE version
- 5.0
Description
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.
Common consequences
• Confidentiality, Integrity, Availability: Read Application Data, Modify Application Data — This weakness is usually exploited by using a special attribute of objects called proto, constructor, or prototype. Such attributes give access to the object prototype. An attacker can inject attributes that are used in other components by adding or modifying attributes of an object prototype. This creates attributes that exist on every object, or replace critical attributes with malicious ones. This can be problematic if the product depends on existence or non-existence of certain attributes, or uses pre-defined attributes of the object prototype (such as hasOwnProperty, toString, or valueOf).
• Availability: DoS: Crash, Exit, or Restart — An attacker can override existing attributes with ones that have incompatible type, which may lead to a crash.
Potential mitigations
• [Implementation] By freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.
• [Architecture and Design] By blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.
• [Implementation] When handling untrusted objects, validating using a schema can be used.
• [Implementation] 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.
• [Implementation] 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.
Detection methods
• Automated Static Analysis: Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)
Observed examples
• CVE-2018-3721: Prototype pollution by merging objects.
• CVE-2019-10744: Prototype pollution by setting default values to object attributes recursively.
• CVE-2019-11358: Prototype pollution by merging objects recursively.
• CVE-2020-8203: Prototype pollution by setting object attributes based on dot-separated path.
Related
Attack pattern · CAPEC (3)
Observed example · CVE (4)
- CVE-2020-8203 Prototype pollution attack when using _.zipObjectDeep in lodash before 4.17.20. vulnerability
- CVE-2019-10744 Versions of lodash lower than 4.17.12 are vulnerable to Prototype Pollution. vulnerability
- CVE-2019-11358 jQuery before 3.4.0, as used in Drupal, Backdrop CMS, and other products, mishandles jQuery.extend(true, {}, ...) because of… vulnerability
- CVE-2018-3721 lodash node module before 4.17.5 suffers from a Modification of Assumed-Immutable Data (MAID) vulnerability via defaultsDeep, merge, and… vulnerability
Can precede · CWE (1)
- CWE-471 Modification of Assumed-Immutable Data (MAID) weakness
Child of · CWE (2)
Referenced by CAPEC · weakness (3)
Referenced by CVE · weakness (632)
- CVE-2026-118243 Highcharts JS is a JavaScript charting library based on SVG. vulnerability
- CVE-2026-118247 Highcharts JS is a JavaScript charting library based on SVG. vulnerability
- CVE-2026-118248 Highcharts JS is a JavaScript charting library based on SVG. vulnerability
- CVE-2026-118249 Highcharts JS is a JavaScript charting library based on SVG. vulnerability
- CVE-2026-118250 Highcharts JS is a JavaScript charting library based on SVG. vulnerability
- CVE-2026-118649 n8n before 2.43.5 and 2.44.x before 2.44.1 accepts a client-supplied workflow ID and caches each workflow's owner project in memory by that… vulnerability
- CVE-2026-118678 n8n before 2.41.4 and 2.42.x before 2.42.1 contains a prototype pollution vulnerability that allows low-privileged users to alter built-in… vulnerability
- CVE-2026-116674 systeminformation is a System and OS information library for node.js. vulnerability
- CVE-2026-107588 Vaadin Charts renders charts with the Highcharts library and pins an exact version of it, 9.2.2 in Vaadin 22 to 24 and 12.2.0 in Vaadin 25,… vulnerability
- CVE-2026-114142 toml-node is a TOML parser for Node.js and the browser. vulnerability
- CVE-2026-113659 ApostropheCMS is an open-source Node.js content management system. vulnerability
- CVE-2026-113666 ApostropheCMS is an open-source Node.js content management system. vulnerability
- CVE-2026-112309 @rvf/set-get before 7.0.4 contains a prototype pollution vulnerability in setPath that allows unauthenticated attackers to overwrite… vulnerability
- CVE-2026-106160 In Progress® Kendo® UI for jQuery prior to 2026.3.1015, Model.accept passes server-response keys to kendo.setter without guarding against… vulnerability
- CVE-2026-111172 @casl/ability 6.7.5 before 7.0.2 contains a prototype pollution vulnerability in rulesToFields() that allows attackers to modify inherited… vulnerability
- CVE-2026-110842 n8n before 2.41.4 and 2.42.x before 2.42.1 contains a prototype pollution vulnerability in the MCP workflow-validation tool, whose… vulnerability
- CVE-2026-110848 n8n before 1.123.83, 2.x before 2.41.4, and 2.42.x before 2.42.1 contains a prototype pollution vulnerability in the AI workflow builder,… vulnerability
- CVE-2026-109758 Perforce Helix Authentication Service (HAS) deployments that retain the shipped default SCIM bearer token are vulnerable to unauthorized… vulnerability
- CVE-2026-110111 Xen Orchestra before 6.9.0 contains an improper access control vulnerability that allows any authenticated user to become global… vulnerability
- CVE-2021-48012 fast-toml through 0.5.4 contains a prototype pollution vulnerability that allows attackers to modify Object.prototype by supplying TOML… vulnerability
- CVE-2026-107301 msgpack5 is a msgpack v5 implementation for node.js and the browser. vulnerability
- CVE-2026-107701 dot-access through 1.0.0 contains a prototype pollution vulnerability that allows attackers to modify Object.prototype by supplying a… vulnerability
- CVE-2026-107353 traverse (npm) versions 0.3.6 through 0.3.9, 0.4.0 through 0.4.6, 0.5.0 through 0.5.2, and 0.6.0 through 0.6.11 allow prototype pollution… vulnerability
- CVE-2026-105844 Payload is a free and open source headless content management system. vulnerability
- CVE-2026-105857 Payload is a free and open source headless content management system. vulnerability
- CVE-2026-105858 Payload is a free and open source headless content management system. vulnerability
- CVE-2026-106448 StableLib is a stable library of useful TypeScript and JavaScript code. vulnerability
- CVE-2026-106550 Mozilla's Node-convict (version 6.2.2 and later) is vulnerable to a Denial of Service vulnerability caused by incomplete… vulnerability
- CVE-2026-104852 GraphQL Tools provides utilities for building, stitching, and mocking GraphQL schemas. vulnerability
- CVE-2026-103036 oRPC is a tool that helps build APIs that are end-to-end type-safe and adhere to OpenAPI standards. vulnerability
Referenced by OWASP · mapped cwe (1)
- CS-JavaScript_and_TypeScript_Security JavaScript and TypeScript Security Cheat Sheet Cheat Sheet