CWE•Variant•Incomplete•20 recent CVEs
CWE-1321Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
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 DataThis 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
- Availability→DoS: Crash, Exit, or RestartAn attacker can override existing attributes with ones that have incompatible type, which may lead to a crash.
Potential mitigations
- ImplementationBy freezing the object prototype first (for example, Object.freeze(Object.prototype)), modification of the prototype becomes impossible.
- Architecture and DesignBy blocking modifications of attributes that resolve to object prototype, such as proto or prototype, this weakness can be mitigated.
- ImplementationWhen handling untrusted objects, validating using a schema can be used.
- ImplementationBy 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.
- ImplementationMap 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.
Related CWEs
Recent CVEs classified under this CWE
CVE-2026-453028.22026-06-01CVE-2026-465108.22026-05-29CVE-2026-465098.22026-05-28CVE-2026-444838.22026-05-27CVE-2026-449668.32026-05-26CVE-2026-91014.32026-05-20CVE-2026-86578.22026-05-16CVE-2026-4400510.02026-05-13CVE-2026-442925.32026-05-13CVE-2026-442907.52026-05-13CVE-2026-81617.52026-05-12CVE-2026-416908.62026-05-08CVE-2026-422647.42026-05-08CVE-2025-637049.82026-05-07CVE-2025-637039.82026-05-07CVE-2026-422328.82026-05-04CVE-2026-422318.82026-05-04CVE-2026-420775.22026-05-04CVE-2026-420446.52026-04-24CVE-2026-420414.82026-04-24