/prototype-pollution
Detect prototype pollution via object merge/clone/assign operations where __proto__ or constructor.prototype keys can modify Object.prototype.
$ npx -y skills add ByamB4/find-cve-agent --skill prototype-pollution --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/prototype-pollution
Context preview
The summary Claude sees to decide when to auto-load this skill.
Detect prototype pollution via object merge/clone/assign operations where __proto__ or constructor.prototype keys can modify Object.prototype.
SKILL.md
prototype-pollution.SKILL.mdname: prototype-pollution
description: "Detect prototype pollution via object merge/clone/assign operations where __proto__ or constructor.prototype keys can modify Object.prototype."
metadata:
filePattern:
- "**/*.js"
- "**/*.ts"
bashPattern:
- "grep.*(__proto__|prototype|constructor)"
- "semgrep.*pollution"
priority: 82Prototype Pollution Detection
When to Use
Audit merge/clone/deep-assign utilities, query string parsers, JSON parsers, config mergers, and any package that recursively sets object properties from untrusted input.
**Key insight**: Only ~50% acceptance rate. Must demonstrate REAL impact beyond just polluting prototype.
Process
Step 1: Find Object Manipulation Sinks
grep -rn "Object\.assign\|Object\.defineProperty\|Object\.create" .
grep -rn "merge\|extend\|deepMerge\|deepExtend\|deepAssign\|mixin" .
grep -rn "clone\|deepClone\|cloneDeep\|deepCopy" .
grep -rn "set\|setPath\|setValue\|lodash\.set\|_.set" .
grep -rn "\[.*\]\s*=" . --include="*.js" # Bracket notation assignment
Step 2: Check for Recursive Property Setting
Look for patterns where object keys from user input are used as property paths:
// VULNERABLE: recursive merge without key filtering
function merge(target, source) {
for (const key in source) {
if (typeof source[key] === 'object') {
target[key] = merge(target[key] || {}, source[key]);
} else {
target[key] = source[key];
}
}
}Step 3: Check Key Filtering
grep -rn "__proto__\|constructor\|prototype" . | grep -i "filter\|block\|skip\|ignore\|reject"
grep -rn "Object\.create(null)" . # Null prototype objects are safe
grep -rn "hasOwnProperty\|Object\.keys\|Object\.entries" .
Step 4: Assess Impact
Prototype pollution alone is often not enough. Look for impact:
- **DoS**: Polluted property causes TypeError crash (toString, valueOf)
- **Property injection**: Polluted property affects security logic (isAdmin, role, auth)
- **Gadget chains**: Polluted property reaches dangerous sink (eval, template)
- **Method clobbering**: toString/valueOf overwritten causing crash
Dangerous Keys
| Key | Effect | Impact | |-----|--------|--------| | `__proto__` | Sets properties on Object.prototype | All objects affected | | `constructor.prototype` | Same effect via constructor chain | All objects affected | | `constructor` | Overwrites constructor reference | Type confusion | | `toString` | Overwrites string conversion | TypeError on string operations | | `valueOf` | Overwrites value conversion | TypeError on comparisons | | `hasOwnProperty` | Overwrites property check | Logic bypass |
CVSS Guidance
- Proto pollution + RCE gadget chain: CRITICAL 9.8
- Proto pollution + auth bypass: HIGH 8.1
- Proto pollution + DoS (crash): HIGH 7.5
- Proto pollution with no demonstrated impact: MEDIUM 5.3 (often rejected)
References
- [Sinks](references/sinks.md) -- Object manipulation sinks
- [False Positive Indicators](references/false-positive-indicators.md)
- [PoC Skeleton](references/poc-skeleton.md)
Read more
name: prototype-pollution
description: "Detect prototype pollution via object merge/clone/assign operations where __proto__ or constructor.prototype keys can modify Object.prototype."
metadata:
filePattern:
- "**/*.js"
- "**/*.ts"
bashPattern:
- "grep.*(__proto__|prototype|constructor)"
- "semgrep.*pollution"
priority: 82Prototype Pollution Detection
When to Use
Audit merge/clone/deep-assign utilities, query string parsers, JSON parsers, config mergers, and any package that recursively sets object properties from untrusted input.
**Key insight**: Only ~50% acceptance rate. Must demonstrate REAL impact beyond just polluting prototype.
Process
Step 1: Find Object Manipulation Sinks
grep -rn "Object\.assign\|Object\.defineProperty\|Object\.create" . grep -rn "merge\|extend\|deepMerge\|deepExtend\|deepAssign\|mixin" . grep -rn "clone\|deepClone\|cloneDeep\|deepCopy" . grep -rn "set\|setPath\|setValue\|lodash\.set\|_.set" . grep -rn "\[.*\]\s*=" . --include="*.js" # Bracket notation assignment
Step 2: Check for Recursive Property Setting
Look for patterns where object keys from user input are used as property paths:
// VULNERABLE: recursive merge without key filtering
function merge(target, source) {
for (const key in source) {
if (typeof source[key] === 'object') {
target[key] = merge(target[key] || {}, source[key]);
} else {
target[key] = source[key];
}
}
}Step 3: Check Key Filtering
grep -rn "__proto__\|constructor\|prototype" . | grep -i "filter\|block\|skip\|ignore\|reject" grep -rn "Object\.create(null)" . # Null prototype objects are safe grep -rn "hasOwnProperty\|Object\.keys\|Object\.entries" .
Step 4: Assess Impact
Prototype pollution alone is often not enough. Look for impact:
- **DoS**: Polluted property causes TypeError crash (toString, valueOf)
- **Property injection**: Polluted property affects security logic (isAdmin, role, auth)
- **Gadget chains**: Polluted property reaches dangerous sink (eval, template)
- **Method clobbering**: toString/valueOf overwritten causing crash
Dangerous Keys
| Key | Effect | Impact | |-----|--------|--------| | `__proto__` | Sets properties on Object.prototype | All objects affected | | `constructor.prototype` | Same effect via constructor chain | All objects affected | | `constructor` | Overwrites constructor reference | Type confusion | | `toString` | Overwrites string conversion | TypeError on string operations | | `valueOf` | Overwrites value conversion | TypeError on comparisons | | `hasOwnProperty` | Overwrites property check | Logic bypass |
CVSS Guidance
- Proto pollution + RCE gadget chain: CRITICAL 9.8
- Proto pollution + auth bypass: HIGH 8.1
- Proto pollution + DoS (crash): HIGH 7.5
- Proto pollution with no demonstrated impact: MEDIUM 5.3 (often rejected)
References
- [Sinks](references/sinks.md) -- Object manipulation sinks
- [False Positive Indicators](references/false-positive-indicators.md)
- [PoC Skeleton](references/poc-skeleton.md)
Open Source CVE Hunting Harness for Claude Code A Claude Code plugin that systematically finds real CVEs in open source packages through coordinated multi-agent security research.
Repo: ByamB4/find-cve-agent
Other skills on find-cve-agent.
- /advisory-mining
Mine GitHub Security Advisories and CVE databases for incomplete fixes, finding variant vulnerabilities in patched code or similar patterns in related packages.
Open skill - /auth-bypass
Detect authentication and authorization bypass vulnerabilities including missing auth middleware, JWT algorithm confusion, IDOR, and session fixation.
Open skill - /code-injection-codegen
Detect code injection vulnerabilities in packages that dynamically generate or evaluate code via new Function(), eval(), vm.run*, or template literal interpolation.
Open skill - /command-injection
Detect OS command injection via shell execution sinks where user-controlled input reaches system commands without proper sanitization.
Open skill - /cross-pollination
Cross-pollination multiplier technique: find a vulnerability in one package, then search for the same pattern across all similar packages to multiply findings.
Open skill - /decompression-bomb
Detect decompression bomb vulnerabilities where compressed input can expand to exhaust memory, targeting buffer-based decompression without size limits.
Open skill

