idor
What it does
This skill is a playbook for finding insecure direct object references, where an item ID is used without checking ownership. It is for developers and testers who review their own apps or code they are authorized to test.
When to use it
- βWhen a developer asks the agent to check whether changing an ID in a URL or request exposes another user's data.
- βWhen the agent reviews REST, GraphQL or query-string endpoints that take object IDs.
- βWhen a team wants a list of endpoints that need an ownership check.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/analyst/idor/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you check whether changing the order number in our API lets a user see someone else's invoice?β
5 new skills a week. 1 minute to read.
How it works
The agent finds endpoints that take object IDs, then asks three questions for each one: is the caller known, does the object belong to them, and is their role allowed.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
IDOR Hunting Playbook
IDOR is the #1 source of bug bounty payouts because it's simple, ubiquitous, and scanners can't find it (authorization is business logic). Every endpoint that takes an object ID is a candidate.
1. Sources
- URL path segments:
/api/users/123/invoices/456 - Query string:
?user_id=123 - JSON body fields:
{"orderId": 123} - Headers used as auth scope:
X-Tenant-ID,X-Customer-Id - JWT claims that downstream handlers trust:
sub,tenant,role - WebSocket subscription filters
- GraphQL arguments (
user(id: 123))
2. Audit workflow
Step 1 β enumerate object-handling endpoints
# REST
grep -rE '@(Get|Post|Put|Delete|Patch)Mapping.*\{[a-zA-Z]+Id\}' /workspace/src # Spring
grep -rE 'router\.(get|post|put|delete)\([^)]*:id' /workspace/src # Express
grep -rE '@app\.route\([^)]*<[a-z]+:' /workspace/src # Flask
grep -rE 'resources?\s+:[a-z]+' /workspace/src # Rails
# GraphQL
grep -rE 'type Query|type Mutation' /workspace/src
grep -rE '\w+\(id: ID' /workspace/src
Step 2 β for each endpoint, answer three questions
- Does it check who the caller is? (auth middleware / decorator)
- Does it check whether the object belongs to the caller? (ownership check / tenant filter in the query)
- Does it check whether the caller's role permits the action? (RBAC / policy engine)
A "no" to question 2 = horizontal IDOR (read/write other users' data). A "no" to question 3 = vertical IDOR (regular user β admin action).
Step 3 β ownership-check grep patterns
# Django: should have .filter(user=request.user) on the queryset
grep -rE 'Model\.objects\.get\(pk=' /workspace/src | grep -v 'user=request\.user'
# Rails: should have current_user.posts.find(params[:id])
grep -rE 'Post\.find\(params\[:id\]\)' /workspace/src
# Spring: should have @PreAuthorize("#id == principal.id")
grep -rE 'findById\(id\)' /workspace/src | xargs -I{} grep -L '@PreAuthorize\|@PostAuthorize'
3. High-yield patterns
GraphQL IDOR via introspection
curl -X POST https://target.com/graphql \
-H 'Content-Type: application/json' \
-d '{"query":"{ __schema { types { name fields { name args { name type { name } } } } } }"}'
Any query field that takes an id arg and lacks a custom directive
(@auth(requires: OWNER)) is a candidate. Mutations are even higher
value β they often forget ownership checks.
JWT claim trust
If the handler pulls user_id from request.user.id but also accepts
a user_id query param as override for "admin features", check whether
the override path enforces the admin claim. Frequently broken.
Mass assignment via hidden fields
User.objects.create(**request.POST.dict())
# allows POST'ing is_staff=true
4. PoC workflow
Two-account diff:
- Create account A, note
sessionAcookie andobjectAID. - Create account B, note
sessionBcookie andobjectBID. curl -b sessionA /api/objects/<objectB>β should 403.- If it returns 200 with objectB data β confirmed IDOR.
For vertical escalation:
- Normal user cookie
sessionU. - Call admin endpoint:
curl -b sessionU -X POST /api/admin/users/<victim>/role -d '{"role":"admin"}'. - Watch the response code + subsequent
GET /api/users/<victim>.
5. UUID vs integer
Sequential integer IDs make IDOR trivial. UUIDv4 makes it harder but:
- UUIDs leak in logs, emails, public URLs, support tickets
- Many apps use UUIDv1 (time-based) which is partially predictable
- Enumeration through a listing endpoint still works
- Some APIs accept both UUID and numeric ID (dual primary key)
Always test UUID endpoints β the "it's a UUID so it's safe" assumption is one of the richest hunting grounds.
6. Success signals
- HTTP 200 where you expected 403/404
- Response body contains PII/data belonging to the other account
- Role field changed on victim account
- Subsequent admin action now permitted for low-priv session
Negative control: same request with your own account's ID. Should return 200 with identical shape. Anything that returns 404 for your own account but 200 for someone else's is a confirmation signal.
7. Default CVSS
| Variant | Vector | Score |
|---|---|---|
| Horizontal read (other user PII) | AV:N/AC:L/PR:L/UI |
FAQ
What is an insecure direct object reference?
It is when an app uses an ID from the request to fetch an item without checking that the user is allowed to see it.
Where do these IDs usually appear?
The skill lists URL paths, query strings, JSON bodies, headers, JWT claims and GraphQL arguments.
Why is this hard for automatic scanners?
The skill says authorization depends on business rules, so a scanner often cannot tell whether access is correct.
Details
Original description by the author
Hunt Insecure Direct Object Reference (CWE-639) β missing authorization checks on object IDs. Covers horizontal vs vertical privilege escalation, UUID vs integer guessing, and GraphQL introspection-driven IDOR discovery.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #13959
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.