PluginBench
Skill
Review
Audit score 70

api-authorization-and-bola

yaklang/hack-skills

Test API authorization, BOLA, BFLA, and mass assignment vulnerabilities across object and function access.

What is api-authorization-and-bola?

A focused authorization testing playbook for APIs that expose object identifiers, nested resources, or role-sensitive functions. Use this skill to systematically test for broken object-level access control (BOLA), broken function-level access control (BFLA), HTTP method abuse, and hidden field mass assignment.

  • Test object-level authorization by replaying requests across different user accounts
  • Probe nested resources and sibling endpoints for authorization gaps
  • Attempt HTTP method variations (PUT, PATCH, DELETE) on the same routes
  • Inject privilege-escalation payloads into JSON fields (role, isAdmin, org, verified, tier)
  • Discover hidden writable fields in API responses and admin documentation

How to install api-authorization-and-bola

npx skills add https://github.com/yaklang/hack-skills --skill api-authorization-and-bola
Claude Code
Cursor
Windsurf
Cline

How to use api-authorization-and-bola

  1. 1.Create two test accounts (Account A and Account B) with different roles or permissions
  2. 2.As Account A, capture HTTP requests for create, read, update, and delete operations
  3. 3.Replay each request using Account B's authentication token and observe whether access is granted or denied
  4. 4.Test sibling endpoints and nested resources (e.g., /api/v1/users/1/invoices/9) with Account B's token
  5. 5.Attempt HTTP method variations (PUT, PATCH, DELETE) on endpoints tested with GET
  6. 6.Inject privilege-escalation payloads (role, isAdmin, org, verified, tier) into request bodies and observe server response
  7. 7.Check API documentation and admin endpoints for hidden writable fields not visible in normal responses

Use cases

Good for
  • Verify that Account B cannot read or modify Account A's orders, invoices, or personal data via object ID manipulation
  • Test whether alternate HTTP verbs bypass authorization checks on the same endpoint
  • Attempt to escalate privileges by injecting admin or elevated role fields into create/update requests
  • Identify nested resource authorization gaps (e.g., /api/v1/users/1/invoices/9 accessible by unauthorized users)
  • Discover and exploit hidden writable fields revealed in API documentation or responses
Who it's for
  • API security testers
  • Penetration testers focusing on authorization flaws
  • Security researchers auditing multi-tenant or role-based APIs
  • Developers validating authorization controls during API design

api-authorization-and-bola FAQ

What is BOLA and how does it differ from BFLA?

BOLA (Broken Object-Level Access Control) occurs when an API fails to check if a user owns or has permission to access a specific object (e.g., order 123). BFLA (Broken Function-Level Access Control) occurs when an API fails to restrict access to administrative or sensitive functions (e.g., /api/v1/admin/users). Both are authorization flaws but target different API surfaces.

Where should I look for object IDs to test?

Object IDs appear in URL paths (/api/orders/123), query parameters (?id=123), request bodies, response bodies, headers, cookies, GraphQL arguments, and nested object references. Check all locations systematically.

What if the API uses UUIDs or opaque tokens instead of sequential IDs?

UUIDs and opaque tokens do not prevent BOLA; they only make ID enumeration harder. Focus on authorization logic: if you can obtain a valid ID (from your own account, error messages, or documentation), test whether the API checks ownership before granting access.

How do I test hidden writable fields?

Capture a successful create or update request, then inject additional JSON fields (role, isAdmin, org, verified, tier) into the request body. If the server accepts and stores these fields without error, the API may allow mass assignment or privilege escalation.

What should I do if I find an authorization flaw?

Document the affected endpoint, the HTTP method, the object ID or function name, the authorization bypass technique, and the impact (read, write, delete, or privilege escalation). Report to the API owner with a proof-of-concept request and remediation guidance.

Full instructions (SKILL.md)

Source of truth, from yaklang/hack-skills.


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

SurfaceExample
object read/api/v1/orders/123
nested object/api/v1/users/1/invoices/9
admin or internal function/api/v1/admin/users
update pathPUT, PATCH, DELETE variants
hidden JSON fieldsrole, org, verified, tier

3. QUICK PAYLOADS

{"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
  • For GraphQL and hidden parameter discovery: graphql and hidden parameters
  • For broader IDOR patterns outside APIs: idor broken object authorization