Loading...
Loading...
Prototype pollution testing for JavaScript stacks. Use when user input is merged into objects (query parsers, JSON bodies, deep assign), when configuring libraries via untrusted keys, or when hunting RCE gadgets via polluted Object.prototype in Node or the browser.
npx skill4agent add yaklang/hack-skills prototype-pollutionAI LOAD INSTRUCTION: Expert prototype pollution for client and server JS. Coversvs__proto__, merge-sink detection, Express/qs-style black-box probes, and gadget chains (EJS, Timelion-class patterns, child_process/NODE_OPTIONS). Assumes you know object spread and prototype inheritance — focus is on parser behavior and post-pollution sinks.constructor.prototype
Object.assignJSON.parse#__proto__[polluted]=1
#__proto__[polluted]=polluted
#constructor[prototype][polluted]=1alert(1)console#__proto__[xxx]=alert(1){"__proto__":{"polluted":true}}{"constructor":{"prototype":{"polluted":true}}}Object.prototype.pollutedlodash.mergedeep-extendhoek.applyToDefaultsqsquery-stringobj.keyobjkey[[Prototype]]Object.prototype__proto____proto__Object.prototype{ "__proto__": { "x": 1 } }Object.prototype.x = 1constructor.prototypeconstructorconstructor.prototypeprototypeObject.prototype{"constructor":{"prototype":{"polluted":1}}}__proto__https://app.example/page#__proto__[admin]=1https://app.example/#__proto__[xxx]=alert(1)constructor.prototype#constructor[prototype][role]=admin__proto__[src]=//evil/xss.js__proto__[onerror]=alert(1)Object.prototypebody-parser| Payload(JSON 示意) | 预期可观察信号 |
|---|---|
| Multi-parameters are ignored or parsed abnormally in subsequent requests ( |
| Double question mark prefixes like |
| Nested keys like |
| JSON serialized responses have extra spaces ( |
| CORS responses have headers related to |
| A response status code becomes 510 or other abnormal code (the application reads |
| 目标 / 场景 | 载荷或模式 | 备注 |
|---|---|---|
| EJS | | If options such as |
| Timelion Expression Chain (CVE-2019-7609) | | Historical chain: Prototype pollution + timeline expression execution; used to understand the combination of expression + PP |
Node | Pollute | Depends on whether |
| General constructor path | | Bypass weak validation that only filters the |
obj.settings.xxxhasOwnProperty| 项目 | 用途 |
|---|---|
| yeswehack/pp-finder | Assist in locating PP susceptible merge points and patterns |
| yuske/silent-spring | Research and detect related prototype pollution surfaces |
| yuske/server-side-prototype-pollution | Server-side PP test suite/ideas |
| BlackFan/client-side-prototype-pollution | Browser-side PP cases and payloads |
| portswigger/server-side-prototype-pollution | Burp ecosystem extension/supporting materials |
| msrkp/PPScan | Scanning/verification assistance |
Input merged into nested object?
(query, JSON, GraphQL vars, YAML→JSON)
|
NO --------------+-------------- YES
| |
Other vuln class Parser allows __proto__ /
constructor.prototype keys?
|
NO --------------+-------------- YES
| |
Check unicode / Confirm global effect:
bypass of key names clean follow-up request
| |
+--------------+----------------+
|
v
Gadget present? (template, spawn, JSON.stringify opts, CORS)
|
NO ------------------+------------------ YES
| |
Report PP as DoS / Build minimal RCE or
logic impact high-impact PoC
| |
+---------------------+-------------------+
|
v
Client-side: fragment / DOM / third-party script
Server-side: qs/body-parser/lodash/deep-merge version audit