The scanner flagged GraphQL introspection and batching. Which of them is a vulnerability? Confirming GraphQL findings from a DAST scan: introspection and field suggestions, alias and array batching against rate limits, query depth and cost, mutations over GET and CSRF, verbose errors, and the authorisation bug none of them points at

DedSec Security Research ·

Here is a hypothetical. A dynamic scan of a web application finds a GraphQL endpoint at /graphql and returns five results about it. The first, "GraphQL introspection enabled", is rated medium. The team disables introspection and closes it. The second, "GraphQL field suggestions", is informational. It is closed in the same ticket, because "introspection is off now, so there is nothing left to disclose". The third, "GraphQL alias-based batching", is informational too. It is closed because "login is rate limited at the gateway". The fourth, "GraphQL GET method supported", is rated low and closed because "GET is only used for queries". The fifth is a verbose SQL error message from the search field. It is fixed by masking resolver errors, and the retest comes back clean.

As in the earlier posts in this series, each decision rests on the title, not on what the scanner observed and what that observation can prove. In our lab, built to reproduce this scenario, each of the five went the other way. The schema that introspection exposed contained a mutation, setRole, that any logged-in user could call, and disabling introspection did not change that. With introspection off, the suggestion machinery still confirmed that setRole exists from the typo setRol. Ten HTTP requests under a ten-per-minute limiter carried a thousand password guesses between them, enough to cover our synthetic list. A link on another site changed the victim's email address through a GET request. And error masking hid the SQLite error while the injection behind it still returned 100 rows for one input and 0 for the other.

This post is for whoever is holding a GraphQL finding from a dynamic scan, or a clean result they are about to rely on. It covers:

It is the eighteenth post in a series about confirming DAST findings. The earlier ones cover reflected XSS, SQL injection, OS command injection, Nuclei template matches, ffuf content discovery, path traversal, open redirect, SSRF through URL-fetch parameters, XXE, CRLF header injection, Host header injection, HTTP request smuggling, CORS misconfiguration, JWT validation, Arjun parameter discovery, server-side template injection and CSRF. The nearest neighbours are the CSRF post, which measured the browser cookie behaviour this post relies on, and the post on why API scans miss BOLA and IDOR. In our lab the most serious defect was an authorisation bug, and no GraphQL configuration finding pointed at it.

Sources, and how each was checked. We made the measurements below on our test machine on 6 November 2026. It runs Ubuntu 24.04.4 on a virtual machine with two vCPUs of an AMD EPYC 9354P. Every server and the browser ran as a non-root user inside a Linux network namespace whose only interface was loopback. Before each run we checked the isolation: the name example.com did not resolve and a TCP connection to 1.1.1.1 failed. The software was:

Two bugs in the lab application are deliberate, built to show what configuration findings do not cover. The setRole mutation checks that the caller is logged in and not that the caller is an administrator. The search field builds its SQL by concatenating the argument into the query string. Both bugs are the same in every profile. They are lab constructs, not observations about any real application or library.

We read the OWASP GraphQL Cheat Sheet as published in the OWASP CheatSheetSeries repository, the October 2021 edition of the GraphQL specification at spec.graphql.org, and the current working draft of the GraphQL over HTTP specification from the graphql/graphql-over-http repository, all fetched on 6 November 2026. We read graphql-core's behaviour from its installed 3.3.1 source. Every quotation below was checked against those copies.

We did not run any Nuclei templates for this post. Where we describe what a template looks for, it is a reading of the template file in the nuclei-templates repository at commit 6f886171, dated 4 November 2026, and nothing more. We did not test any GraphQL server framework, such as Apollo Server, graphql-java, Hasura or Strawberry, or their defaults. We did not test debug modes that return stack traces, subscriptions or WebSockets, persisted queries, file uploads, query cost analysis libraries, or any browser other than the one named. The opening scenario is hypothetical. The numbers measure our lab and one engine version, and none of them measures AppSecD or how any product tests GraphQL.

What a GraphQL finding usually observes

A GraphQL endpoint is one URL that accepts a query language. Most of what a scanner reports about it is a property of the language or the server's configuration, not a flaw in the application:

Each of these is a precondition, not an impact. Introspection tells a client what exists. It does not let them use anything they could not already use. Aliases are how the language works. Whether any of it is a vulnerability depends on something the observation does not include: what the exposed fields allow without authorisation, what a rate limiter counts, what the server accepts over GET, what an error message carried, and how much work one request can cause.

Introspection: what it disclosed, and what disabling it changed

Against the default profile, the standard introspection query, the one graphql-core's get_introspection_query() produces and 1,479 bytes long, returned 26,454 bytes. That covered 17 types, eight of them the specification's own double-underscore types. It listed every query field (me, user, users, post, search) and every mutation with its arguments: login(username, password), updateEmail(email) and setRole(userId, role).

setRole is the deliberate bug. Alice, an ordinary user in the lab data, logged in and called setRole to set her own role to admin. The response confirmed the change. It was the same on the default, nointro and hardened profiles. Disabling introspection made setRole harder to find. It did not make it safe to call.

That is the useful way to read an introspection finding. The OWASP cheat sheet's view is that introspection lets a consumer "learn everything about your API, schemas, mutations, deprecated fields and sometimes unwanted 'private fields'" (the source uses double quotes around private fields), and that whether this matters depends on whether the API is meant for external clients. graphql-core's own NoSchemaIntrospectionCustomRule carries a note in its docstring that the rule "effectively disables introspection, which does not reflect best practices and should only be done if absolutely necessary." The two sources weigh it differently. They agree on the mechanism: introspection discloses the schema, and the risk is in what the schema contains that nobody meant to expose. The finding to look for is the next one: a field that does something without checking who is asking. The BOLA and IDOR post covers why a scan with one test account rarely finds that.

With NoSchemaIntrospectionCustomRule added, the same introspection query got an HTTP 200 with 5,996 bytes of errors, starting with "GraphQL introspection has been disabled, but the requested query contained the field '__schema'." On the hardened profile, the depth rule fired first: "Query depth 15 exceeds maximum 5."

Field suggestions with introspection off

On the nointro profile, introspection was off and suggestions were on, which is graphql-core's default. Each probe below was one request, and each answer came from the validation step, before any resolver ran:

The default profile gave the same answers. The OWASP cheat sheet describes exactly this: "even if introspection is disabled, attackers can still guess fields by brute forcing them", and the server returns a hint "when a field name that the requester provides is similar (but incorrect) to an existing field". It recommends turning suggestions off as well, while noting that "not all implementations of GraphQL support doing so". In graphql-core 3.3.1 it is the hide_suggestions argument.

How much one request can probe is set by the validator's error limit. graphql-core's validate() stops at max_errors, which defaults to 100. We sent one query with 150 misspelled field names. The response had 101 errors: 100 "Cannot query field ... Did you mean 'user'?" messages, then "Too many validation errors, error limit reached. Validation aborted." So in our lab one request mapped 100 unknown names at once, each answered with up to five suggestions. graphql-core caps the suggestion list at five (MAX_LENGTH = 5).

The hardened profile, with hide_suggestions set, gave the same 101 errors with no "Did you mean" in any of them. But two things were left.

So hiding suggestions removed the convenience, not the oracle. A wordlist against a schema with neither introspection nor suggestions can still confirm names it contains: in our lab both real names we probed, login and setRole, answered differently from made-up ones. graphql-core stops at 100 errors per request, and a real name can produce several errors (setRole produced three), so how many names fit in one request depends on the names. That is a reason not to rely on the schema being secret, not a reason to leave suggestions on.

Aliases and array batching: work per request

The point of these findings is amplification: one HTTP request causing many operations. The login mutation takes a username and password and returns ok. Because "There are no limitations on alias names", a single document can contain the login field many times, each alias a different password guess against one account. The server runs them, as the specification says a mutation's selection set "should be executed serially", and returns one ok per alias in one response.

We measured the amplification on the default profile against one account, with the matching password at position 738 of our synthetic 1,000-entry list.

Array batching does the same through a different door. Instead of one document with many aliases, the client sends a JSON array of separate operations. On the default profile, 100 operations of one login each ran 100 attempts in 391 ms, and 10 operations of 100 aliases each ran 1,000 attempts in 2,875 ms. Array batching is not in the GraphQL specification; it is the HTTP layer's choice to accept an array.

Now the rate limiter. The gateway-style limit allowed 10 POST requests per minute per client. We sent 12 requests, each carrying 100 aliased guesses. Ten returned 200 and two returned 429, and the ten that got through ran 1,000 login attempts between them. The limiter did exactly what it was configured to do, counting HTTP requests, and a thousand guesses still went through, because the guesses are inside the requests, not the requests themselves. The OWASP cheat sheet makes this the core of the batching problem: these attacks "will likely bypass existing rate limits in tools like Nginx or other proxies/gateways since they rely on looking at the raw number of requests", and "WAFs, RASPs, IDS/IPS, SIEMs, or other security tooling will likely not detect these attacks since they only appear to be one single request". So "login is rate limited at the gateway" in the opening scenario is not a reason to close the batching finding. It is the reason the finding matters.

On the hardened profile, the rule allowing one login field per document rejected the 10-alias and 100-alias documents at validation, with 0 attempts run, and the 1,000-alias document was refused at parse time: "Document contains more than 2000 tokens. Parsing aborted." Array batches were refused with 400. Separately, a per-username lockout was tested with single-guess requests: after five failed guesses for an account, the correct password on the sixth attempt was refused. We did not test the lockout against a batched request, because the hardened profile refused batches before it could act. The cheat sheet's own mitigations are "Add object request rate limiting in code", "Prevent batching for sensitive objects" and "Limit the number of queries that can run at one time". Each needs to count operations, not HTTP requests.

Depth, breadth and cost

A GraphQL schema with a cycle in it, here a user has posts, a post has an author, an author has posts, lets a query nest without bound. Each level multiplies the work.

On the default profile, with no depth limit, we sent queries nesting the users list into posts into author and back, over 20 users:

That is the denial-of-service shape the OWASP cheat sheet describes: "each query has a depth ... and each object requested in a query can have an amount specified ... By default these can both be unlimited which may lead to a DoS." A 165-byte request producing a 3 MB response and a quarter-million resolver calls is a large amplification from one small request.

The hardened profile's depth rule rejected queries of five object levels and above at validation (it counts depth differently, reporting "Query depth 6 exceeds maximum 5"), with 0 resolver calls. But a depth limit is not a cost limit. We sent 50 aliases of a query that was within the five-level limit. It passed validation and ran 47,050 resolver calls for 615,350 response bytes in 345 ms. Breadth under the depth ceiling costs as much as depth over it. This is why the cheat sheet lists amount limiting and query cost analysis as separate controls from depth limiting, and quotes Apollo's caution to confirm you need cost analysis before building it, by trying "to crash or slow down your staging API with a nasty query and see how far you get".

GET, CSRF and content types

A GET finding matters because of what the browser does with GET. A cross-site page cannot read a GraphQL JSON response, but it can cause the request, with the victim's cookies attached, which is cross-site request forgery. The CSRF post measured the cookie rules in the same browser; this is the GraphQL-specific part.

On the default profile, which executes any operation over GET, we logged Alice in (the session cookie was set with SameSite=Lax) and loaded a page on evil.test that followed a link to a GET updateEmail mutation on app.test. In Chrome for Testing 153, the navigation carried the Lax session cookie, Sec-Fetch-Site was cross-site, and the mutation ran: Alice's email was changed to an attacker-chosen value. That is the behaviour of a top-level GET navigation under a Lax cookie, as the CSRF post found. A cross-site image pointing at the same GET mutation did not carry the cookie, and a cross-site form posting text/plain did not either in this case, because the lab's Lax cookie is not sent on a cross-site POST. The GET path is what made it work.

The GraphQL over HTTP draft is direct about this: "GET requests MUST NOT be used for executing mutation operations. If the values of {query} and {operationName} indicate that a mutation operation is to be executed, the server MUST respond with an appropriate 4xx status code and halt execution; status code 405 (Method Not Allowed) is RECOMMENDED." On the hardened profile, the same cross-site link got 405 with Allow: POST, and the mutation did not run. A GET query (not a mutation) returned 200 on both profiles, which is allowed.

Content type is the other half. The same draft warns that alternative media types "may result in the request being treated by a browser as a 'simple request', which does not require a 'preflight', thereby opening the server up to Cross-Site Request Forgery (CSRF/XSRF) attacks. The recommended application/json media type requires a 'preflight' check when issued cross-domain." (The draft uses double quotes where we use single.) On the default profile, which parses any body as JSON, a POST with Content-Type text/plain whose body spelled a JSON document ran the mutation when we replayed it with a valid cookie. The draft's suggested defence is to force a preflight with a custom header such as GraphQL-Require-Preflight, noting it "is not a standard header". The hardened profile took the simpler route and refused any non-JSON body with 415, so the text/plain and form-encoded replays both failed.

Verbose errors

The fifth finding was a verbose error. The search field is the deliberate SQL injection: it concatenates its term argument into a SQL string. On the default profile, sending a single quote returned the SQLite message "unrecognized token: \"'\"" in the GraphQL errors array. That is a real information leak, and it is also a true positive for injection.

The scenario fixed it by masking errors. On the hardened profile, the same single quote returned "Internal server error (ref a6d27bbe)", and the real message was kept server-side. But the injection was untouched. A boolean payload that makes the WHERE clause always true returned all 100 matching posts; the always-false version returned 0. Both profiles behaved identically on that pair, because masking changed the error text, not the query building. The SQL injection post covers confirming injection by that true-versus-false difference rather than by an error string. Masking verbose errors is worth doing, the cheat sheet lists "Don't return excessive error messages", but it removes a symptom. A retest that only checks the error is gone will call a live injection fixed, which is the trap the scan-passed post describes.

What a scanner looks for, from the template source

We ran no Nuclei templates for this post. The following is a reading of the template files in the nuclei-templates repository at commit 6f886171, and nothing about what they would do against a live target. Reading a matcher tells you what a match would and would not prove, which is the point the Nuclei post makes in general.

From the template files alone:

Two general limits follow, and they are the same for any tool. The misconfiguration templates here request /graphql and /api/graphql; graphql-detect carries a longer path list. An endpoint on another path is not reached. And every one of these confirms a configuration or a feature. None sends two authenticated sessions, calls a named mutation without the right role, or counts how many operations one request ran. The authorisation bug and the amplification in our lab are not in the shape any of these templates look for.

Confirming a finding by hand

The procedure below is general practice. It needs authorisation to test the target and should use test accounts you control. A proof of concept should change something harmless on your own test account and nothing else.

  1. Get the schema. If introspection is on, run the introspection query and save it. If it is off, the schema is still reachable by guessing: feed a field wordlist and read the suggestions, or, where suggestions are off, read which guesses return a type-or-argument error rather than "Cannot query field". Note every mutation and its arguments.
  2. Test authorisation, not just configuration. For each state-changing mutation and each sensitive field, call it from a low-privilege test session and from a second account's session. The question is whether the server checks who is asking, not whether the field is documented. This is the BOLA/BFLA check the BOLA and IDOR post covers.
  3. Measure amplification. Send one request with several aliases of a cheap field and confirm it runs several times. Then do the arithmetic for a sensitive field against your own test account, and stop there. Try a JSON array of operations too. You are establishing that one request equals many operations, not running a real attack.
  4. Test the rate limit against operations, not requests. If there is a limiter, put many operations inside one request and see whether the limiter counts them. In our lab it counted requests and missed the operations inside them.
  5. Test depth and breadth. Send a query that nests through a cycle in the schema, increasing depth until it is refused or costs too much, on a test instance you are allowed to load. Then send aliases of a shallow-but-wide query to see whether a depth limit also bounds breadth. Watch server timing and response size.
  6. Test GET and content type for mutations. Try a mutation as a GET with the operation in the query string. If it runs, build a cross-site proof-of-concept link, load it in a browser where a test account is logged in, and check the effect, exactly as in the CSRF post. Try a POST with Content-Type text/plain whose body is your JSON operation.
  7. Read the errors. Send a malformed argument and a single quote to anything that looks like it reaches a data store, and confirm injection by the true-versus-false difference, not the error text, so masking does not hide it from you.
  8. Keep the evidence: the request, the response, the account used, the browser and version, and the operation count the server ran.

The fix

All of this is general practice, except where it says it was measured.

The static side

Some of these are visible in source and some are not. What static analysis can see well is a configuration flag: introspection left enabled, a suggestions option not set, a batching option on, a missing depth or cost plugin, a route that accepts GET for a GraphQL handler. Those are real, checkable facts about the code.

What it cannot see is the one that mattered most. A missing authorisation check is an absence, and an absence in a resolver looks like an ordinary function. A rule can flag a resolver that has no recognisable authorisation call, but it cannot tell a deliberate public field from a forgotten check without knowing intent, so it can be wrong in both directions. That is the same limit the SAST false-positive post describes: the pattern is matchable, the condition that makes it a bug is a fact about the application the rule does not hold. We did not run a static rule against the lab.

What source does not show at all:

A triage checklist for a DAST GraphQL finding

  1. Is the finding a configuration fact or an impact? Introspection, suggestions, batching and GET-support are facts. Ask what each enables here.
  2. What is in the schema that should not be callable without authorisation? Check every state-changing mutation and sensitive field from a low-privilege and a second-account session.
  3. Does disabling introspection actually hide the schema, given suggestions and the known-versus-unknown-name difference?
  4. Does one request amplify? Count operations per request through aliases and array batching, against a sensitive field.
  5. Does the rate limit count operations or HTTP requests? If requests, batching gets past it.
  6. Is there a per-account lockout or backoff that bounds guessing inside a single request?
  7. Are depth and cost both limited? A depth limit alone does not stop a wide query.
  8. Can a mutation run over GET, or with a non-JSON body? If so, build the cross-site proof in a named browser.
  9. Did masking an error fix the bug or hide it? Confirm the underlying issue by behaviour, not by the error string.
  10. For a clean result: did the scan have the schema, two accounts, and a way to reach every GraphQL path? The crawler-coverage post covers what a scan never reached.

The hypothetical findings, resolved

Back to the five hypothetical findings.

Introspection enabled. In the scenario, disabling it was treated as the fix. Introspection was reduced to a disclosure issue, correctly, but the schema it had exposed contained setRole, a mutation any logged-in user could call. The real fix in the scenario would be an authorisation check on the resolver, confirmed by calling it from a low-privilege test account before and after. We did not implement or test that fix in the lab.

Field suggestions. In the scenario, this was closed with introspection. Suggestions still revealed field and mutation names, and after suggestions were disabled the known-versus-unknown-name difference still confirmed them. It was reopened as defence in depth, not a fix, with a note that the schema cannot be assumed secret.

Alias-based batching. In the scenario, "rate limited at the gateway" closed it. A single request carrying many aliased login attempts ran all of them, and the gateway counted one request. It was fixed by limiting aliases of the login field and adding a per-account lockout, to be confirmed against a test account. In the lab, the hardened profile refused every batched form (alias limit, token limit, or 400 for arrays); its lockout was tested only with single-guess requests.

GET method supported. In the scenario, "GET is only for queries" closed it. A cross-site link ran an updateEmail mutation over GET with the victim's Lax session cookie in Chrome for Testing 153. The server was changed to refuse mutations over GET with 405, and the proof-of-concept link then failed.

Verbose SQL error. In the scenario, masking the error closed it. The injection behind the error still returned 100 rows for a true condition and 0 for a false one. The fix in the scenario is a parameterised query in the search resolver, confirmed by repeating the true-versus-false test, with masking kept as a separate hardening step. We did not implement that fix in the lab; the bug is the same in every profile.

Where AppSecD fits

AppSecD's dynamic and API testing runs Nuclei, Dalfox, SQLMap, Commix, Katana, Arjun, FFuf and Interactsh for out-of-band detection, plus 150+ native checks and API discovery across 50+ web frameworks. Its findings are deduplicated across scans, carry ageing and SLA, get assigned to an owner, and need maker-checker approval so a finding cannot be closed unilaterally.

That is the whole claim. data/products.ts is the single source of truth for what these products do. It names Nuclei, and it does not mention GraphQL, introspection, aliasing, query batching, query depth or field suggestions. So this post does not claim that AppSecD tests for GraphQL-specific issues. Nor does it claim anything about:

The measurements, the confirmation procedure, the fixes and the checklist above are general practice, not a description of how AppSecD works internally, and they apply to any scanner's output, ours included. The scenario in this post is hypothetical and does not describe any AppSecD deployment, user or finding.

More about AppSecD · All posts