/security-agent-skills:hunting-server-side-prototype-pollutionfrom security-agent-skills
Hunts server-side prototype pollution in Node.js/TypeScript backends where untrusted input reaches Object.prototype via recursive merges, deep clones, or path-based setters. Covers pollution primitives and gadget reads that turn pollution into impact.
Ships in security-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
In JavaScript, every plain object inherits from Object.prototype, so writing to that shared prototype
changes the default value of a property on every object in the process. Server-side prototype pollution
happens when untrusted input carries a __proto__, constructor, or prototype key into a recursive
merge, a deep clone, or a path-based set that follows the key down to the prototype. The write by itself
is a primitive; the impact comes later, when some other code reads a property that was never set and now
returns the attacker's injected default. That gadget read can flip an authorization flag, inject an
argument into a spawned command, or change a template or query. You find it by locating the pollution
primitives and then the gadget reads they enable.
Test prototype pollution only against services you own or are authorized to assess, on non-production infrastructure. Pollution is process-wide and can affect concurrent requests, so treat every confirming write as a change to shared state within the authorized scope, and prefer an isolated instance. If you can't name the authorization, stop.
Establish the pollution primitives first. Inventory every operation that could write an
attacker-controlled key down to the prototype: recursive or deep merges, deep clones, path-based setters
that split a dotted or bracketed path, and body or query parsers that build nested objects. This is the
false-positive killer: without a primitive that reaches __proto__ or constructor.prototype, an
isolated gadget read is not exploitable. Name the primitives first.
Trace untrusted keys into each primitive. Follow request bodies, query strings, and parsed JSON into
the merge or set, focusing on whether the key path, not just the value, is attacker-controlled. A merge
of an untrusted object, or a set(obj, path, value) where the path comes from the request, is the
vector. Confirm the key can be __proto__, constructor, or prototype.
Confirm the primitive reaches the shared prototype. Read the merge or set implementation: does it
guard against these keys, skip non-own properties, or use a null-prototype object or a Map? A guarded
implementation writes an own property named __proto__ harmlessly; an unguarded one walks into the
prototype. Confirm the write actually lands on Object.prototype, not on an own key.
Find the gadget read. Pollution is only impactful if later code reads an unset property whose injected default changes behavior: an options object read for a shell argument, a flag read for an authorization decision, a template or view path, a property that selects a query or a callback. Locate the downstream reads of possibly-absent properties and identify which the pollution can steer.
Check the defenses that actually stop it. A merge that rejects __proto__/constructor/prototype
keys, objects created with a null prototype, Object.freeze(Object.prototype), Map instead of plain
objects for untrusted keys, and schema validation that rejects unexpected keys each break the chain.
Determine which stands between the primitive and the prototype, and whether the gadget read has its own
default that resists an injected value.
Confirm and record. Confirm by polluting a benign marker property through the primitive on an isolated instance and observing the gadget read return the injected value, then, where a real gadget exists, showing the behavior change in scope. Kill the lead if no primitive reaches the prototype, if the merge or set guards the dangerous keys or uses null-prototype objects, or if no gadget read of an unset property changes behavior. Record the source key, the primitive, the polluted property, and the gadget.
set(obj, "a.b.c", v) with a request-derived path can be
driven to __proto__.polluted, reaching the prototype without an explicit __proto__ in the value.__proto__ alone is incomplete. constructor.prototype reaches the same shared prototype;
a guard must cover all three key names.Confirm. A settings endpoint deep-merges the request body into a config object with a recursive merge that copies any key. A body with a
__proto__key sets a default property that a later module reads as a shell argument when spawning a helper process. On an isolated instance, the injected default reaches the spawn, proving the gadget. Confirmed prototype pollution to command argument injection,high, remediation = reject__proto__,constructor, andprototypekeys in the merge, build the config on a null-prototype object, and validate the body against a schema that allowlists known keys.Kill. The merge routine skips the three dangerous keys and operates on
Object.create(null)targets, request bodies are validated against a strict schema that rejects unknown keys, and the spawn reads options with explicit own-property checks. A body carrying__proto__writes nothing to the shared prototype. Killed,kill_reason= "merge guards the prototype keys and uses null-prototype targets, schema rejects unexpected keys, and the gadget read uses own-property checks; no attacker key pollutes the prototype."
__proto__ anywhere." → The attacker supplies it in the request; the question is whether
your merge or setter writes it to the prototype, not whether your code names it.__proto__." → constructor.prototype reaches the same shared prototype; guard all three
names or use a null-prototype target.You need every merge, clone, and path-set that takes untrusted keys, whether each guards the prototype keys or uses null-prototype targets, the downstream reads of possibly-unset properties, and the schema validation if any. For each primitive, ask whether an attacker key reaches the prototype, and which gadget read it steers. Reading the merge implementation shows whether the write lands on the prototype; polluting a marker on an isolated instance shows the gadget read pick it up.
hunting-mass-assignment-and-property-authz - the sibling where attacker-controlled keys reach fields
they should not; here the same untrusted-key idea reaches the shared prototype.hunting-php-object-injection-pop-chains - another reconstruction-of-attacker-shaped-object class, where
a chain rather than a prototype read carries the impact.testing-client-side-dom-vulnerabilities - client-side prototype pollution is the browser cousin; the
primitive is the same, the gadgets differ.adjudicating-taint-paths - use it to connect a pollution primitive to a distant gadget read across
modules.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
194 skills in this plugin
/adjudicating-dependency-cve-reachabilityDecide whether a CVE in a dependency actually exposes your application before you scramble to patch: is the vulnerable function on a real call path from your code, do the trigger preconditions hold, and can an attacker control the input that reaches it. Use when an advisory, SCA scan, or dependency bot flags a CVE and you must separate a genuine exposure from unreachable noise, or justify why you are or are not affected. Covers pinning the vulnerable symbol, call-path reachability, precondition checks, and taint from your entry points./adjudicating-taint-pathsDecide whether a whitebox lead is a real bug by tracing taint from an untrusted source to a dangerous sink and confirming every hop against live source. Use after a scanner, a candidate list, or your own reading surfaces a "this looks dangerous" sink (SQL exec, system/exec, file open, deserialize, template render, redirect target, memcpy) and you must decide whether attacker- controlled input actually reaches it - or kill the lead with evidence. Covers forward and reverse taint, witness paths, sanitizer analysis, and the evidence rules that separate a finding from a false positive./auditing-account-abstraction-and-paymaster-trustAudit an ERC-4337 account-abstraction deployment for trust misplaced in the user-operation lifecycle: a smart account whose validation accepts a signature or nonce it should reject, a paymaster that agrees to sponsor gas for operations it should not so an attacker drains its deposit, a bundler or entry-point assumption that lets a user operation be replayed or reordered for gain, and validation logic that reads mutable state or reaches outside its allowed scope. Covers smart-contract wallets, paymasters, bundlers, and the entry point in an account-abstraction stack where a user operation is validated and sponsored before it executes. Use when a user operation is validated, paid for, and executed by separate parties and that trust split is the boundary. The crafted user operation is the source, the drained paymaster or unauthorized execution is the sink, and the over-permissive validation or sponsorship rule is the bug./auditing-account-recovery-and-reset-trustAudit password reset and account recovery flows for the trust that lets an attacker take over an account: a reset token that is guessable, long-lived, reusable, or not bound to the account it was issued for, a recovery path that verifies a weaker factor than login and bypasses multi-factor, a reset link whose host comes from an attacker-controllable header so the token leaks, and a recovery that trusts an unverified email or phone change to redirect the reset. Covers the recovery surface of authentication systems, where resetting a credential or recovering access is the alternate door into an account. Use when an application offers password reset or account recovery and that flow is a path to authentication. The attacker-driven recovery request is the source, the account it takes over is the sink, and the weak token, bypassed factor, or leaked reset link that grants it is the bug./auditing-admission-control-policy-gapsAudit cluster admission control for gaps that let a non-compliant or hostile workload through: a validating webhook that fails open when its backend is unreachable, a policy that scopes by namespace or label and misses the namespaces that matter, a mutating webhook whose changes are trusted downstream, and an ordering or exemption that lets a privileged pod bypass the checks meant to stop it. Covers Kubernetes admission webhooks and policy engines that are supposed to enforce workload security at create and update time. Use when admission policies are the control that keeps privileged, unsigned, or over-permissioned workloads out of the cluster. The workload submitted for admission is the source, the admitted resource is the sink, and the policy gap that let it through is the bug./auditing-ai-agent-permissionsAudit what an AI agent is actually allowed to do versus what its task needs. Covers excessive agency (tools, scopes, and autonomy beyond the job), missing human-in-the-loop gates on irreversible actions, over-broad credentials and their blast radius, sandbox and code-interpreter escape, unfiltered egress, and unbounded resource or spend (denial-of-wallet). Use when granting an agent a tool or scope, reviewing an agent's permission posture, or deciding which actions need approval. The model's restraint is not a control; permissions are.npx claudepluginhub unboundcompute/security-agent-skills --plugin security-agent-skillsOther plugins' skills for the same job