prototype-pollution
Skill18 starsChanged 3 months agoMITView on GitHub
Analyze JavaScript prototype pollution risks — use when reviewing deep merges, recursive object assigns, query-to-object parsers, or untrusted JSON key merges (CWE-1321 / A03:2021).
7 other projects use a version of this.
Adopted by
Most recently taken up by
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- Kur1sulab/blackboxtheir own version, first seen Aug 12, 2026
- thejefflarson/soundchecktheir own version, first seen Jul 31, 2026
- KaanBicaklar/mona-sast-skillstheir own version, first seen Jul 9, 2026
- langbyyi/websec-skillstheir own version, first seen Jun 12, 2026
- ShulkwiSEC/bb-hugetheir own version, first seen Jun 4, 2026
Used with
Projects with it also use csrf and ssrf.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
blacklanternsecuritySkillcsrf
Exploit Cross-Site Request Forgery (CSRF) vulnerabilities during authorized penetration testing.
Also in 3 projects that use this
blacklanternsecuritySkillssrf
Guide server-side request forgery (SSRF) exploitation during authorized penetration testing.
Also in 3 projects that use this
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- yaklang/hack-skills★ 2.4ksame name
- ShulkwiSEC/bb-huge★ 22same name
- thejefflarson/soundcheck★ 20same name
- langbyyi/websec-skills★ 4same name
- Kur1sulab/blackbox★ 3same name
- KaanBicaklar/mona-sast-skills★ 2same name
- conjure-3301/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- ai-agent-securitySkill
- ai-application-securitySkill
- api-securitySkill
- attack-surface-mappingSkill
- authentication-analysisSkill
- authorization-analysisSkill
- axguard-auditSkill
- axguard-csoSkill
- axguard-knowledgeSkill
- axguard-preshipSkill
- axguard-remediateSkill
- axguard-reportSkill
- axguard-securitySkill
- axguard-triageSkill
- cloud-securitySkill
- command-injectionSkill
- configuration-securitySkill
- deserialization-securitySkill
- file-upload-securitySkill
- graphql-securitySkill
- jwt-securitySkill
- mcp-securitySkill
- oauth-securitySkill
- path-traversalSkill
- prompt-injectionSkill
- secrets-detectionSkill
- security-architecture-reviewSkill
- security-remediationSkill
- security-triageSkill
- session-securitySkill
- sql-injectionSkill
- ssrf-analysisSkill
- ssti-analysisSkill
- supply-chain-securitySkill
- threat-modelingSkill
- websocket-securitySkill
- xss-analysisSkill
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 1 is distinctive, and 6 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 46
No JavaScript/TypeScript object merge of untrusted structures (Python/Java dict updates are different classes).
- Very specific: line 65
Check for blocking of __proto__, constructor, prototype at every nesting level.
- Very specific: line 66
Prefer safe structures: Object.create(null), Map, schema validation (reject unknown keys).
- Very specific: line 67
Search for gadgets: property checks without hasOwn, HTML sinks reading options, template/compile flags.
- Very specific: line 82
Use of Map / null-prototype objects only
- Very specific: line 89
Use Map or Object.create(null) for dictionaries.
- Very specific: line 90
Prefer Object.hasOwn / hasOwnProperty.call for security checks.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Prototype Pollution Analysis
Purpose
Teach defensive reasoning about prototype pollution: attacker-controlled property keys (__proto__, constructor, prototype) modify Object.prototype (or other prototypes) via unsafe merge/clone/path assignment, affecting unrelated code paths (gadgets).
When to Use / When Not to Use
Use when:
- Node/browser code deep-merges user JSON, parses nested query objects, uses vulnerable
lodash.merge-class APIs, recursivefor..inassigns, or settings import endpoints. - Client-side URL/hash parsers feed object merges (DOM XSS gadget hunts).
- AuthZ checks rely on property presence/truthiness that could be inherited.
Do not use when:
- No JavaScript/TypeScript object merge of untrusted structures (Python/Java dict updates are different classes).
- Data is stored only in
Map/Object.create(null)with no prototype-affecting assignment.
Security Concepts
Pollution is usually a two-stage issue: (1) pollution sink succeeds; (2) a gadget reads the polluted property (XSS sink, isAdmin, template options, env). Severity depends on gadgets, not on pollution alone.
Threat Model
Attacker goals:
- Flip security flags (
isAdmin,authenticated). - Unlock DOM XSS via client gadgets.
- DoS (override built-ins) or server RCE via known Node gadgets.
Analysis Workflow
- Find recursive merge/clone/assign utilities and query parsers that build nested objects.
- Confirm untrusted keys flow into those sinks without key filtering.
- Check for blocking of
__proto__,constructor,prototypeat every nesting level. - Prefer safe structures:
Object.create(null),Map, schema validation (reject unknown keys). - Search for gadgets: property checks without
hasOwn, HTML sinks reading options, template/compile flags. - Separate client vs server impact; do not claim RCE without a concrete gadget path.
- Review dependency versions known for merge CVEs.
Evidence Requirements
- Merge/assign sink file:line
- Untrusted key path
- Missing dangerous-key rejection
- At least a plausible gadget or explicit “pollution without known gadget” downgrade
False Positive Controls
- Schema validators that strip unknown keys
- Explicit rejection of dangerous keys before assign
- Use of
Map/ null-prototype objects only - Merges of trusted server config only
Remediation
- Reject
__proto__,constructor,prototypekeys recursively. - Validate with strict schemas; avoid recursive merge of untrusted objects.
- Use
MaporObject.create(null)for dictionaries. - Prefer
Object.hasOwn/hasOwnProperty.callfor security checks. - Patch vulnerable merge dependencies; consider
Object.freeze(Object.prototype)only after compatibility testing.
Verification
Find merge sinks → Add key deny + schema → Re-run review → Confirm no untrusted recursive assignRelated Skills
xss-analysis— common client gadget classauthorization-analysis— polluted auth flagsapi-security,security-triage,security-remediation
Framework Mapping
- CWE-1321
- OWASP Top 10 2021 A03:2021 Injection
References
Research Provenance
Primary sources:
- CWE-1321 (accessed 2026-09-15; verified title: Improperly Controlled Modification of Object Prototype Attributes)
- OWASP Top 10:2021 A03 (accessed 2026-09-15)
Secondary / internal:
- AXGuard injection/XSS rule adjacency; practitioner merge-sink review patterns
- AwareXone Agentic-Bug-Hunter prototype-pollution methodology (concepts only; not copied)
Datasets:
- UVID HF dataset — category linkage concepts only (MIT license metadata review 2026-09-15)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

