Skip to main content
HighAPIOWASP A05:2021CWE-200

How to fix: GraphQL introspection exposes a mutation-heavy schema

The GraphQL introspection response doesn't just confirm introspection is enabled, it resolves a "Mutation" root type with five or more distinct mutation fields, meaning the entire write surface of the API, not only its read schema, is enumerable by any caller.

Why it matters

An attacker gets the exact name, arguments, and return type of every mutation, createUser, deleteAccount, grantRole, whatever exists, without probing or guessing field names first. A data-model leak becomes a ready-made target list of every write operation the API exposes, prioritizing which ones to attack first.

Builds on the base introspection-enabled check by requiring an actually resolved schema (a real "__schema" object, not just the introspection query text) and specifically locating the "Mutation" OBJECT type's own "fields" array. Field names are counted only at that array's top level, distinguishing genuine mutation field entries from the "name" keys that also appear on each field's nested argument and return-type objects, so the count reflects real mutations rather than incidental "name" occurrences.

How to fix it

  1. 1Disable introspection in production (Apollo: introspection: false, GraphQL.NET: ExposeMetadata = false)
  2. 2If internal tooling needs introspection, gate it behind authentication rather than leaving it open to any caller
  3. 3Review the full mutation list for operations that should never have been reachable without authorization (admin-only actions, destructive operations) and add field-level auth checks

Code examples

Apollo Server 4: disable introspection in production

JavaScript
import { ApolloServer } from '@apollo/server';

const server = new ApolloServer({
  typeDefs,
  resolvers,
  introspection: process.env.NODE_ENV !== 'production',
});

References

Detected automatically by VulnRadar. The check id is api-graphql-introspection-mutation-heavy, stable across every scan so you can filter or diff on it.

See every api check

Questions

How severe is GraphQL introspection exposes a mutation-heavy schema?
VulnRadar rates this high severity in the api category. The severity is fixed per check, not scored per site, so the same finding is the same severity on every scan.
Does VulnRadar check for this automatically?
Yes. It runs as part of every scan under the check id api-graphql-introspection-mutation-heavy, which stays the same between runs so you can filter, diff, or gate CI on it.
Which standards does GraphQL introspection exposes a mutation-heavy schema map to?
It maps to CWE-200. In the OWASP Top 10 it falls under A05:2021.

Missing a check?

The detection set is open. If you know a misconfiguration this does not catch, propose it: the issue template asks for the threat model, how to detect it, the false-positive risk, and a test fixture, which is the same thing a maintainer would have to work out anyway.

Propose a checkHow a check is built

Scan your own site for graphql introspection exposes a mutation-heavy schema

VulnRadar runs this check and hundreds more against a URL in seconds. No agent to install, just paste a URL.

Or scan this site as a demoRead the docs

GraphQL introspection exposes a mutation-heavy schema | VulnRadar