method-clobbering

method-clobbering is a skill for Claude Code from ByamB4/find-cve-agent. It costs 40 tokens per session (994 once invoked), scanned A, original, Apache-2.0.

A security checker for method clobbering, where untrusted object keys replace built-in methods such as toString or hasOwnProperty with other values.

In plain words
What is it for?
Use it to audit CSV, form, and query-string parsers that build ordinary objects from untrusted field names.
Why use it?
It helps verify whether those replacements create a real crash or bypass in the library, rather than merely showing that an object property can be overwritten.

Skill for Claude Code

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

Part of the find-cve-agent plugin — 21 skills, 7 commands, 5 agents shipped together

Good fit Use it to audit CSV, form, and query-string parsers that build ordinary objects from untrusted field names.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/byamb4/find-cve-agent/method-clobbering
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 ByamB4/find-cve-agent --skill method-clobbering
Clone the repo
git clone --depth 1 https://github.com/ByamB4/find-cve-agent

Made for: Claude Code.

Or install find-cve-agent, the plugin that ships this one along with the rest of its 21 skills, 7 commands, 5 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 method-clobbering

README.md
[![agentmods](https://agentmods.dev/badge/skills/byamb4/find-cve-agent/method-clobbering/github.svg)](https://agentmods.dev/skills/byamb4/find-cve-agent/method-clobbering)
Your own site
<a href="https://agentmods.dev/skills/byamb4/find-cve-agent/method-clobbering"><img src="https://agentmods.dev/badge/skills/byamb4/find-cve-agent/method-clobbering/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for method-clobbering

Your own site · 80×15
<a href="https://agentmods.dev/skills/byamb4/find-cve-agent/method-clobbering"><img src="https://agentmods.dev/badge/skills/byamb4/find-cve-agent/method-clobbering.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 994 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00040 $0.00994
Opus 5 $0.00020 $0.00497
Sonnet 5 $0.00008 $0.00199
Haiku 4.5 $0.00004 $0.00099

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

Security

Grade A, and why

method-clobbering scanned grade A with 0 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 9d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/method-clobbering/SKILL.md · 100 lines

How it starts

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

Method Clobbering Detection

When to Use

Audit CSV/form/query string parsers that create plain objects from untrusted input where the attacker can control property names (keys), not just values.

Key Insight

When a parser creates a plain object {} from user input, the attacker can set keys like toString, valueOf, hasOwnProperty to non-function values. Any code that later calls these methods on the object will throw a TypeError.

Important: JSON.parse can do the same thing. You MUST show why the library-specific clobbering is worse than what JSON.parse enables. Show a REAL crash path, not just theoretical property overwrite.

Dangerous Keys

Key Normal Type Effect When Clobbered
toString Function obj + "" throws TypeError
valueOf Function obj == x or coercion throws TypeError
hasOwnProperty Function obj.hasOwnProperty(k) throws TypeError
constructor Function Type checks fail
__proto__ Object Prototype pollution (see prototype-pollution skill)
__defineGetter__ Function Legacy getter/setter manipulation
__defineSetter__ Function Legacy getter/setter manipulation
__lookupGetter__ Function Legacy getter/setter introspection
toJSON undefined JSON.stringify(obj) throws TypeError
then undefined await obj or Promise.resolve(obj) treats obj as thenable

Process

Step 1: Find Parsers That Create Objects

grep -rn "\[key\]\s*=" . --include="*.js" --include="*.ts"
grep -rn "\[header\]\|\[field\]\|\[name\]\|\[prop\]" .
grep -rn "result\[\|output\[\|obj\[\|data\[\|parsed\[" .

Step 2: Check If Keys Are User-Controlled

Common sources of attacker-controlled keys:

  • CSV column headers (first row)
  • HTTP form field names
  • Query string parameter names
  • Configuration file keys
  • JSON object keys (but JSON.parse already handles this)

Step 3: Check for Key Filtering

grep -rn "Object\.create(null)" .  # Null prototype = safe
grep -rn "hasOwnProperty\|toString\|valueOf" . | grep -i "filter\|block\|skip"
grep -rn "Object\.keys\|Map\|new Map" .

Read the full file on GitHub · 100 lines

Files

What ships with it

3 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. 9d ago First seen · 100 lines · 40 tokens per session scan A 58e43d6f4fc8

Subscribe to this mod's changes

method-clobbering is a skill published in the GitHub repository ByamB4/find-cve-agent (48 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 40 tokens to every session and 994 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories