prototype-pollution
Skill20 starsChanged 4 months agoMITView on GitHub
Detects JavaScript deep-merges or property assignment from user input that can
10 other projects use a version of this.
Adopted by
Most recently taken up by
- mahumadad/quarrytheir own version, first seen Nov 8, 2026
- awarexone/AXguardtheir own version, first seen Sep 15, 2026
- ajtazer/heckittheir own version, first seen Sep 11, 2026
- emre-guler/websectheir own version, first seen Aug 27, 2026
- conjure-3301/skillstheir own version, first seen Aug 17, 2026
- Kur1sulab/blackboxtheir own version, first seen Aug 12, 2026
Used with
Projects with it also use sql-injection, command-injection and 4 more.
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.
YepAPISkillsql-injection
SQL injection prevention — parameterized queries, ORM safety, dynamic query guards.
Also in 3 projects that use this
blacklanternsecuritySkillcommand-injection
Guide OS command injection exploitation during authorized penetration testing.
Also in 3 projects that use this
blacklanternsecuritySkillxxe
Guide XML External Entity (XXE) injection exploitation during authorized penetration testing.
Also in 3 projects that use this
SubhiSecSkillssti
Hunt Server-Side Template Injection (SSTI) in Jinja2, Twig, Freemarker, Velocity, Smarty, ERB, Handlebars, Mustache, and Spring (SpEL). Use when input is reflected in a way that suggests template rendering — error pages, email templates, PDF generators, dynamic content systems.
Also in 3 projects that use this
SubhiSecSkillxss
Hunt reflected, stored, and DOM-based Cross-Site Scripting (XSS) including CSP bypass, polyglot payloads, mutation XSS (mXSS), markdown XSS, and template XSS. Use when the user has identified a parameter or input that reflects to the page, or wants to test for XSS in a specific input.
Also in 3 projects that use this
- +1 more from SubhiSec
Other versions10 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 10
- yaklang/hack-skills★ 2.4ksame name
- awarexone/AXguard★ 17same name
- langbyyi/websec-skills★ 4same name
- Kur1sulab/blackbox★ 3same name
- ajtazer/heckit★ 2same name
- emre-guler/websec★ 2same name
- JustineDevs/premortem★ 2same name
- KaanBicaklar/mona-sast-skills★ 2same name
- mahumadad/quarry★ 1same 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 repository52 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- authentication-failuresSkill
- broken-access-controlSkill
- concurrency-correctnessSkill
- contract-reviewSkill
- cryptographic-failuresSkill
- crypto-library-misuseSkill
- csrfSkill
- exceptional-conditionsSkill
- excessive-agencySkill
- file-uploadSkill
- graphql-securitySkill
- hardcoded-secretsSkill
- header-injectionSkill
- hotspotsSkill
- injectionSkill
- insecure-designSkill
- insecure-local-storageSkill
- insecure-output-handlingSkill
- insecure-plugin-designSkill
- integrity-failuresSkill
- ipc-securitySkill
- llm-supply-chainSkill
- logging-failuresSkill
- mass-assignmentSkill
- mcp-securitySkill
- memory-api-misuseSkill
- model-dosSkill
- model-theftSkill
- multi-agent-trustSkill
- nosql-injectionSkill
- numeric-trust-boundarySkill
- oauth-implementationSkill
- open-redirectSkill
- overrelianceSkill
- path-traversalSkill
- privilege-handlingSkill
- prompt-injectionSkill
- pr-reviewSkill
- race-conditionSkill
- rag-securitySkill
- redosSkill
- security-cleanupSkill
- security-misconfigurationSkill
- security-reviewSkill
- sensitive-disclosureSkill
- ssrfSkill
- supply-chainSkill
- threat-modelSkill
- token-smugglingSkill
- training-data-poisoningSkill
- unsafe-api-consumptionSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 48
When iterating source keys, use the own-keys iterator (e.g.
“Common” is measured: kept by at least 6 in 10 of the 9 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 Security Check (CWE-1321)
What this checks
Protects against prototype pollution in JavaScript/TypeScript where an attacker injects
properties like __proto__ or constructor.prototype through user input, modifying
the prototype chain of all objects. Exploitation leads to property injection, auth
bypass, and remote code execution in some frameworks.
Vulnerable patterns
- Deep merge of user input into a config or options object using a library helper that recurses through
__proto__. Object.assignor spread of a parsed JSON body into a target object — the__proto__key is copied as a regular property and walked by the engine.- Custom recursive merge that iterates source keys with no filter —
__proto__andconstructor.prototypeare merged in alongside everything else. - Dynamic property assignment where both the key and the value come from user input, with no key validation.
Fix immediately
Flag the vulnerable code and explain the risk. Then suggest a fix that establishes these properties. The audited file is JavaScript or TypeScript by definition, so the principles translate directly — apply them using the project's existing utility library and module conventions.
- Any recursive merge, clone, or property copy on user input filters the
dangerous keys —
__proto__,constructor,prototype. The filter runs before assignment, not after; a post-hoc delete does not help because the prototype chain was already mutated. - Dynamic property assignment from user input validates the key against a
blocklist, or sidesteps the issue by using a
Map. AMaphas no prototype-chain exposure; object indexing does. - Config and lookup objects use a null-prototype object when keys come from input. An object created with no prototype cannot be polluted because there is no prototype chain to reach.
- Library deep-merge helpers (
_.merge,_.set,$.extend(true, …)) on untrusted input are replaced with key-filtered wrappers or safe alternatives. The issue is library-version-dependent, so relying on patched versions is fragile; filter at the call site.
When iterating source keys, use the own-keys iterator (e.g. Object.keys),
never the prototype-walking variant.
Verification
- No deep merge, clone, or recursive property copy on user-controlled input proceeds without filtering
__proto__,constructor, andprototypekeys - Dynamic property assignment from user input validates the key against a blocklist or uses
Mapinstead - If a library deep-merge helper is used, it is replaced or wrapped with a key filter before being applied to untrusted input
- Iteration uses an own-keys iterator, not a prototype-walking one
References
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.

