prototype-pollution

prototype-pollution is a skill for Claude Code, Codex from PurpleAILAB/Decepticon. It costs 47 tokens per session (1,198 once invoked), scanned A, original, Apache-2.0.

A security-testing playbook for finding JavaScript prototype pollution, where attacker-controlled properties are added to shared object behavior across a program.

In plain words
What is it for?
It is for reviewing JavaScript and TypeScript projects, dependency versions, object-parsing inputs, and libraries that merge nested data.
Why use it?
It helps reveal how unsafe object merging or configuration handling can lead to authorization bypass, request forgery, or code execution.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for reviewing JavaScript and TypeScript projects, dependency versions, object-parsing inputs, and libraries that merge nested data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/purpleailab/decepticon/prototype-pollution
About the project

Decepticon is an autonomous red-team agent that coordinates AI agents, security tools, sandboxes, and supporting services for authorized cybersecurity assessments. Security researchers and red teams can run it through its Docker stack, cloud service, command-line interface, or Python SDK, with the catalogue entries representing its available skills.

PurpleAILAB/Decepticon · 5,452 stars · on GitHub · decepticon.red

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add PurpleAILAB/Decepticon --skill prototype-pollution
Clone the repo
git clone --depth 1 https://github.com/PurpleAILAB/Decepticon

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for prototype-pollution

README.md
[![agentmods](https://agentmods.dev/badge/skills/purpleailab/decepticon/prototype-pollution.svg)](https://agentmods.dev/skills/purpleailab/decepticon/prototype-pollution)
Your own site
<a href="https://agentmods.dev/skills/purpleailab/decepticon/prototype-pollution"><img src="https://agentmods.dev/badge/skills/purpleailab/decepticon/prototype-pollution.svg" alt="Measured on agentmods" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,198 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.01198
Opus 5 $0.00023 $0.00599
Sonnet 5 $0.00009 $0.00240
Haiku 4.5 $0.00005 $0.00120

Measured 3d ago against content hash 4e3b2c7c5c1e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

prototype-pollution scanned grade A with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST https://target.com/api/settings \

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

- **`child_process.spawn(cmd, args, opts)`** — opts has a `shell` option.
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

packages/decepticon/decepticon/skills/standard/analyst/prototype-pollution/SKILL.md · 107 lines

How it starts

The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Prototype Pollution Playbook

Prototype pollution is the JavaScript equivalent of a universal gadget: plant a property on Object.prototype and it appears on every object in the runtime. Worthless in isolation, deadly in chain (__proto__.isAdmin = true → auth bypass; __proto__.shell = "/bin/bash" → RCE via spawn).

1. Sinks — the libraries that still introduce sinks

Keep a running list per engagement. These continue to ship sinks in 2026:

  • Deep-merge: lodash.merge, deepmerge (pre-fix), merge-deep, deepExtend, hoek.merge, mixme
  • Deep-clone: lodash.defaultsDeep, lodash.zipObjectDeep, set-value (pre-3.0.3)
  • URL-to-obj: qs, express-fileupload, jquery.extend(true, ...)
  • Config loaders: node-config recursive merge, dotenv-extended, rc
  • Template engines: Handlebars helpers fed from untrusted ctx
# Every JS/TS project: sweep known-bad versions
jq '.dependencies,.devDependencies | to_entries[] | select(.key | test("merge|lodash|set-value|dot-object|dot-prop|node-pg"))' /workspace/src/package.json
npm ls lodash set-value dot-prop 2>/dev/null | grep -E '[0-9]'

2. Sources

Any user input deserialized into a nested object:

  • JSON body parsers (body-parser, express.json)
  • Query string parsers (qs with default config parses a[b][__proto__][c]=1)
  • YAML uploads
  • Form-data / multipart

3. Audit workflow

  1. Find every deep merge call site.
  2. Trace each one backwards — is the right-hand object user-controlled?
  3. If yes: check the merge function's prototype-pollution fix version.
  4. Even if the merge is fixed, check whether a copy (lodash.set, dot-path-value, jsonpath.set) creates a pollution path.

4. Exploitation gadgets

Poisoning Object.prototype doesn't do anything by itself — you need a gadget that reads a property that didn't exist before.

Classic gadgets:

  • child_process.spawn(cmd, args, opts) — opts has a shell option. Poison __proto__.shell = "/bin/bash" then any subsequent spawn call executes through bash and interprets args as shell strings.
  • Express middleware — most middlewares check options.someFlag with if (opts.someFlag). Poisoning that flag flips security defaults.
  • Templating — Handlebars and EJS read helpers and partials from the context object; pollution adds helpers that execute code.
  • lodash.template — if the template source is built from _.template(tpl, ctx) you can inject via polluted escape/evaluate keys.
  • mongoose — polluting Schema.Types causes subsequent schema definitions to use attacker-controlled types.

Read the full file on GitHub · 107 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 107 lines · 47 tokens per session scan A 4e3b2c7c5c1e

Subscribe to this mod's changes

prototype-pollution is a skill published in the GitHub repository PurpleAILAB/Decepticon (5,452 stars, last pushed 7d ago), licensed Apache-2.0. It adds 47 tokens to every session and 1,198 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 2 findings (makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

api-crud-generator

A code generator that creates standard Next.js API routes and an administration page from Prisma models. Prisma is a tool that describes and accesses an application’s database.

xbsheng/atguigu-note · 21 tokens

msbuild-antipatterns

Catalog of MSBuild anti-patterns with detection rules and fix recipes. Only activate in MSBuild/.NET build context. USE FOR: reviewing, auditing, or cleaning up .csproj, .vbproj, .fsproj, .props, .targets, or .proj files. Each anti-pattern has a symptom, explanation, and concrete BAD→GOOD transformation. Covers…

Harmeet10000/skills · 141 tokens

run-tests

Runs .NET tests with dotnet test. Use when user says "run tests", "run my tests", "run these tests", "execute tests", "dotnet test", "test filter", "filter by category", "filter by class", "combine filters", "run only specific tests", "integration tests", "unit tests", "tests not running", "hang timeout"…

Harmeet10000/skills · 248 tokens

fastapi

FastAPI best practices and conventions. Use when working with FastAPI APIs and Pydantic models for them. Keeps FastAPI code clean and up to date with the latest features and patterns, updated with new versions. Write new code or refactor and update old code.

Harmeet10000/skills · 57 tokens

dotnet-10-csharp-14

Use when building .NET 10 or C# 14 applications; when using minimal APIs, modular monolith patterns, or feature folders; when implementing HTTP resilience, Options pattern, Channels, or validation; when seeing outdated patterns like old extension method syntax.

Harmeet10000/skills · 59 tokens

optimizing-ef-core-queries

Optimize Entity Framework Core queries by fixing N+1 problems, choosing correct tracking modes, using compiled queries, and avoiding common performance traps. Use when EF Core queries are slow, generating excessive SQL, or causing high database load.

Harmeet10000/skills · 53 tokens