ajtazer/heckit / skills/cve-hunting/prototype-pollution
prototype-pollution
VerifiedDetect prototype pollution via object merge/clone/assign operations where __proto__ or constructor.prototype keys can modify Object.prototype.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.0 KB |
| references/false-positive-indicators.md | markdown | 945 B |
| references/poc-skeleton.md | markdown | 1.7 KB |
| references/sinks.md | markdown | 1.3 KB |
references/sinks.md
View on GitHub# Object Manipulation Sinks
## Vulnerable Patterns
| Pattern | Risk | Notes |
|---------|------|-------|
| `lodash.merge(target, source)` | HIGH | Deep merge, older versions vulnerable |
| `lodash.defaultsDeep(target, source)` | HIGH | Same issue |
| `jQuery.extend(true, target, source)` | HIGH | Deep extend, older versions |
| `Object.assign(target, source)` | LOW | Shallow only, no __proto__ traversal |
| `{...source}` spread operator | LOW | Shallow, safe |
| Custom recursive merge | HIGH | Check key filtering |
| `set(obj, path, value)` | HIGH | If path is user-controlled |
| `deepmerge(target, source)` | CHECK | Depends on version |
| `extend(true, target, source)` | HIGH | Many implementations vulnerable |
## Key Distinction
**Shallow operations** (Object.assign, spread) do NOT traverse into __proto__ -- they copy the key literally but do not follow the prototype chain. These are generally safe.
**Deep/recursive operations** that traverse nested objects ARE vulnerable if they do not filter __proto__/constructor keys.
## Safe Patterns
- `Object.create(null)` -- creates object with no prototype
- Key filtering: `if (key === '__proto__' || key === 'constructor') continue`
- `Object.keys()` / `Object.entries()` -- skip inherited properties
- `Map` instead of plain objects -- no prototype chain
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |