main logo icon

Published on

November 15, 2026

|

20 min read

GraphQL API Penetration Testing: Scope and Buyer Questions (2026)

A procurement guide to GraphQL API penetration testing scope, authorization across resolvers and fields, safe query-cost checks, and evidence to demand in a quote.

Arafat Afzalzada

Arafat Afzalzada

Founder

Web App Security

Summarize with AI

ChatGPTPerplexityGeminiGrokClaude

TL;DR

A useful GraphQL API penetration test follows the authorization decision through root operations, nested resolvers, objects and fields, then checks query resource controls under an agreed safe plan. OWASP advises authorization on both graph edges and nodes. Give bidders the deployed schema, endpoint and operation inventory, controlled roles and tenants, representative objects, query limits and an evidence plan. Compare the same scope and exclusions before comparing quotes.

A GraphQL endpoint can expose many operations and relationships behind one URL, so testing the URL alone says little about authorization coverage. The OWASP GraphQL Cheat Sheet calls for access checks on graph edges and nodes, as well as controls for expensive queries. An enterprise buyer needs a statement of work that names the schema, deployed operations, roles, tenants, nested resolver paths and safe resource checks the provider will actually assess.

Quick answer. A GraphQL API penetration test should test who can execute each important query or mutation, which objects and fields each role can reach through nested resolvers, and whether query depth, batching and cost controls hold under a bounded test. Provide the deployed schema, controlled accounts and synthetic data, then require request-level evidence and remediation guidance. Stingrai's API penetration testing service explicitly covers GraphQL, including nested resolvers, field exposure and query resource controls.

This is a buyer's scope and quote-comparison guide. For explanations of individual vulnerability classes, see the existing GraphQL vulnerability reference. Here the question is what the provider must be authorized and equipped to test, what a comparable proposal should say, and what evidence proves the work was done. It is especially relevant when a GraphQL layer combines data from several teams or tenants and the buyer needs a report that developers can use rather than a list of generic GraphQL risks.

Why a generic API quote is hard to compare

A conventional endpoint inventory often counts URLs and methods. In GraphQL, one endpoint may process many root fields, mutations and nested selections. A quote that says “one API endpoint” can therefore mean a very narrow HTTP configuration review or a substantial assessment of the application graph. The GraphQL specification defines the language and execution model, but the business permissions are specific to the application. The provider must discover or receive those permissions from the buyer before it can decide whether a response is a finding.

Ask each bidder what unit of work they are estimating. Useful units include deployed schemas, root operations, sensitive types, high-risk field families, tenant boundaries, authenticated role combinations and external data sources. Avoid treating a raw field count as the whole answer. A tiny administrative mutation may be more important than dozens of harmless display fields. A resolver that reaches a billing or identity service may require special permission and a controlled fixture even when it appears as one nested field in the schema.

The buyer should also distinguish coverage from depth. Discovery can enumerate a large schema. In-depth authorization work needs test accounts, representative objects, expected decisions and time to inspect the outcome. A vendor may enumerate all roots and then select higher-risk branches for manual testing. That can be a sensible plan if the selection rule and exclusions are explicit. It is not the same as saying every combination of role, object, field and argument was exercised.

Make the quote describe the deployed API, not a hypothetical schema. Include endpoint hostnames, environments, supported schema versions, persisted-operation catalogs, subscriptions if enabled and any administrative endpoint. If the application has separate public and internal graphs, say whether both are in scope. The provider should state what it will do when the introspected schema differs from the schema repository or when a deployed operation is absent from documentation. Stingrai's API service starts scoping with GraphQL schemas and identifies undocumented or older API surfaces during testing.

Give the provider a schema and an authorization contract

The schema is the map of what a client can ask for, but it rarely states who is allowed to see each value. Supply the schema definition or approved introspection output, the GraphQL endpoint list, a list of enabled operations, and the policy information needed to interpret results. Include a summary of which operations are public, customer-facing, partner-facing, administrative or service-only. If schema access must be limited, grant it through the approved test environment and access process; the report need not reproduce the full schema.

For each sensitive type, document the role and tenant decisions. An ordinary user might view their own account summary, an account manager might view a delegated portfolio, and an administrator might change a setting. Those are illustrative roles, not implied permissions for any real product. The critical buyer contribution is the expected result for an owner, a peer in the same tenant, a user in another tenant and a role without the function. A provider can test against that contract instead of guessing whether an unexpectedly successful query is intended.

Provide synthetic records with known ownership and field values. Testers need a way to tell whether a response belongs to the wrong tenant or contains a restricted field without reading real customer data. The fixture should include at least one allowed and one forbidden object for each priority path. If a mutation changes state, agree on a reversible test record and a method for checking the final state. A response that appears denied is not conclusive if a background action still completes.

Inventory where authorization is supposed to run. Some decisions live at the root query or mutation; others live in a nested resolver, a data-access service or a policy layer. OWASP specifically advises checks on both edges and nodes. In procurement terms, this means the bidder must explain whether it will follow a sensitive object through more than one route through the graph. A root that blocks a direct lookup does not prove that a different parent relationship blocks the same object.

Prioritize roots, objects, fields and mutations separately

Root operations answer which entry points a role can invoke. Object checks answer whether the role can reach a particular record. Field checks answer whether a property within an otherwise allowed record is exposed. Mutation checks answer whether the role can change a specific state or property. OWASP API1:2023, API3:2023 and API5:2023 describe those distinct authorization failures. A single “authentication test” does not substitute for them.

Build a priority list with the application owner. Customer records, billing data, roles and permissions, exports, account recovery, invitations and administrative settings are common candidates, but the organization's actual data flows govern. Mark every selected operation with an expected caller and object relationship. Include direct and nested access paths. For example, a customer record might be reachable through a top-level lookup and through an organization's list. The test should compare results under the same identity and policy, then trace the denial or disclosure to the responsible resolver.

For fields, distinguish read from write. A caller may view a profile but not see an internal risk flag. A manager may update contact details but not assign an elevated role. The provider should inspect input object fields and output selections for the priority types. The test must record whether the denied field is omitted, null, rejected or mistakenly returned, because remediation depends on the implementation. This is more precise than reporting that “GraphQL has excessive data exposure” without a role, object and field.

Mutations deserve their own scope line. Ask for ordinary, privileged and service-only mutations, and provide records whose state can be safely restored. The provider should verify server-side authorization for each selected function and check the state after the response. It should also establish whether nested mutations or bulk operations change more records than the buyer expects. The report should tie a finding to the operation and policy rule, not assume that the presence of a mutation in a schema makes it public.

Test nested resolvers as business decisions

Nested resolvers are where a GraphQL quote can become materially different from a generic API test. The tester should follow selected paths from a permitted parent to a child that has its own permission rule. A customer may have access to a project but not to all employee details attached to it. A finance role may see an invoice summary but not the payment instrument. In each case the graph path, the caller and the object relationship matter more than the fact that the HTTP request succeeded.

Ask how the provider chooses paths. A sound answer combines business sensitivity, cross-tenant edges, ownership transitions, role transitions and implementation hints from the schema or source. Source-assisted review can identify a resolver that bypasses a shared authorization helper. Grey-box testing can compare the observed response across accounts. Black-box discovery can reveal an undocumented path. Each mode contributes different evidence; the quote should say which access is available and which conclusions remain limited when it is not.

Resolver coverage also requires looking at interfaces, unions and connections where the same underlying type can appear through different parent fields. The OWASP GraphQL guidance notes that access control can be implemented at resolvers and that the server must check the requester's access to objects and fields. The buyer need not prescribe a coding pattern. It should ask whether the provider will try equivalent authorized and forbidden paths and identify the layer that made the decision.

Some GraphQL servers aggregate other APIs. If a resolver retrieves data from a separate internal service or third-party system, the statement of work should identify that boundary. The GraphQL assessment can test the visible application behavior and, with permission, inspect the corresponding service decision. It should not silently expand into a network or cloud infrastructure test. An upstream service owner may need to supply a sandbox, synthetic objects or log evidence so the provider can determine whether an unexpected response came from the graph layer or the downstream system.

Agree on query complexity and availability safety

OWASP's GraphQL Cheat Sheet recommends controls such as depth limits, pagination, timeouts, cost analysis, rate limiting and batching limits. OWASP API4:2023 addresses requests that consume excessive resources. A buyer should include these controls in a GraphQL assessment, but a live production test needs an explicit safety envelope. The objective is to validate intended controls, not to make the service unavailable.

Ask the engineering owner for configured depth and complexity thresholds, pagination defaults and maximum page size, operation or alias limits, server timeouts, rate-limit policy, and any separate protection for expensive fields. The provider can compare configuration with bounded functional requests. If the buyer wants performance or denial-of-service testing, scope that as a separate controlled exercise with a maintenance window, monitoring, stop conditions and infrastructure owners present. A standard application pentest can report that an unbounded path exists without demonstrating an outage.

HTTP request counts can be misleading in GraphQL. OWASP notes that one request may carry expensive work or multiple operations. A quote should therefore say how the provider will assess depth, breadth, aliases, batching and variable-driven fanout under safe limits. The provider should not promise to “prove no DoS is possible.” Instead, require evidence of the policy checked, the test bound, the observed rejection or acceptance and the point at which testing stopped. That makes the result actionable and avoids mistaking absence of an outage for assurance.

Talk through subscriptions and long-lived connections if they are part of the product. Ask whether an authorization change, token expiry or account disablement should affect an existing subscription and whether the provider will test that behavior. Persisted queries and allowlists also deserve a scope line: identify whether the client is allowed to submit arbitrary documents or only registered operations. These features change how testers discover the attack surface and what a safe test can observe. Exclude them explicitly if they do not exist.

Compare the same buyer inputs and expected evidence

The following matrix is an original procurement tool based on the OWASP GraphQL Cheat Sheet and the API Security Top 10 categories. It makes bidder assumptions visible. Replace examples with the real application contract; do not send production records or secrets to a provider merely to fill a worksheet.

GraphQL penetration testing evidence matrix

Figure 1: GraphQL coverage, buyer-provided fixtures and expected evidence. Source: OWASP, GraphQL Cheat Sheet.

Scope decision

Buyer supplies

Provider should return

Deployed graph

Endpoint, schema, versions, persisted operations

Tested inventory and explicit exclusions

Role and tenant access

Controlled identities and expected policy

Allowed and denied cases tied to identities

Objects and fields

Synthetic owned and forbidden records

Resolver path, object, field and observed decision

Mutations

Reversible test records and state expectations

Before and after state with authorization conclusion

Query resources

Limits, monitoring owner and stop rules

Bounded requests, policy outcome and test boundary

Remediation

Engineering owner and retest route

Reproducible finding and verified retest result

Use the matrix to normalize proposals. If one bidder includes cross-tenant fixtures and another assumes a single user account, the prices are not for the same work. If one includes schema-assisted source review and another tests only public introspection, the expected conclusion is different. Ask each provider to mark included, excluded or dependent on buyer access for each row. This can reveal gaps before contracting, when adding scope is easier than asking for it after a report arrives.

The evidence column also helps procurement distinguish activity from assurance. An operation list shows discovery. An allowed and denied pair shows an authorization decision. A reproducible finding identifies the affected role, tenant, operation, resolver path and field, with a safe proof of impact. A retest shows the behavior after remediation. Each artifact serves a different reviewer: engineers need a fix location, security needs risk and coverage, and an audit owner needs a record of authorized assessment and closure.

Specify test mode, environment and permissions

Black-box testing shows what an unauthenticated or minimally privileged caller can observe. It can find exposed operations and misconfigurations, but it cannot reliably prove every cross-role decision. Grey-box testing with accounts for the relevant roles and tenants is necessary for meaningful authorization coverage. White-box access to schema definitions, resolvers, authorization middleware and deployment configuration can speed root-cause analysis. The quote should state which modes are included, which artifacts the buyer will provide and what will remain untested if an artifact is unavailable.

Production offers realism, yet some checks should occur in a representative staging environment with synthetic data. Select the environment by the question: if the concern is deployed policy drift, production configuration matters; if the concern is mutation side effects or resource limits, a controlled environment may be safer. State the allowed hostnames, test source addresses if required, permitted hours, prohibited actions, alerting contacts and escalation path. These are part of the assessment agreement, not incidental delivery details.

GraphQL may sit behind a gateway or web application. Clarify whether the provider may test the API directly, whether browser sessions and anti-automation controls apply, and whether cross-origin behavior is in scope. A browser-only test can miss direct API access paths. A direct API test without the web workflow can miss how the application constructs and authorizes business actions. The two views are complementary; the proposal should allocate time to each when both matter.

Third-party data sources require separate permission. A GraphQL resolver that calls a partner API may reveal an authorization problem in the application, but the tester should not probe the partner's system without authorization. Give the provider synthetic partner records or a mock where practical. If a downstream boundary cannot be exercised, record it as a limitation rather than silently claiming it was tested.

Ask what the report will prove

A strong finding identifies the schema operation, argument or field, caller identity and tenant, expected policy, observed response, effect on state and the responsible authorization point. Redact tokens and real data. Include enough request context for engineering to reproduce the issue with a synthetic fixture, and enough control evidence for the security team to understand impact. A screenshot of one successful query is weak evidence unless it shows why that user should not have seen the object or field.

Request coverage reporting even when no finding is confirmed. The report should list the schema version or deployed build, tested operation families, roles and tenants, key resolver paths, safe resource-control checks, excluded branches and blocked cases. “No critical findings” does not tell a buyer which branches were exercised. Coverage is especially important for large graphs, where risk-based selection is necessary. A provider can state its selection rationale without claiming complete combinatorial coverage.

Retesting should exercise the same authorization and resource decisions after the fix. For a field leak, verify the denied role no longer receives the field while an authorized role still does. For a mutation, verify the forbidden state change does not occur. For a complexity issue, verify the agreed bound is enforced without breaking intended legitimate operations. Keep the original fixture and expected outcome in the issue so that the closure record is comparable.

Ask who reviews the result. A lead tester should be able to discuss whether the issue is at a root resolver, nested resolver, shared data loader or downstream service. Procurement may require named testers, reporting format, evidence handling and a retest window. The buyer should also define whether findings need mapping to the organization's own control vocabulary. OWASP API categories are useful labels, but the business impact and affected data flow still need plain explanation.

Where Stingrai fits

Stingrai is a CREST-accredited penetration testing company headquartered in Toronto. Its API penetration testing service covers GraphQL alongside REST, gRPC and SOAP, with direct API testing across roles and tenants. The service page names introspection and field suggestion exposure, authorization on queries, mutations and nested resolvers, and query depth, aliasing and batching. For buyers, the valuable next step is to provide the deployed graph, policy owners and synthetic fixtures so the quote identifies the actual paths and evidence required.

Stingrai offers human-led engagements and a hybrid web application option. In a hybrid engagement, Snipe and named penetration testers test together throughout; Snipe maps and probes the web application and associated APIs while the testers direct the work, validate findings and follow business-logic paths. The package scope is one web application and associated APIs. A larger graph, multiple applications, separate internal services or broader infrastructure needs a specific quote and written scope. Snipe is for web applications and associated APIs, not network or cloud assessment.

For regulated or enterprise procurement, ask for the named testers, test mode, authorized environments, finding evidence, retest terms and how the report supports the organization's compliance program. Stingrai's human-led and hybrid testing can produce evidence for an audit. A GraphQL report remains useful beyond audit season when the engineering team can map each finding to a resolver or service owner and verify the fix. The buyer should choose one-time or annual testing, or a continuous program, according to release cadence and the need to retest significant schema changes.

Questions to put in the RFP

  • Which deployed GraphQL endpoints, schemas, versions, operation catalogs and environments are included?

  • How will the team prioritize sensitive roots, nested resolver paths, object relationships and fields?

  • Which role and tenant identities must we provide, and which expected authorization decisions must we document?

  • Will the team test direct and nested paths to the same object and explain any inconsistent decision?

  • Which mutations are safe to exercise, and how will the team verify that a denied action did not change state?

  • What bounded checks cover depth, pagination, aliases, batching, query cost and rate limits?

  • Are subscriptions, persisted queries, federation or downstream services included, excluded or conditional?

  • What report artifacts will show scope, test limits, reproducible findings, ownership and retest results?

The response should be written into the scope, not left as a sales-call assurance. It should identify buyer dependencies as well. A vendor cannot deliver cross-tenant evidence if the buyer supplies only one account or forbids testing the relevant environment. Conversely, a provider should not quietly exclude the highest-risk fields because they need coordination with another team. A short preparation meeting with the application and identity owners often resolves these dependencies before the assessment starts.

Frequently Asked Questions

What should a GraphQL API penetration test include?

A GraphQL API penetration test should cover the deployed schema and operations, authorization across roles and tenants, object and field access through direct and nested resolvers, privileged mutations, and bounded query resource checks. The statement of work should name the environment, fixtures, exclusions and evidence expected. The OWASP GraphQL Cheat Sheet is a useful technical reference for access control and query limiting.

Is a GraphQL endpoint count enough to price a penetration test?

No. One endpoint can expose many operations, fields and resolver paths. Ask bidders to estimate against deployed schemas, sensitive operation families, roles, tenants, business decisions and test mode. Require each proposal to say what it will enumerate, what it will test deeply and what access the buyer must provide. Compare quotes only after those assumptions match.

Does a web application penetration test automatically cover GraphQL?

It depends on the written scope. A browser workflow may exercise some GraphQL calls while leaving direct operations, alternate roles, nested paths and resource controls untouched. Name the GraphQL endpoint and the intended API coverage in the statement of work. For Stingrai's hybrid package, the defined scope is one web application and associated APIs; larger or separate systems need a specific quote.

Why test nested resolvers and fields if the root query is protected?

The same object can be reachable through another parent relationship, and a permitted object can contain a field that the caller must not see. OWASP advises authorization checks on both graph edges and nodes. The tester should compare allowed and denied identities across selected paths and identify the layer that makes the decision, using synthetic records to avoid exposing customer data.

Can query complexity be tested safely in production?

Yes, if the scope defines bounded functional checks, monitoring, stop conditions and prohibited actions. The provider can review configured depth, cost, pagination and rate policies, then test agreed low-impact cases. A denial-of-service or load exercise requires a separate authorization and operating plan. An ordinary application pentest should report unbounded behavior without causing an outage to prove impact.

Which accounts and data should the buyer provide?

Provide controlled identities for each priority role and tenant, synthetic owned and forbidden records, and expected authorization decisions. Include reversible records for mutation tests. Give the provider schema and configuration access only through the agreed process. Test evidence should redact credentials and real customer records while preserving enough context for engineering to reproduce the issue.

What does good GraphQL penetration test evidence look like?

It identifies the operation and resolver path, caller role and tenant, object or field, expected policy, observed result, and any state change. Coverage reporting should also list the deployed version, tested branches and exclusions. A retest should repeat the same decision after remediation. This is more useful than a scanner alert or a screenshot without an expected policy.

When should a GraphQL API be retested?

Retest confirmed findings after remediation, then reassess material changes to authorization policy, schema, resolvers, identity flow or query resource controls. The timing depends on the release process and risk. One-time or annual assessments can serve a stable release; a continuous program can support a frequently changing graph. The buyer should agree on the trigger and evidence needed before signing.

References

Talk to Stingrai

Share your GraphQL schema, roles, tenants and intended evidence with Stingrai to scope a human-led or hybrid API penetration test. Get a Quote or book a free discovery call.

0 views

0

X

Related reading

Annual Penetration Testing for Enterprise Teams: Calendar, Scope and Evidence (2026)
Network SecurityWeb App Security

Annual Penetration Testing for Enterprise Teams: Calendar, Scope and Evidence (2026)

Build an annual penetration testing calendar for apps, APIs, cloud and networks, with scope, procurement, retesting and evidence criteria for enterprises.

19 min read

API Gateway Security Assessment: Backend Authorization Scope (2026)
Web App Security

API Gateway Security Assessment: Backend Authorization Scope (2026)

Scope an API gateway security assessment across routes, tokens, backend reachability and authorization. Compare vendor evidence before buying.

17 min read

Application Security Testing Services for Enterprise Buyers: Scope and Evidence (2026)
Web App Security

Application Security Testing Services for Enterprise Buyers: Scope and Evidence (2026)

Compare application security testing services, define manual and automated coverage, and write acceptance criteria for enterprise app portfolios.

18 min read

Contents

X