Skip to main content
skill CX Codex

api-authorization-and-bola — Claude Code skill: BOLA and API authz

A playbook for testing API authorization: reaching other users' objects, calling functions your role should not have, and writing hidden fields.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add yaklang/hack-skills --skill api-authorization-and-bola -a claude-code
Open on GitHub

What api-authorization-and-bola does

The skill lays out an authorization test loop. You create two accounts, capture the create, read, update and delete flows as the first one, then replay every request with the second account's token. From there it moves to sibling endpoints, nested resources and alternate HTTP verbs on the same route.

A table lists the surfaces worth hitting: object reads like /api/v1/orders/123, nested objects like /api/v1/users/1/invoices/9, admin routes like /api/v1/admin/users, PUT, PATCH and DELETE variants, plus hidden JSON fields such as role, org, verified and tier. A separate section covers what testers skip — object IDs sitting in headers, cookies, GraphQL arguments and nested objects, and routes where the parent check exists but the child resource has none. That last one is why alternate methods on a shared route deserve a look.

This is an offensive security skill, not something to point at production. Run it against your own staging environment or a target you have written permission to test, because replaying another account's token against live data is real access, not a probe. When the problem sits in the token layer, the skill routes you to ../api-auth-and-jwt-abuse/SKILL.md; for GraphQL and hidden parameter discovery, to ../graphql-and-hidden-parameters/SKILL.md.

What it helps with

  • check whether an API returns another user's object by direct ID
  • find admin or internal functions an ordinary role can still call
  • catch hidden fields like role or verified that an update request accepts
  • compare how PUT, PATCH and DELETE are protected on the same route
  • test a nested resource that has no parent check

Example prompts for the agent

  • run the api-authorization-and-bola playbook against /api/v1/orders/{id} with two accounts
  • use the skill to check whether PATCH /api/v1/users/1 accepts a role field
  • walk through api-authorization-and-bola and compare /api/v1/users/1/invoices/9 with tokens A and B

How to install api-authorization-and-bola

1Skills CLI (Vercel)

npx skills add yaklang/hack-skills --skill api-authorization-and-bola -a claude-code

2Manually: put the files in place

~/.claude/skills/api-authorization-and-bola/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/api-authorization-and-bola/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about api-authorization-and-bola

How do I install api-authorization-and-bola in Claude?

Run npx skills add yaklang/hack-skills --skill api-authorization-and-bola -a claude-code. The skill file then lives at ~/.claude/skills/api-authorization-and-bola/SKILL.md.

What does api-authorization-and-bola do?

It gives a focused authorization test path: BOLA on objects, function-level access for the wrong role, method abuse, and control over hidden fields.

Which skills does it link to next?

Token-layer abuse routes to api-auth-and-jwt-abuse, GraphQL and hidden parameter discovery to graphql-and-hidden-parameters, and IDOR outside APIs to idor-broken-object-authorization.

Source text

SKILL.md · MIT
---
name: api-authorization-and-bola
description: >-
  API authorization and BOLA testing playbook. Use when APIs expose object identifiers, nested resources, hidden writable fields, or weak function-level authorization.
---

# SKILL: API Authorization and BOLA — Object Access, Function Access, and Mass Assignment

> **AI LOAD INSTRUCTION**: Use this skill when an API exposes object IDs, nested resources, or role-sensitive functions and you need a focused authorization test path: BOLA, BFLA, method abuse, and hidden field control.

## 1. CORE TEST LOOP

1. Create Account A and Account B.
2. As Account A, capture create, read, update, and delete flows.
3. Replay with Account B's token.
4. Test sibling endpoints, nested endpoints, and alternate HTTP verbs.

## 2. TEST SURFACES

| Surface | Example |
|---|---|
| object read | `/api/v1/orders/123` |
| nested object | `/api/v1/users/1/invoices/9` |
| admin or internal function | `/api/v1/admin/users` |
| update path | `PUT`, `PATCH`, `DELETE` variants |
| hidden JSON fields | `role`, `org`, `verified`, `tier` |

## 3. QUICK PAYLOADS

```json
{"role":"admin"}
{"isAdmin":true}
{"org":"target-company"}
{"verified":true}
```

## 4. WHAT TESTERS MISS

- object IDs in headers, cookies, GraphQL args, and nested objects
- alternate methods sharing the same route but weaker authz
- parent check present, child resource check missing
- admin docs revealing extra writable fields

## 5. NEXT ROUTING

- For JWT or token-layer abuse: [api auth and jwt abuse](../api-auth-and-jwt-abuse/SKILL.md)
- For GraphQL and hidden parameter discovery: [graphql and hidden parameters](../graphql-and-hidden-parameters/SKILL.md)
- For broader IDOR patterns outside APIs: [idor broken object authorization](../idor-broken-object-authorization/SKILL.md)

© yaklang · MIT · yaklang/hack-skills

Similar skills

All skills for Security →

From the same set93

cors-cross-origin-misconfiguration Guides testing of CORS misconfigurations, origin reflection, and credentialed API access. Useful when auditing cross-origin boundaries and cache policies. CX Codex +1 3,700installs injection-checking A router skill for injection testing: pick the right workflow based on where attacker-controlled input ends up. CX Codex +1 3,700installs kubernetes-pentesting A Kubernetes pentesting playbook: API server access, RBAC enumeration, service account token abuse, etcd, the Kubelet API and pod escape. CX Codex +1 3,700installs auth-sec Entry P1 category router for authentication and authorization testing. Helps choose the right audit path before digging into specific attacks. CX Codex +1 3,700installs vm-and-bytecode-reverse A playbook for reversing hand-rolled virtual machines and bytecode: find the dispatcher, map opcodes, write a disassembler. CX Codex +1 3,700installs websocket-security Helps analyze WebSocket security, detect CSWSH vulnerabilities, and review handshake headers. Useful when auditing real-time messaging, notifications, or WS-backed APIs. CX Codex +1 3,800installs dangling-markup-injection A playbook for dangling markup injection: when HTML injection works but JavaScript is blocked, it shows how to pull CSRF tokens and page data through unclosed tags. CX Codex +1 3,600installs dns-rebinding-attacks Provides an expert playbook for executing DNS rebinding attacks against internal web targets. It helps penetration testers bypass browser Same-Origin Policy during security reviews. CX Codex +1 3,600installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor