byamb4/find-cve-agent/method-clobbering
Claude Code and agent skill by byamb4/find-cve-agent
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Detect method clobbering via user-controlled object keys that overwrite built-in methods like toString, valueOf, or hasOwnProperty, causing crashes or logic bypass.
Install
npx vskill@latest install byamb4/find-cve-agent/method-clobberingSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as byamb4/find-cve-agent/method-clobbering.
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
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
Step 4: Demonstrate Real Impact
You MUST show one of:
- TypeError crash: Code calls
obj.toString()orobj.hasOwnProperty()on the parsed result - Logic bypass: Code checks
obj.hasOwnProperty(x)for security decisions - Thenable confusion: Code uses
awaitor Promise.resolve() on the parsed object
CVSS Guidance
- TypeError crash causing DoS (unauthenticated): HIGH 7.5
- Logic bypass via hasOwnProperty clobbering: HIGH 7.5
- Thenable confusion: MEDIUM 5.3-6.5
- No demonstrated crash/bypass: likely rejected
Self-Check Before Reporting
- Can JSON.parse achieve the same clobbering? If yes, why is this worse?
- Does code actually call methods on the parsed object?
- Is the crash catchable (try/catch around it)?
- Is the parser documented as expecting trusted input?
References
- Sinks -- Parser patterns creating objects from untrusted keys
- False Positive Indicators
- PoC Skeleton
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/method-clobbering/SKILL.md
Popularity
- Repository stars
- 53
- Repository forks
- 9
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/byamb4/find-cve-agent/method-clobbering)