hunt-graphql
它能做什么
这项技能测试 GraphQL 端点的缺陷,例如对象访问失控、缺少范围限制的变更以及字段级数据泄露。它适用于对开放 GraphQL API 的应用进行的经授权测试。
适用场景
- ✓当应用暴露 /graphql 端点,你想检查其访问控制时。
- ✓当某个变更可能修改其他用户或其他团队的数据时。
- ✓当 GraphQL 查询返回了本应受限的私有字段时。
技能链接
https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-graphql/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我在经授权的测试中检查我们的 GraphQL API,看看一名用户能否读取或修改另一名用户的记录。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会梳理结构定义,并使用不同的用户账户测试查询和变更。它会比较每个账户能看到或修改的内容,并报告任何访问漏洞。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Crown Jewel Targets
GraphQL vulnerabilities are high-value because the attack surface is both broad and deep — a single endpoint can expose entire data models, privilege escalation paths, and cross-API state confusion. Highest payouts occur in:
- Platform APIs (GitHub, Shopify, Stripe-tier targets) where GraphQL mutations interact with REST APIs managing the same resources
- Race conditions between GraphQL mutations and REST endpoints where state synchronization is non-atomic — these hit medium-to-high severity reliably
- Authorization persistence bugs where team/org/repo membership state is controlled by one API but readable/writable by another
- B2B SaaS platforms where one tenant affecting another via schema traversal = critical
- Internal admin GraphQL endpoints accidentally exposed to lower-privilege users
The GitHub reports demonstrate the crown jewel pattern: privilege that should be revoked persists because two APIs disagree on ground truth.
Attack Surface Signals
URL Patterns:
/graphql
/api/graphql
/v1/graphql
/query
/gql
/graph
/api/v2/graphql
/internal/graphql
Response Headers:
Content-Type: application/json (with query body)
X-Request-Id + no REST-style path params = likely GraphQL
JavaScript Source Patterns:
// grep for these in JS bundles
"query {"
"mutation {"
"__typename"
"apollo"
"ApolloClient"
"graphql-tag"
"gql`"
"operationName"
"GRAPHQL_URI"
Tech Stack Signals:
- Apollo Server/Client in JS bundles
- Relay in React apps
grapheneorstrawberry(Python),graphql-ruby,gqlgen(Go),Lighthouse(Laravel)- POST requests with
{"query": "..."}body shape in Burp history __schemaor__typein any response = confirmed GraphQL
Recon Sources:
github.comsearch:"graphql" site:target.com- Wayback Machine for
/graphqlpaths - JS bundle scanning with
LinkFinderorgetallurls
Step-by-Step Hunting Methodology
Discover the endpoint — spider JS bundles, check
/graphql,/api/graphql, review Burp passive scan hits forapplication/jsonPOST with query fieldsTest introspection — send the full introspection query. Even if blocked, try field-level enumeration:
{ __typename }If that returns, introspection may be partially blocked but the schema is discoverable
Map the full schema — use
InQL(Burp extension) orgraphql-voyagerto visualize relationships. Specifically look for:- Mutations that modify ownership, permissions, or membership
- Mutations that mirror REST API functionality
Identify REST/GraphQL overlap — document every resource that can be modified via BOTH REST and GraphQL. These dual-write surfaces are your RC targets.
Test authorization boundaries per mutation — replay mutations as lower-privilege users. Does the server enforce the same authz as the equivalent REST call?
Hunt cross-API state desync — find sequences where:
- REST action should revoke access
- GraphQL mutation re-grants or preserves it
- Test the ordering: REST first → GraphQL → check state; then GraphQL first → REST → check state
Test for persistent privilege after role/membership changes — remove a user via REST, then call the corresponding GraphQL mutation for that resource. Query current state via both APIs and compare.
Probe for IDOR in node IDs — GraphQL global IDs often encode object type + ID. Swap IDs across object boundaries and across account contexts.
Check batch query abuse — send arrays of operations to bypass rate limiting or amplify enumeration.
Document the exact reproduction chain — for RC bugs, time-based steps must be reproducible deterministically.
Payload & Detection Patterns
Full Introspection Query:
{
__schema {
types {
name
fields {
name
type {
name
kind
}
}
}
}
}
Minimal Introspection Probe (bypass attempt):
{ __typename }
curl introspection test:
curl -s -X POST https://target.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{"query":"{ __schema { queryType { name } } }"}' | jq .
Field suggestion probe (bypass blind introspection blocks):
{ unknownField }
If response returns "Did you mean: [realFieldName]?" — schema is enumerable despite introsp
常见问题
什么是 IDOR?
指应用允许你通过修改对象 ID 访问该对象,而没有检查你是否拥有它。
它会测试批量请求或查询成本吗?
会。技能包括检查批量请求滥用和查询成本限制。
它涵盖跨租户数据吗?
涵盖。技能涵盖一个租户的数据可以被另一个租户访问的情况。
详情
作者的原始描述
Hunting skill for graphql vulnerabilities. Built from 12 public bug bounty reports across IDOR via node() / GID, mutation IDOR including AI/LLM features, cross-tenant IDOR, SSRF via argument, batching-DoS, query-cost-bypass, SQLi via argument, broken-object-level-authz, auth-bypass via unscoped mutations, and PII exposure from missing field-level authz. Use when hunting graphql on any target.
热度
- GitHub 星标
- 5.4k
- 排名
- #14910
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
apk-redteam-pipeline
5.4k帮你的智能体测试 Android 应用的安全弱点,从找到 APK 文件、反编译,到检查是否暴露了敏感信息。
bugcrowd-reporting
5.4k帮你的智能体撰写更好的 Bugcrowd 漏洞报告,选择正确的类别,并回应“超出范围”的异议。
cloud-iam-deep
5.4k帮你的智能体在经授权的安全测试中,检查找到的云凭据在 AWS、Azure 或 Google Cloud 上能访问哪些内容。
enterprise-vpn-attack
5.4k帮你的智能体在经授权的测试中,检查 Cisco、Fortinet、Citrix 等厂商 VPN 和远程访问设备是否存在已知弱点。