TL;DR: Apollo Federation can expose _service, _entities and tracing details even when standard introspection is disabled, according to RunSybil’s penetration test analysis of GraphQL deployments, because federation helpers can become externally reachable if subgraphs are mispositioned. Internal trust boundaries, not schema visibility alone, become the control point that determines whether a router is actually a security boundary.
At a glance
What this is: NHI Mgmt Group's analysis, drawing on RunSybil's blog post: Apollo Federation helper fields can expose schema and entity data even when standard GraphQL introspection is disabled.
Why it matters: Security teams that rely on introspection controls alone can miss federation-specific exposure, so GraphQL routing, network placement, and query governance need to be reviewed together.
Context
GraphQL security depends on more than hiding schema introspection. In federation architectures, internal helper fields can expose schema structure and entity lookup behaviour if subgraphs are reachable outside the intended trust boundary.
That creates an identity and access problem as much as an application-security one: the router is meant to mediate authority, but exposed subgraphs can bypass that design and answer queries directly. GraphQL security controls become relevant when federation features double as discovery paths.
This deployment pattern is not unusual in composable systems, which is why hidden helper mechanisms deserve as much attention as visible endpoints.
Key questions
Q: How do I stop GraphQL federation from exposing subgraph helpers?
A: Keep subgraphs behind the router, block direct network reachability, and treat helper fields such as _service and _entities as exposure risks rather than harmless implementation details. Where federation must remain available, combine router mediation with allowlisting and mTLS so only trusted service paths can invoke those mechanisms.
Q: Why do federation helper fields create security risk?
A: Federation helper fields can expose schema structure, entity keys, and service boundaries that make target selection easier for attackers. If left open, they can also reveal how subgraphs are composed, which types are linked, and which fields may exist even when normal application routes hide them. Restrict them with gateway controls, schema allowlisting, and authentication or network segmentation where appropriate.
Q: What is the difference between GraphQL introspection and federation metadata?
A: GraphQL introspection returns the schema so clients can discover types, fields, and directives, while federation metadata is used for composing and resolving a federated graph across subgraphs. Introspection is a general schema discovery feature, but federation metadata usually exposes service-specific composition details, such as entity resolution and subgraph wiring. Both can aid testing, but both should be limited on exposed services.
Q: What should teams do first when a subgraph is publicly reachable?
A: Teams should first deny anonymous access to the subgraph, then restrict schema and federation endpoints with gateway or network controls. If public reachability is unavoidable, enforce persisted-query enforcement, disable unnecessary schema discovery, and require tight allowlists for operations and originating clients. That reduces exposure of federation helper fields, entity lookups, and internal resolver details.
Technical breakdown
Why _service becomes an alternate schema enumeration path
Apollo Federation adds a _service field to each subgraph so the router and tooling can retrieve the subgraph’s SDL, or schema definition language. That is operationally useful, but it also creates a second disclosure mechanism separate from standard GraphQL introspection. Disabling __schema does not disable _service, so defenders can falsely assume enumeration is closed when federation has simply moved it to another path. In practice, this means the security control must be scoped to the federation layer, not only to core GraphQL behaviour. See the GraphQL Security Guide.
Practical implication: Treat federation helper fields as a separate exposure surface and verify that schema retrieval is blocked from any direct client path.
How _entities can be abused when subgraphs are reachable
The _entities field is meant for the router to resolve federated objects across services using entity keys. If a subgraph is directly accessible, an attacker can query that field without the router’s mediation and use it to infer or retrieve data about the broader graph. The issue is not that _entities exists, but that deployment assumptions collapse when a supposedly internal service is reachable like a public one. That turns inter-service resolution into an enumeration and access channel.
Practical implication: Restrict direct access to subgraphs so entity resolution remains router-mediated and cannot be invoked as a public lookup mechanism.
Why tracing extensions can reveal more than teams expect
Federation implementations may emit tracing and extension metadata that includes service names, execution timing, and internal implementation details. On its own, that metadata can seem harmless, but in a live attack surface it helps a recon workflow by confirming architecture, naming internal components, and shaping follow-on queries. This is a common pattern in modern distributed systems: operational metadata intended for observability becomes reconnaissance fuel when exposed across a weak boundary. See the OSINT and Reconnaissance Guide.
Practical implication: Minimise externally reachable metadata and validate that trace output stays inside the router-to-subgraph trust relationship.
NHI Mgmt Group analysis
Federation helper fields are a trust-boundary problem, not a GraphQL oddity. The real failure mode is assuming that a feature designed for internal orchestration stays safe when the network layout changes. Once subgraphs are reachable, helper fields can become discovery interfaces, and the router stops functioning as the effective boundary. Practitioners should treat federation exposure as a governance issue for internal and external reachability, not a schema-only concern.
GraphQL introspection controls do not cover federation-specific disclosure. Teams that only block __schema can still leak operational detail through federation mechanisms that live outside standard introspection. That matters because security validation often checks the wrong control and declares success too early. The control objective is to ensure that federation helpers never become public lookup paths, especially where distributed graphs span multiple teams and services.
Exposed subgraphs create a delegated-authority problem for API security. The router is supposed to concentrate authority, but a reachable subgraph can answer questions that should have been mediated centrally. That is why federation security belongs alongside API access control and service-to-service trust, not just in developer documentation. The practical test is simple: if a client can talk to a subgraph directly, the design has already lost part of its boundary.
Composable architectures are creating an internal-by-design exposure gap. As systems become more modular, more operational mechanisms are being shipped into the runtime path that attackers can reach if segmentation slips. That pattern now shows up in GraphQL, service meshes, orchestration layers, and gateways. The named concept here is internal-mechanism exposure: functionality intended for trusted components that becomes risky the moment the trust boundary is not enforced in deployment.
GraphQL federation security should be measured at deployment time, not only at design time. A secure architecture on paper can still be exposed in practice if router-only assumptions are not enforced with network controls and query governance. The lesson for practitioners is to validate where authority actually sits in the live environment, then close every path that lets a subgraph behave like a public endpoint.
What this signals
Internal-mechanism exposure: federation, service mesh, and gateway features increasingly blur the line between runtime plumbing and attack surface. Security programmes should assume that any helper path built for orchestration can become a discovery path if it is not constrained at the network and application layers.
The operational signal is straightforward: teams that validate only the main API route will keep missing the hidden paths that distributed systems create. That pushes API governance toward environment-level checks, not just schema review or developer policy.
Where GraphQL is part of a wider platform strategy, the right response is to test trust boundaries before attackers do. If a subgraph can be reached directly, the architecture is already exposing more authority than it intends.
For practitioners
- Enforce router-only exposure for subgraphs Place every subgraph behind the router and verify that no direct client route exists, including from internal networks that are not part of the routing trust path.
- Lock down network paths to federation services Use IP allowlisting and mutual TLS so only the router can reach subgraphs, and test that a direct request cannot bypass the mediation layer.
- Restrict federation helper fields at the subgraph Filter _service and _entities at the application layer when business constraints force subgraph exposure, and confirm that those filters do not break expected router traffic.
- Adopt persisted queries for approved operations Allow only pre-approved query hashes where feasible so ad hoc discovery and unexpected GraphQL operations cannot be executed against the graph.
Key takeaways
- Apollo Federation can leak schema and entity information even when standard GraphQL introspection is disabled, because federation introduces separate helper mechanisms.
- The exposure only becomes dangerous when subgraphs are reachable outside the router, which turns internal orchestration features into public discovery paths.
- Practitioners should enforce router-only access, network segmentation, and query allowlisting so federation helpers cannot be abused as an attack surface.
Related NHI Mgmt Group resources: GraphQL Security Guide · REST vs GraphQL Security · Attack Surface Management Guide · Attack Surface Management Maturity Model
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP API Security Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP API Security Top 10 | API9 — Improper Inventory Management | Apollo federation exposure often comes from undocumented or overlooked API surfaces inside the graph. |
| API8 — Security Misconfiguration | Directly reachable subgraphs and helper-field exposure are deployment misconfigurations, not protocol flaws. | |
| Recommendation — Inventory federation endpoints, helper fields, and direct subgraph paths so hidden API surfaces cannot escape review. Harden GraphQL deployments so subgraphs are not publicly reachable and federation helpers remain internal. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | The router boundary determines which components are authorised to reach subgraphs and helper functions. |
| Recommendation — Constrain service-to-service access so only the router can invoke federation functions and entity resolution paths. | ||
| CIS Controls v8 | CIS-5 — Account Management | Federated subgraphs behave like privileged service identities that must not be exposed directly. |
| Recommendation — Review and restrict service account paths that allow direct access to federation subgraphs. | ||
| MITRE ATT&CK | TA0007;TA0009 — Discovery; Collection | Exposed helper fields support schema discovery and metadata collection before deeper abuse. |
| Recommendation — Map exposed federation metadata to discovery and collection techniques when building detections and tests. | ||
Key terms
- Apollo Federation: Apollo Federation is a distributed GraphQL architecture that splits a graph into subgraphs and coordinates them through a router or gateway. It improves service composition, but it also introduces helper mechanisms that must be protected as part of the attack surface.
- _service Field: The _service field is a GraphQL federation field that returns the subgraph’s service definition, usually including its schema and composition-related metadata. Practitioners use it to support federation tooling, but if exposed publicly it can reveal internal schema details that help map the API surface and subgraph structure.
- _entities Field: The _entities field is a GraphQL federation field used to resolve entity representations into full objects across subgraphs. It lets the gateway or clients fetch federated entities by key, so exposing it without controls can reveal entity shapes, key fields, and resolver behaviour.
- GraphQL Introspection: A built-in GraphQL capability that lets clients query the schema itself to discover types, fields, and operations. It is helpful for development and testing, but in production it can expose the structure attackers need to map sensitive data and target high-value operations.
Deepen your knowledge
NHI Mgmt Group covers identity security, NHI governance, and agentic AI through independent research, practitioner guides, and the NHI Foundation Level course. Explore nhimg.org for resources that connect identity governance to the broader security disciplines your programme depends on.
Published by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org