snailsploit/claude-red/offensive-graphql
Claude Code and agent skill by snailsploit/claude-red
- community
Checking that the SKILL.md file is still in the repository.
Offensive methodology for attacking GraphQL APIs during penetration tests and bug bounty engagements. Covers the full attack lifecycle: endpoint discovery, introspection abuse and blind schema reconstruction when introspection is disabled, authentication and authorization bypass through Relay node IDs and nested object traversal, injection via variables and directives, query batching for brute force and OTP bypass, denial of service through depth bombs and alias amplification, WebSocket subscription hijacking, information disclosure through verbose errors and field suggestion oracles, and file upload abuse via the multipart GraphQL specification. Includes tool-specific guidance for InQL, graphql-cop, CrackQL, BatchQL, Altair, GraphQL Voyager, and clairvoyance. Trigger on: GraphQL, graphql, introspection query, batching attack, query depth, GraphQL injection, GraphQL IDOR, field suggestion, GraphQL auth bypass, GraphQL DoS, GraphQL security, graphql-cop, InQL, CrackQL, BatchQL, Relay node, alias amplification, subscription abuse, multipart upload GraphQL, schema enumeration, __schema, __type.
Install
npx vskill@latest install snailsploit/claude-red/offensive-graphqlSKILL.md
The same SKILL.md was published earlier as snailsploit/claude-red/offensive-graphql.
Offensive GraphQL
GraphQL consolidates an entire API surface behind a single endpoint, making it a high-value target during web application assessments. Unlike REST, where each route maps to a discrete resource, a GraphQL schema exposes every type, field, mutation, and subscription in one queryable structure. Attackers who obtain or reconstruct that schema gain a complete map of the application's data model before writing a single exploit. This skill walks you through each phase of a GraphQL engagement with concrete queries, tool invocations, and chaining patterns.
Quick Workflow
- Discover the endpoint -- probe common paths, inspect client-side JS bundles, check WebSocket upgrade headers.
- Fingerprint the implementation -- use graphw00f to identify the engine and tailor payloads.
- Dump or reconstruct the schema -- full introspection query; if blocked, field suggestion probing or clairvoyance.
- Map the attack surface -- feed the schema into GraphQL Voyager or InQL.
- Test authentication and authorization -- every query and mutation with no token, low-privilege, and cross-user tokens.
- Inject through resolvers -- SQL, NoSQL, and OS command payloads through arguments and variables.
- Abuse batching -- arrayed operations for brute force, OTP bypass, and rate limit evasion.
- Stress depth and complexity -- nested queries, alias fans, and circular fragments.
- Probe subscriptions -- WebSocket with expired or missing tokens, subscribe to sensitive streams.
- Exfiltrate via errors -- verbose stack traces, type mismatches, field suggestions.
- Test file upload -- multipart GraphQL specification for oversized or malicious files.
- Chain and escalate -- combine findings into multi-step attack paths with proof-of-concept queries.
1 -- Endpoint Discovery and Fingerprinting
Probe common paths with a minimal query body. A __typename response confirms a live GraphQL endpoint.
Paths to probe: /graphql, /graphiql, /v1/graphql, /v2/graphql, /api/graphql, /graphql/console, /playground, /explorer, /query. Some servers accept GET requests:
Fingerprint the implementation to determine default behaviors (introspection state, error format, batching syntax):
Run graphql-cop for a one-pass configuration audit -- it reports introspection status, field suggestion leaks, GET-based query acceptance (CSRF risk), and unrestricted batching:
2 -- Introspection and Blind Schema Reconstruction
Full Introspection Dump
When introspection is enabled, pull the entire schema in one request. This is the single most valuable recon step.
Pipe the result into GraphQL Voyager for visual exploration, or load InQL in Burp Suite -- it parses the schema and generates individual queries for every field and mutation.
Targeted __type Queries
When an incomplete custom filter blocks __schema but permits __type, a targeted lookup may still work. Apollo Server's built-in introspection: false restriction blocks both:
Bypassing Disabled Introspection
Field suggestion oracle. Most engines return "Did you mean..." when you query a non-existent field. Submit plausible names and harvest suggestions:
Automate this with clairvoyance, which iterates a wordlist, collects suggestions, and assembles a reconstructed schema:
Apollo Sandbox. Sandbox obtains the schema by sending introspection queries to the server. It cannot bypass introspection: false; a visible landing page does not imply schema access. See Apollo Server's production behavior. When introspection is disabled, use field suggestions or exposed client-side query documents; access to a schema in Apollo Studio is a separate permission.
Client-side bundles. Search JS files for query strings, fragment definitions, and type names:
3 -- Authentication and Authorization Bypass
Authorization bugs are pervasive because developers must implement field-level checks manually in each resolver. A single missing check on a nested field can expose the entire object graph.
IDOR Through Relay Node IDs
Relay exposes a global node interface that resolves any object by an opaque base64-encoded ID (Type:numericID):
Forge IDs for other users and query through the node interface:
Enumerate sequentially:
Nested Object Authorization Gaps
Authorization enforced on the top-level query often does not carry to nested relationships. Access your own Order, then check whether the customer field traverses to another user's data:
The myOrders resolver filters by your ID, but the customer resolver on Order may eagerly load the associated user without ownership checks.
Relay Pagination and Cursor Manipulation
Decode opaque cursors (often base64 of an offset) and manipulate the value. If the cursor decodes to cursor:999, set it to cursor:0 to access records from the beginning:
Mutation Authorization
Test every state-changing mutation with no token, low-privilege tokens, and cross-tenant tokens:
4 -- Injection Through Resolvers
Variables and arguments flow directly into resolver functions. String concatenation in resolvers creates classic injection vectors.
SQL Injection via Variables
Escalate with UNION-based injection:
NoSQL Injection
For MongoDB-backed resolvers:
Time-based detection:
Directive Injection and Flooding
Directive flooding -- attaching thousands of @include(if: true) directives to a single field -- crashes parsers (CVE-2024-47614 in async-graphql):
Generate a payload with 10,000 directives programmatically. Custom @auth or @constraint directives may also accept arguments you can manipulate to override server-side behavior.
SSRF Through Resolver Arguments
If a mutation accepts a URL argument (webhooks, avatars, imports), test for SSRF:
5 -- Batching Attacks
GraphQL servers commonly accept arrays of operations in a single HTTP request. Back-end rate limiters often count HTTP requests, not individual operations within a batch, enabling powerful bypass attacks.
Credential Brute Force
A single HTTP request carries hundreds of login attempts. The rate limiter sees one request.
OTP / 2FA Bypass
Batch all possible 4-digit OTP values in chunks:
Alias-Based Batching
Some servers reject array batching but allow alias-based batching within a single query:
Automate with BatchQL and CrackQL:
6 -- Denial of Service
GraphQL's flexible query language is inherently susceptible to resource exhaustion unless the server enforces strict cost controls.
Depth Bomb
Exploit circular relationships. If User has friends returning [User], nest indefinitely -- eight levels deep on a user with 100 friends each triggers 100^8 resolver calls:
Alias Amplification
Request the same expensive field thousands of times using aliases. Each alias invokes the resolver independently:
Circular Fragment Spread
Older implementations may not detect circular references, causing infinite recursion:
Incremental Delivery Abuse
If the server supports @defer and @stream, attach them to expensive subtrees to hold connections open and multiply compute:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingSkills/web/offensive-graphql/SKILL.md
Popularity
- Repository stars
- 1,288
- Repository forks
- 221
- 7-day trend score
- 36
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 May 2026, 6 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/snailsploit/claude-red/offensive-graphql)