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

  • 摘要:Variant
  • 结构:Simple
  • 状态:Incomplete
  • 发布日期:2020-12-10
  • 更新日期:2025-12-11

名称

Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

描述

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.

常见后果

范围: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.

相关 CWE