When testing a target's deep property store, such as POST /api/preferences, try sending a payload with a path like ["__proto__", "role"] and includeInheritedProps set to true. This can bypass strict string comparison blocklists and pollute Object.prototype if the code uses the in
Prototype pollution: how to hunt it
Where to look
- Query strings and JSON merged deeply, tried with __proto__[x]=y or constructor[prototype][x]=y.
- Client-side gadgets: libraries that read an option and write it into the page.
- Server-side merges into configuration or user objects, probed with a harmless property: pollution lasts until the process restarts.
- Signs of pollution, such as a property appearing on every new object.
What proves it
Show the polluted property reaching a gadget with a real effect, such as script running or a changed response, not only that the prototype changed.
Read further
Writeups on Prototype pollution, by hunters and researchers, most with a short summary.
Related classes