Agent skill · security · yaklang
prototype-pollution-advanced
Advanced prototype pollution playbook — server-side RCE, client-side gadgets, filter bypasses, and detection techniques. Companion to ../prototype-pollution/ for basics. Use when you've confirmed pollution and need to escalate to code execution or find framework-specific gadgets.
Why this skill is useful
Adds advanced exploitation techniques and detection methods for prototype pollution vulnerabilities that are not widely documented.
What it needs
About 5k tokens when loaded. Last updated 2026-06-16. 1,563 stars on the source repository.
What this skill does
SKILL: Prototype Pollution Advanced — RCE & Gadget Exploitation AI LOAD INSTRUCTION: Advanced prototype pollution escalation. Covers server-side RCE via template engines (EJS, Pug, Handlebars), Node.js childprocess gadgets, client-side script gadgets, filter bypass patterns, and systematic detection. Load ../prototype-pollution/SKILL.md first for fundamentals (merge sinks, proto vs constructor.prototype, basic probes). 0. RELATED ROUTING prototype-pollution — LOAD FIRST for PP fundamentals, merge-sink detection, basic probes ssti-server-side-template-injection — template engine RCE context (PP often triggers through template gadgets) xss-cross-site-scripting — client-side PP gadgets ultimately achieve XSS Advanced Reference Load KNOWNGADGETS.md for the comprehensive gadget table by framework/library with polluted properties, trigger conditions, impact, and affected versions. --- 1. SERVER-SIDE PP → RCE 1.1 Node.js childprocess.spawn — Shell/ENV Injection When childprocess.spawn or childprocess.fork is called without explicit env/shell options, it inherits from Object.prototype: Alternative ENV pollution: 1.2 EJS (Embedded JavaScript Templates) EJS render() reads opts from object properties. Polluting outputFunctionName injects code into the compiled template function: Detection: any EJS res.render() call after pollution triggers it. 1.3 Pug (formerly Jade) Pug's compiler reads block from object properties: Alternative via self option: 1.4 Handlebars Handlebars template compilation checks type and program on template AST nodes: Simpler via allowProtoMethodsByDefault: 1.5 Nunjucks 1.6 Express res.render (Generic) When Express calls res.render(), options merge with app.locals and res.locals. Polluted prototype properties appear as template variables: --- 2. CLIENT-SIDE PROTOTYPE POLLUTION 2.1 jQuery Gadgets $.extend(true, {}, userInput) performs deep merge — classic PP sink. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills yaklang/prototype-pollution-advanced