javascript-prototype-pollution

javascript-prototype-pollution is a skill for Claude Code from akashrpatil/awesome-offensive-security-skills. It costs 55 tokens per session (1,992 once invoked), scanned A, a copy of javascript-prototype-pollution, Apache-2.0.

A security-testing guide for JavaScript prototype pollution, where untrusted input changes properties inherited by many objects. It covers browser applications and Node.js servers.

In plain words
What is it for?
Auditing JavaScript applications and libraries that merge, clone, or build objects from JSON or URL parameters.
Why use it?
It helps uncover unsafe object merging or parsing that can lead to client-side code execution, authentication issues, or server compromise.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Not installable on its own: it reads a path above its own folder, which only exists inside its repository. The line is - [`_shared/references/elite-chaining-strategy.md`](../_shared/references/elite-chaining-strategy.md) — Exploit chaining methodology and high-payout chain patte.

Part of the cyberskills-elite plugin — 191 skills, 3 agents shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add akashrpatil/awesome-offensive-security-skills
Claude Code
/plugin install cyberskills-elite

Made for: Claude Code.

Or install cyberskills-elite, the plugin that ships this one along with the rest of its 191 skills, 3 agents.

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 javascript-prototype-pollution

README.md
[![agentmods](https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/javascript-prototype-pollution.svg)](https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/javascript-prototype-pollution)
Your own site
<a href="https://agentmods.dev/skills/akashrpatil/awesome-offensive-security-skills/javascript-prototype-pollution"><img src="https://agentmods.dev/badge/skills/akashrpatil/awesome-offensive-security-skills/javascript-prototype-pollution.svg" alt="Measured on agentmods" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,992 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin 100% copy Near-identical to another mod 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.00055 $0.01992
Opus 5 $0.00028 $0.00996
Sonnet 5 $0.00011 $0.00398
Haiku 4.5 $0.00006 $0.00199

Measured 2d ago against content hash b3546a1085f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

javascript-prototype-pollution scanned grade A with 1 finding 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 2d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/process.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Runs shell commandslowCapability

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

# Node.js process execution functions (like `child_process.spawn` or `exec`) use configuration objects
Origin

This is a copy

100% identical to javascript-prototype-pollution — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/bug-hunting/web-vulnerabilities/javascript-prototype-pollution/SKILL.md · 196 lines

How it starts

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

JavaScript Prototype Pollution

When to Use

  • When auditing JavaScript-heavy applications (both client-side SPA or server-side Node.js) that perform complex object assignments, deep merges, or cloning (e.g., using libraries like Lodash, jQuery, or custom merge functions).
  • To escalate seemingly unexploitable logic bugs into severe vulnerabilities like DOM XSS on the client or RCE on the backend server.
  • When an application parses JSON or URL query streams directly into objects without properly sanitizing highly sensitive keys like __proto__.

Prerequisites

  • Authorized scope and target URLs from bug bounty program
  • Burp Suite Professional (or Community) configured with browser proxy
  • Familiarity with OWASP Top 10 and common web vulnerability classes
  • SecLists wordlists for fuzzing and enumeration

Workflow

Phase 1: Understanding Prototype Pollution (The Concept)

# Concept: In JavaScript, almost everything is an Object. Objects inherit properties from their `prototype`.
# The root prototype is accessible via the magical `__proto__` property (or `constructor.prototype`).
# If an attacker can inject properties into `Object.prototype`, those properties will be inherited globally
# by ALL objects in the application that do not explicitly define that property.

# Harmless object creation:
let myObj = {}; 
console.log(myObj.isAdmin); // undefined

# The Pollution:
Object.prototype.isAdmin = true;

# The Impact:
let newObj = {};
console.log(newObj.isAdmin); // true! (The application is globally polluted)

Phase 2: Identifying Injection Sinks

# Look for vulnerable patterns in the source code where user input is recursively merged into existing objects.
# Common vulnerable functions: `merge()`, `clone()`, `extend()`, `update()`.

# Example of a vulnerable recursive merge function:
function merge(target, source) {
    for (let key in source) {
        if (typeof source[key] === 'object' && typeof target[key] === 'object') {
            merge(target[key], source[key]);
        } else {
            target[key] = source[key]; // <--- THE FLAW: It allows key === '__proto__'
        }
    }
    return target;
}

Read the full file on GitHub · 196 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 196 lines · 55 tokens per session scan A b3546a1085f0

Subscribe to this mod's changes

javascript-prototype-pollution is a skill published in the GitHub repository akashrpatil/awesome-offensive-security-skills (4 stars, last pushed 4mo ago), licensed Apache-2.0. It adds 55 tokens to every session and 1,992 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). It is 100% identical to javascript-prototype-pollution, differing in 0 lines, and is treated as a copy.