03 API Security
Welcome to:
Module 03 — API Security
Modern applications increasingly depend on APIs.
A user may interact with:
Web Application
Mobile Application
Desktop Applicationbut behind these interfaces you will often find:
API Endpoints ↓Application Logic ↓Databases ↓Cloud ServicesFor a Bug Bounty Hunter, this creates an important principle:
Do Not TestOnly the UI
Test the APIsThat Power ItIn this module, you will learn how to discover, understand and systematically assess APIs while remaining within authorized scope.
Module Objectives
Section titled “Module Objectives”By the end of this module, you will understand how to:
-
explain modern API architecture.
-
understand REST APIs.
-
understand GraphQL fundamentals.
-
identify API endpoints.
-
analyze API requests and responses.
-
understand HTTP methods in API workflows.
-
analyze JSON request bodies.
-
understand API authentication.
-
analyze API keys and bearer tokens.
-
understand JWT fundamentals.
-
test API authorization.
-
identify Broken Object Level Authorization.
-
understand Broken Function Level Authorization.
-
analyze object ownership.
-
test role boundaries.
-
identify excessive data exposure.
-
understand mass assignment.
-
analyze hidden API parameters.
-
assess API rate limiting.
-
understand resource consumption risks.
-
investigate pagination and filtering.
-
analyze API versioning.
-
identify undocumented endpoints.
-
understand GraphQL authorization risks.
-
analyze GraphQL queries and mutations.
-
assess API business logic.
-
understand API security misconfiguration.
-
collect API evidence.
-
build API attack-surface inventories.
-
write professional API vulnerability reports.
1 — What Is an API?
Section titled “1 — What Is an API?”API stands for:
ApplicationProgrammingInterfaceAn API allows software components to communicate.
For example:
Mobile App ↓API ↓Application Server ↓DatabaseInstead of returning HTML, APIs commonly return structured data such as:
{ "id": 1001, "name": "Alice", "role": "user"}2 — Why APIs Matter to Bug Bounty Hunters
Section titled “2 — Why APIs Matter to Bug Bounty Hunters”APIs frequently expose:
Authentication
User Profiles
Payments
Files
Orders
Messages
Administration
Cloud Services
Business WorkflowsThe API may therefore represent:
The ActualSecurity Boundarybehind the application.
3 — UI vs API
Section titled “3 — UI vs API”Suppose the UI shows:
My Profilebut the browser sends:
GET /api/users/1001The important security question becomes:
Can User ARequest User B'sObject?not simply:
Can the UIDisplay AnotherProfile?4 — API Architecture
Section titled “4 — API Architecture”A simplified architecture:
Client ↓API Gateway ↓Authentication ↓Application Service ↓DatabaseMore complex environments may contain:
Web Client
Mobile Client
API Gateway
Microservices
Identity Provider
Databases
Cloud Services
Third-Party APIs5 — REST APIs
Section titled “5 — REST APIs”REST APIs commonly expose resources through endpoints such as:
/api/users
/api/orders
/api/files
/api/projectsIndividual objects may be accessed using:
/api/users/10016 — HTTP Methods
Section titled “6 — HTTP Methods”REST APIs frequently use:
GETRead
POSTCreate
PUTReplace
PATCHModify
DELETEDeleteBut never assume the method alone determines authorization.
7 — Example API Request
Section titled “7 — Example API Request”GET /api/v1/profile HTTP/1.1Host: api.example.comAuthorization: Bearer <token>Accept: application/json8 — Example API Response
Section titled “8 — Example API Response”{ "id": 1001, "username": "research-user", "plan": "premium"}9 — JSON Requests
Section titled “9 — JSON Requests”APIs commonly accept:
{ "name": "Research User", "email": "research@example.test"}Each field creates a question:
Can I Modify It?
Should I Control It?
Does the ServerValidate It?
Does AuthorizationApply to It?10 — API Attack Surface
Section titled “10 — API Attack Surface”Create an inventory of:
Hosts
Versions
Endpoints
Methods
Parameters
Objects
Roles
Tokens
Business WorkflowsThink:
API Host ↓Endpoint ↓Method ↓Parameter ↓Object ↓Identity ↓Authorization11 — Discovering API Endpoints
Section titled “11 — Discovering API Endpoints”Within authorized environments, endpoints may be discovered from:
Browser Traffic
Mobile Traffic
JavaScript
API Documentation
Application Routes
Network Requests
Error Messages12 — Browser Developer Tools
Section titled “12 — Browser Developer Tools”Modern applications frequently make API calls using:
Fetch
XHR
GraphQLInspecting application traffic can reveal:
Endpoints
Methods
Parameters
Headers
Response Structures13 — JavaScript Analysis
Section titled “13 — JavaScript Analysis”Application JavaScript may contain references such as:
/api/v1/users
/api/v2/orders
/graphql
/api/adminThese references help build:
API AttackSurfaceDiscovery does not automatically mean authorization.
14 — API Documentation
Section titled “14 — API Documentation”APIs may expose documentation through technologies such as:
OpenAPI
Swagger
GraphQL SchemaDocumentation can reveal:
Endpoints
Parameters
Data Types
Authentication
Response Models15 — API Inventory
Section titled “15 — API Inventory”Create:
API_Inventory.csvwith:
| Endpoint | Method | Authentication | Role | Object | Purpose |
|---|
16 — Endpoint Mapping
Section titled “16 — Endpoint Mapping”Example:
/api/users├── GET└── POST
/api/users/{id}├── GET├── PATCH└── DELETEEach combination represents a separate:
SecurityTesting Scenario17 — API Authentication
Section titled “17 — API Authentication”Authentication identifies:
Who IsMaking the Request?APIs may use:
Session Cookies
API Keys
Bearer Tokens
JWT
OAuth Tokens18 — Bearer Tokens
Section titled “18 — Bearer Tokens”Example:
Authorization: Bearer <access-token>Possession of the token may represent:
AuthenticatedIdentityTreat tokens as sensitive credentials.
19 — API Keys
Section titled “19 — API Keys”API keys may identify:
Application
Client
Integration
UserDo not assume:
API Key =User AuthorizationThe security model depends on implementation.
20 — Token Testing
Section titled “20 — Token Testing”Questions include:
Does Token Expire?
Can TokenBe Reused?
Does LogoutInvalidate It?
Are PermissionsEmbedded?
Can Revoked TokensStill Work?21 — JWT Fundamentals
Section titled “21 — JWT Fundamentals”JWT stands for:
JSON Web TokenA JWT commonly contains:
Header
Payload
SignatureConceptually:
Header.Payload.Signature22 — JWT Payload
Section titled “22 — JWT Payload”A payload might contain claims such as:
{ "sub": "1001", "role": "user", "exp": 1780000000}Remember:
Readable ≠EditableA properly validated signature should prevent unauthorized modification.
23 — JWT Security Questions
Section titled “23 — JWT Security Questions”Assess:
Signature Validation
Expiration
Issuer
Audience
Token Type
Key Management
Claim EnforcementDo not assume a token is vulnerable merely because its contents are readable.
24 — Authentication vs Authorization
Section titled “24 — Authentication vs Authorization”Authentication:
This TokenBelongs toUser AAuthorization:
Can User AAccess Object 5001?Many serious API vulnerabilities occur because:
Authentication Works
but
Authorization Fails25 — Broken Object Level Authorization
Section titled “25 — Broken Object Level Authorization”Broken Object Level Authorization is commonly abbreviated:
BOLAIt occurs when an API fails to properly verify whether the authenticated user is allowed to access a particular object.
26 — BOLA Example
Section titled “26 — BOLA Example”Account A owns:
/api/orders/5001Account B owns:
/api/orders/5002Account B requests:
GET /api/orders/5001If the API returns Account A’s private order without authorization:
Potential BOLA27 — Safe BOLA Testing
Section titled “27 — Safe BOLA Testing”Use:
Research Account A
Research Account Bwhere possible.
Workflow:
Account ACreates Object ↓Record Object ID ↓Account BRequests Object ↓Observe Authorization28 — Object Identifiers
Section titled “28 — Object Identifiers”Objects may use:
Sequential IDs
UUIDs
Names
Email Addresses
Tokens
Composite IDsImportant:
Hard-to-Guess ID ≠Authorization29 — UUIDs
Section titled “29 — UUIDs”A UUID may make an object difficult to guess.
But if:
User B ObtainsUser A's UUIDthe server must still enforce:
Authorization30 — Read vs Write Authorization
Section titled “30 — Read vs Write Authorization”Do not test only:
GETAuthorization may differ for:
GET
PATCH
PUT
DELETEExample:
Cannot ReadAnother User's Object
but
Can Modify It31 — Object Ownership Matrix
Section titled “31 — Object Ownership Matrix”Create:
Object_Ownership_Matrix.csvwith:
| Object | Owner | User A | User B | Admin |
|---|
32 — Broken Function Level Authorization
Section titled “32 — Broken Function Level Authorization”BFLA stands for:
Broken FunctionLevel AuthorizationIt concerns access to:
RestrictedFunctionsrather than individual objects.
33 — BFLA Example
Section titled “33 — BFLA Example”Normal user:
GET /api/profileAdministrator:
POST /api/admin/users/1001/disableAsk:
Can Normal UserCall the AdminEndpoint Directly?34 — Hidden Admin Functions
Section titled “34 — Hidden Admin Functions”The frontend may hide:
Admin Menubut API endpoints may still exist.
Remember:
Hidden UI ≠Authorization35 — Role-Based API Testing
Section titled “35 — Role-Based API Testing”Compare requests from:
Guest
User
Premium User
Moderator
Administratorwhere these roles exist in an authorized lab.
36 — Authorization Matrix
Section titled “36 — Authorization Matrix”Create:
API_Authorization_Matrix.csvwith:
| Function | Guest | User | Premium | Admin |
|---|
This helps identify:
ExpectedSecurity Boundaries37 — Property-Level Authorization
Section titled “37 — Property-Level Authorization”Authorization may also apply to individual object properties.
Example:
{ "name": "Researcher", "email": "user@example.test", "role": "user"}The user may be allowed to change:
namebut not:
role38 — Mass Assignment
Section titled “38 — Mass Assignment”Mass assignment can occur when an application automatically maps user-provided properties into internal objects without sufficiently restricting sensitive fields.
Example:
{ "name": "Research User", "role": "admin"}The security question is:
Does the ServerAccept SensitiveProperties the UserShould Not Control?39 — Hidden Properties
Section titled “39 — Hidden Properties”Compare:
GET Responsewith:
PATCH RequestYou may discover fields such as:
role
verified
account_status
discount
permissionsDo not assume they are writable.
Test safely.
40 — Excessive Data Exposure
Section titled “40 — Excessive Data Exposure”An API may return more information than the client needs.
Example:
{ "name": "User", "email": "user@example.test", "internal_id": "12345", "private_field": "..."}The key question is:
Should This UserReceive This Data?41 — Response Analysis
Section titled “41 — Response Analysis”Do not inspect only the fields displayed by the UI.
Inspect:
CompleteAPI Responsebecause JavaScript may ignore sensitive fields that are still returned.
42 — Data Minimization
Section titled “42 — Data Minimization”Secure APIs should generally return:
Only the DataRequiredfor the authorized operation.
43 — API Enumeration
Section titled “43 — API Enumeration”APIs may expose list endpoints such as:
GET /api/users
GET /api/orders
GET /api/filesDetermine:
Who Can List?
What Can They See?
How Much DataIs Returned?44 — Pagination
Section titled “44 — Pagination”Typical pagination parameters include:
page
limit
offset
cursorExample:
/api/users?page=1&limit=2045 — Pagination Security
Section titled “45 — Pagination Security”Ask:
Can LimitsBe Excessive?
Does PaginationBypass Authorization?
Can Hidden RecordsBe Retrieved?Use safe values to avoid unnecessary resource consumption.
46 — Filtering
Section titled “46 — Filtering”APIs may support:
?user_id=1001
?status=active
?account=123Filters should not replace authorization.
47 — Sorting
Section titled “47 — Sorting”Parameters such as:
sort
order
fieldmay reveal unexpected application behavior.
Treat them as user-controlled input.
48 — Rate Limiting
Section titled “48 — Rate Limiting”APIs often require rate limits for operations such as:
Authentication
OTP
Password Reset
Search
Messaging
Coupon Redemption49 — Rate-Limit Testing
Section titled “49 — Rate-Limit Testing”Determine whether:
Limits Exist
Limits ApplyPer Account
Per Token
Per IP
Per EndpointDo not create excessive traffic.
50 — Resource Consumption
Section titled “50 — Resource Consumption”Some API requests may be computationally expensive.
Examples:
Large Search
Complex GraphQL Query
Large Export
File ProcessingAvoid stress testing unless explicitly authorized.
51 — API Versioning
Section titled “51 — API Versioning”Applications may expose:
/api/v1/
/api/v2/
/api/v3/Older versions can be interesting because:
Security ControlsMay Differ52 — Legacy API Versions
Section titled “52 — Legacy API Versions”Example:
/api/v2/profileenforces authorization.
But:
/api/v1/profilemay behave differently.
Do not assume old versions are in scope merely because they exist.
53 — Undocumented APIs
Section titled “53 — Undocumented APIs”Applications may retain:
Legacy Endpoints
Development Endpoints
Internal Routes
Deprecated APIsThese can appear in:
JavaScript
Documentation
Traffic
Historical References54 — API Error Messages
Section titled “54 — API Error Messages”Errors may reveal:
Internal Object Names
Database Fields
Framework Information
Service Names
Internal PathsDetermine whether disclosure creates meaningful security impact.
55 — API Security Misconfiguration
Section titled “55 — API Security Misconfiguration”Potential examples include:
Verbose Errors
Public Documentation
Weak CORS
Debug Endpoints
Unnecessary Methods
Exposed Internal APIsImpact must always be validated.
56 — Content-Type Handling
Section titled “56 — Content-Type Handling”APIs may process:
application/json
application/xml
application/x-www-form-urlencoded
multipart/form-dataDifferent parsers may enforce security controls differently.
57 — Method Handling
Section titled “57 — Method Handling”If an endpoint expects:
POSTunderstand how it behaves with other supported methods.
Do not assume:
Method Restriction =Authorization58 — Parameter Location
Section titled “58 — Parameter Location”The same value might appear in:
URL
Header
Cookie
JSON BodyMap where the server obtains:
Identity
Object ID
Role
State59 — Duplicate Parameters
Section titled “59 — Duplicate Parameters”Applications and intermediary systems can sometimes interpret duplicate parameters differently.
This becomes relevant when:
Multiple LayersParse the RequestFocus on understanding behavior rather than blindly mutating requests.
60 — API Business Logic
Section titled “60 — API Business Logic”API testing is not only about technical vulnerabilities.
APIs implement:
Business Rulessuch as:
Purchases
Refunds
Subscriptions
Invitations
Approvals
Credits
Rewards61 — Business Logic Example
Section titled “61 — Business Logic Example”Workflow:
Create Order ↓Pay ↓Complete ↓RefundAsk:
Can OrderComplete WithoutPayment?62 — State Transition Testing
Section titled “62 — State Transition Testing”Map:
Pending ↓Approved ↓CompletedThen ask:
Can User MoveDirectly fromPending to Completed?63 — Client-Controlled State
Section titled “63 — Client-Controlled State”Example:
{ "status": "approved"}Ask:
Should the ClientControl This Field?64 — Price and Quantity
Section titled “64 — Price and Quantity”Example:
{ "product_id": 100, "quantity": 1}Investigate whether the server independently calculates:
Price
Discount
Total65 — Workflow Replay
Section titled “65 — Workflow Replay”Some operations should be:
Single UseExamples:
Coupon
Invite
Reset Token
Payment ActionDetermine whether replay creates unauthorized effects.
66 — API Race Conditions
Section titled “66 — API Race Conditions”Certain workflows may behave incorrectly when requests occur concurrently.
Potential areas:
Coupons
Inventory
Rewards
Withdrawals
InvitationsOnly test concurrency in safe training environments or where explicitly permitted.
67 — REST Resource Thinking
Section titled “67 — REST Resource Thinking”For every resource ask:
Who Can Create?
Who Can Read?
Who Can Update?
Who Can Delete?This gives:
CRUDAuthorization Matrix68 — CRUD Matrix
Section titled “68 — CRUD Matrix”Create:
| Resource | Create | Read | Update | Delete |
|---|---|---|---|---|
| Profile | User | Owner | Owner | Owner |
| User | Admin | Admin | Admin | Admin |
| File | User | Owner | Owner | Owner |
Then validate server behavior.
69 — GraphQL
Section titled “69 — GraphQL”GraphQL provides a flexible query interface commonly exposed through an endpoint such as:
/graphqlUnlike REST:
Many OperationsMay ShareOne Endpoint70 — GraphQL Query
Section titled “70 — GraphQL Query”Conceptually:
query { profile { id username }}71 — GraphQL Mutation
Section titled “71 — GraphQL Mutation”Mutations modify state.
Conceptually:
mutation { updateProfile(name: "Research User") { id name }}72 — GraphQL Attack Surface
Section titled “72 — GraphQL Attack Surface”Map:
Queries
Mutations
Objects
Fields
Arguments
Roles73 — GraphQL Authorization
Section titled “73 — GraphQL Authorization”Authorization must still apply to:
Objects
Fields
FunctionsGraphQL does not automatically provide access control.
74 — GraphQL Object Authorization
Section titled “74 — GraphQL Object Authorization”Suppose:
user(id: "1001")returns another user’s private information.
The underlying problem may still be:
Broken ObjectAuthorization75 — GraphQL Field Authorization
Section titled “75 — GraphQL Field Authorization”A user may be allowed to access:
namebut not:
internalNotesField-level authorization therefore matters.
76 — GraphQL Introspection
Section titled “76 — GraphQL Introspection”GraphQL may support schema introspection.
It can reveal:
Types
Queries
Mutations
Fields
ArgumentsWhether introspection exposure itself is a vulnerability depends on context.
77 — GraphQL Complexity
Section titled “77 — GraphQL Complexity”GraphQL allows flexible queries.
Complex queries can potentially create:
ResourceConsumptionrisks.
Do not perform stress testing without explicit authorization.
78 — Mobile APIs
Section titled “78 — Mobile APIs”Mobile applications frequently communicate with the same or similar APIs used by web applications.
Therefore:
Mobile UI ↓APIshould be understood as part of the broader application architecture.
79 — Mobile vs Web API
Section titled “79 — Mobile vs Web API”Compare:
Web API
Mobile APISecurity controls may differ because of:
Different Versions
Different Clients
Legacy Implementations80 — API Trust Boundaries
Section titled “80 — API Trust Boundaries”Identify where trust changes:
Client ↓API Gateway ↓Service ↓DatabaseAsk:
Which LayerAuthenticates?
Which LayerAuthorizes?
Which LayerValidates Input?81 — Microservices
Section titled “81 — Microservices”Modern APIs may call multiple internal services.
Example:
API Gateway ↓Order Service ↓Payment Service ↓Notification ServiceSecurity assumptions between services can create vulnerabilities.
82 — API Gateway
Section titled “82 — API Gateway”An API gateway may provide:
Authentication
Rate Limiting
Routing
Loggingbut backend services should not blindly assume every request is trustworthy.
83 — Trusting Client Claims
Section titled “83 — Trusting Client Claims”Suppose request contains:
{ "user_id": "1001"}Ask:
Does the ServerTrust This Value
or
Derive Identityfrom Authentication?84 — Identity Source
Section titled “84 — Identity Source”Determine whether identity comes from:
Session
JWT
API Key
Request Parameter
HeaderThis is fundamental to authorization testing.
85 — Object Source
Section titled “85 — Object Source”Determine how the server identifies the resource:
URL ID
JSON ID
Query Parameter
Token ClaimThen compare:
IdentityvsObject Ownership86 — API Security Testing Model
Section titled “86 — API Security Testing Model”For every request ask:
Who Am I?
What Am IRequesting?
Do I Own It?
What RoleDo I Have?
What InputCan I Control?
What Shouldthe Server Enforce?87 — Differential API Testing
Section titled “87 — Differential API Testing”Compare:
Account A Request
vs
Account B RequestThen compare:
User Request
vs
Admin RequestLook at:
Endpoint
Method
Headers
Body
Response88 — Baseline API Request
Section titled “88 — Baseline API Request”Always preserve:
Known-GoodRequestbefore modifying:
Token
Object ID
Role
Method
Parameter89 — Change One Variable
Section titled “89 — Change One Variable”Example:
BaselineUser A + Object AChange only:
Object A ↓Object BThis makes the authorization test easier to understand.
90 — API Response Comparison
Section titled “90 — API Response Comparison”Compare:
Status
Length
Fields
Values
Headers
TimingDo not rely only on:
200
403
40491 — HTTP 200 Is Not Proof
Section titled “91 — HTTP 200 Is Not Proof”Response:
HTTP/1.1 200 OKmay contain:
{ "error": "Access denied"}Always inspect the actual response.
92 — HTTP 403 Is Not Always Safe
Section titled “92 — HTTP 403 Is Not Always Safe”Likewise, inspect whether a denied response accidentally contains:
SensitiveInformation93 — API Evidence
Section titled “93 — API Evidence”Strong evidence includes:
Account A Identity
Account B Identity
Object Ownership
Baseline Request
Unauthorized Request
Response
Security Impact94 — BOLA Evidence Example
Section titled “94 — BOLA Evidence Example”Document:
Account Aowns object 5001.
Account Bis authenticated separately.
Account B requestsobject 5001.
API returnsAccount A's private object.This clearly demonstrates:
Ownership +Unauthorized Access95 — Weak API Evidence
Section titled “95 — Weak API Evidence”Weak:
Changing IDReturns 200Strong:
Changing Account B'sobject ID to Account A'sobject ID returns Account A'sprivate billing record.96 — API Vulnerability Report
Section titled “96 — API Vulnerability Report”Your report should contain:
Title
Endpoint
Method
Authentication
Affected Role
Prerequisites
Reproduction
Request
Response
Impact
Remediation97 — API Report Title
Section titled “97 — API Report Title”Weak:
API IDORBetter:
Broken Object-LevelAuthorization AllowsAuthenticated Usersto Access Other Users'Private Documents98 — API Impact
Section titled “98 — API Impact”Explain:
What DataCan Be Accessed?
What ActionCan Be Performed?
Who Is Affected?
What PrivilegeIs Required?99 — API Remediation
Section titled “99 — API Remediation”Depending on the issue, recommendations may include:
Server-SideAuthorization
Object OwnershipValidation
Role Validation
Property Allowlisting
Data Minimization
Rate Limiting100 — Build an API Testing Notebook
Section titled “100 — Build an API Testing Notebook”Create:
API_Security_Notebook.mdwith:
# API Hosts
# Versions
# Authentication
# Roles
# Endpoints
# Objects
# Parameters
# Authorization
# Business Logic
# GraphQL
# Vulnerability Candidates
# Evidence
# Reports101 — Endpoint Register
Section titled “101 — Endpoint Register”Create:
API_Endpoint_Register.csvwith:
| Endpoint | Method | Auth | Role | Object | Parameters |
|---|
102 — Object Register
Section titled “102 — Object Register”Create:
API_Object_Register.csvwith:
| Object | Identifier | Owner | Sensitivity | Operations |
|---|
103 — Parameter Register
Section titled “103 — Parameter Register”Create:
API_Parameter_Register.csvwith:
| Parameter | Endpoint | Location | Type | Security Relevance |
|---|
104 — Role Matrix
Section titled “104 — Role Matrix”Create:
API_Role_Matrix.csvwith:
| Endpoint | Guest | User | Premium | Admin |
|---|
105 — API Hypothesis Register
Section titled “105 — API Hypothesis Register”Create:
API_Hypotheses.csvwith:
| ID | Endpoint | Hypothesis | Test | Result | Status |
|---|
106 — Example Hypotheses
Section titled “106 — Example Hypotheses”Can User BRead User A'sObject?
Can UserCall AdminFunction?
Can SensitiveProperty Be Modified?
Can Revoked TokenStill Work?
Can Legacy APIBypass New Control?107 — API Vulnerability Candidates
Section titled “107 — API Vulnerability Candidates”Create:
API_Vulnerability_Candidates.csvwith:
| Finding | Endpoint | Evidence | Impact | Status |
|---|
108 — API Testing Workflow
Section titled “108 — API Testing Workflow”Use:
Discover ↓Inventory ↓Authenticate ↓Understand Objects ↓Map Roles ↓Build Baseline ↓Create Hypothesis ↓Modify Request ↓Compare Response ↓Validate ↓Document ↓Report109 — Think in Objects
Section titled “109 — Think in Objects”Instead of asking:
Is This APIVulnerable?ask:
What ObjectsExist?
Who Owns Them?
Who Can Read Them?
Who Can Modify Them?
Who Can Delete Them?110 — Think in Functions
Section titled “110 — Think in Functions”Then ask:
What FunctionsExist?
Which RolesShould Access Them?
Can Lower RolesCall Them Directly?111 — Think in Properties
Section titled “111 — Think in Properties”Then:
Which FieldsCan Users Control?
Which FieldsShould BeServer-Controlled?112 — Think in Workflows
Section titled “112 — Think in Workflows”Finally:
What BusinessProcess DoesThis API Implement?
Can StepsBe Skipped?
Can ActionsBe Replayed?
Can StateBe Manipulated?Practical Exercise 1 — Build an API Inventory
Section titled “Practical Exercise 1 — Build an API Inventory”Using an authorized training application, identify:
API Host
Version
Endpoints
Methods
AuthenticationCreate:
API_Inventory.csvPractical Exercise 2 — Map 20 API Endpoints
Section titled “Practical Exercise 2 — Map 20 API Endpoints”Document at least:
20Endpoint + MethodCombinationswhere available.
Classify each by:
Authentication
Role
Object
FunctionPractical Exercise 3 — Build Object Inventory
Section titled “Practical Exercise 3 — Build Object Inventory”Identify:
Users
Files
Orders
Projects
Messageswhere available.
Document:
Identifier
Owner
Operations
SensitivityPractical Exercise 4 — Two-Account BOLA Test
Section titled “Practical Exercise 4 — Two-Account BOLA Test”Using your own training accounts:
Account ACreates Object ↓Account BAttempts Read ↓Account BAttempts UpdateDocument the authorization behavior.
Practical Exercise 5 — Function Authorization
Section titled “Practical Exercise 5 — Function Authorization”Create:
Normal User
Admin Userin an authorized lab.
Compare:
Admin Functions
Normal Functionsand validate that restricted API operations enforce authorization server-side.
Practical Exercise 6 — Property Testing
Section titled “Practical Exercise 6 — Property Testing”Take an editable profile object.
Identify:
User-Controlled Fields
Server-Controlled FieldsTest whether sensitive fields are appropriately protected.
Practical Exercise 7 — Token Lifecycle
Section titled “Practical Exercise 7 — Token Lifecycle”Document:
Token Creation
Expiration
Logout
Password Change
Revocationand observe expected token behavior.
Practical Exercise 8 — API Version Comparison
Section titled “Practical Exercise 8 — API Version Comparison”If your training environment exposes:
v1
v2compare:
Authentication
Authorization
Response Fields
MethodsPractical Exercise 9 — GraphQL Mapping
Section titled “Practical Exercise 9 — GraphQL Mapping”In an authorized GraphQL lab, identify:
Queries
Mutations
Objects
Fields
Argumentsand create:
GraphQL_Attack_Surface.mdPractical Exercise 10 — API Business Logic
Section titled “Practical Exercise 10 — API Business Logic”Select one workflow:
Order
Coupon
Invite
Subscription
ApprovalDocument:
Normal Sequence
State Changes
Security Boundaries
Potential Abuse CasesPractical Exercise 11 — Build Authorization Matrix
Section titled “Practical Exercise 11 — Build Authorization Matrix”Create:
API_Authorization_Matrix.csvfor:
Guest
User A
User B
Adminacross at least ten operations.
Practical Exercise 12 — Write an API Vulnerability Report
Section titled “Practical Exercise 12 — Write an API Vulnerability Report”Create a professional report for a fictional:
Broken ObjectLevel Authorizationfinding.
Include:
Title
Endpoint
Method
Accounts
Object Ownership
Baseline Request
Unauthorized Request
Response
Impact
RemediationKnowledge Check
Section titled “Knowledge Check”-
What is an API?
-
Why are APIs important in bug bounty hunting?
-
What is REST?
-
What are common REST methods?
-
What is an API endpoint?
-
What information can JavaScript reveal about APIs?
-
What is OpenAPI?
-
What is API authentication?
-
What is a bearer token?
-
What is an API key?
-
What is a JWT?
-
Why does readable JWT content not mean the token is editable?
-
What is the difference between authentication and authorization?
-
What is BOLA?
-
Why should two controlled accounts be used for BOLA testing?
-
Why are UUIDs not authorization controls?
-
Why should read and write authorization both be tested?
-
What is BFLA?
-
Why does a hidden admin interface not provide authorization?
-
What is property-level authorization?
-
What is mass assignment?
-
What is excessive data exposure?
-
Why should complete API responses be reviewed?
-
Why should filters not replace authorization?
-
What is API rate limiting?
-
Why must resource-consumption testing be controlled?
-
Why are legacy API versions interesting?
-
What are undocumented APIs?
-
What information can API errors expose?
-
What is API security misconfiguration?
-
Why does Content-Type matter?
-
What is API business logic?
-
What is state-transition testing?
-
Why can replayable actions create security issues?
-
What is a CRUD authorization matrix?
-
What is GraphQL?
-
What is a GraphQL query?
-
What is a GraphQL mutation?
-
Why does GraphQL still require object-level authorization?
-
What is field-level authorization?
-
What is GraphQL introspection?
-
Why can GraphQL complexity create resource risks?
-
Why should mobile APIs be assessed?
-
What is an API gateway?
-
Why should backend services not blindly trust gateway assumptions?
-
Why is determining the identity source important?
-
What is differential API testing?
-
Why should one request variable be changed at a time?
-
What makes strong BOLA evidence?
-
What should a professional API vulnerability report contain?
Key Takeaways
Section titled “Key Takeaways”API security requires thinking in:
Identity
Objects
Functions
Properties
Roles
State
Business LogicFor every API request ask:
Who Am I? ↓What ObjectAm I Accessing? ↓Do I Own It? ↓What RoleDo I Have? ↓What ActionAm I Performing? ↓Should the ServerAllow It?Remember:
Authentication ≠AuthorizationUUID ≠AuthorizationHidden Endpoint ≠Protected EndpointHidden Field ≠Protected PropertyHTTP 200 ≠Successful ExploitAPI Response ≠Only Whatthe UI DisplaysA professional API testing methodology is:
Discover ↓Map ↓Understand Identity ↓Understand Objects ↓Understand Roles ↓Build Baseline ↓Create Hypothesis ↓Test ↓Compare ↓Validate ↓ReportCareer Connection
Section titled “Career Connection”API security skills are increasingly important for:
Bug Bounty Hunters
Security Researchers
Application Security Engineers
API Security Analysts
Penetration Testers
Cloud Security EngineersDuring interviews, you should be able to explain:
How YouDiscover APIs
How YouMap Endpoints
How YouIdentify Objects
How YouTest BOLA
How YouTest BFLA
How YouAnalyze Tokens
How YouAssess Properties
How YouTest Business Logic
How YouValidate ImpactInstead of saying:
I TestAPI Endpointsyou should be able to explain:
I first map the API'sendpoints, methods,objects and authenticationmodel.
I identify the relationshipbetween authenticatedidentities and applicationobjects.
I then build authorizationmatrices across users,roles, functions andproperties.
Using controlled accounts,I test whether server-sideauthorization remainsenforced when object IDs,roles, methods orproperties change.
Finally, I validate thebusiness impact anddocument reproducibleevidence.What’s Next?
Section titled “What’s Next?”➡️ Next: 04 — Mobile Security
You now understand how applications expose functionality through:
APIs
Objects
Tokens
Roles
Endpoints
Business WorkflowsThe next module extends this knowledge into:
Mobile ApplicationsYou will learn how Android and iOS applications interact with:
Application Packages
Local Storage
Configuration
Deep Links
Authentication
Tokens
WebViews
Mobile APIs
Backend ServicesYou will move from:
TestingWeb and APIInterfacesto:
Understandingthe Mobile Client
+
Testing theBackend ServicesThat Power Itusing:
Mobile Application ↓Application Package ↓Configuration ↓Local Data ↓Network Traffic ↓API ↓Authentication ↓Authorization ↓Business Logic➡️ Next: 04 — Mobile Security