CVE-2026-59356
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring for GraphQL provides GraphQL support for Spring applications built on GraphQL Java, including annotated controllers, transports for HTTP, WebSocket and RSocket, and support for Apollo Federation subgraphs.
An information exposure vulnerability (CVE-2026-59356) has been identified in the Apollo Federation support of Spring for GraphQL, which allows attackers to obtain the full message of exceptions raised while resolving federated entities. When an application does not handle such an exception through an @EntityMapping method or a GraphQlExceptionHandler method, the exception message is returned to the client in the GraphQL error response and can disclose internal details of the application.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
This issue affects multiple versions of Spring for GraphQL.
Details
Module Info
- Product: Spring for GraphQL
- Affected packages:
org.springframework.graphql:spring-graphql - Affected versions: >=1.3.0 <1.3.11, >=1.4.0 <1.4.8, >=2.0.0 <2.0.7
- GitHub repository: https://github.com/spring-projects/spring-graphql
- Published packages: https://central.sonatype.com/artifact/org.springframework.graphql/spring-graphql
- Package manager: Maven
- Fixed in:
- NES for Spring for GraphQL
- OSS Spring for GraphQL 2.0.7
Vulnerability Info
This Low-severity vulnerability is found in the org.springframework.graphql:spring-graphql package in multiple versions of Spring for GraphQL. The flaw is in EntitiesDataFetcher, the data fetcher that resolves the _entities query a federation gateway sends to a subgraph. When an entity fetcher fails or returns no value, resolveException first passes the exception to the application's exception resolvers. If none of them handles it, the fetcher falls back to a default error:
private Mono<ErrorContainer> resolveException(
Throwable ex, DataFetchingEnvironment env, @Nullable EntityHandlerMethod handlerMethod, int index) {
Throwable theEx = (ex instanceof CompletionException) ? ex.getCause() : ex;
DataFetchingEnvironment theEnv = new IndexedDataFetchingEnvironment(env, index);
Object handler = (handlerMethod != null) ? handlerMethod.getBean() : null;
return this.exceptionResolver.resolveException(theEx, theEnv, handler)
.map(ErrorContainer::new)
.switchIfEmpty(Mono.fromCallable(() -> createDefaultError(theEx, theEnv)));
}
private ErrorContainer createDefaultError(Throwable ex, DataFetchingEnvironment env) {
ErrorType errorType = (ex instanceof RepresentationException representationEx) ?
representationEx.getErrorType() : ErrorType.INTERNAL_ERROR;
return new ErrorContainer(GraphqlErrorBuilder.newError(env)
.errorType(errorType)
.message(ex.getMessage())
.build());
}createDefaultError copies ex.getMessage() straight into the GraphQL error. That error goes back in the errors array of the response. Any unhandled exception raised by an @EntityMapping method or the code it calls reaches the client with its full message. Examples include data access, validation, or downstream service errors. Such messages can contain SQL fragments, internal identifiers, host names, file paths or other implementation details. An authenticated client that can send _entities queries with crafted representations can trigger these failures and read the messages.
Mitigation
Only recent versions of Spring for GraphQL receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a currently supported version of Spring for GraphQL.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
- Yu Bao from PayPal Cyber Security Team (finder)