Get ahead
VMware offers training and certification to turbo-charge your progress.
Learn moreThe GraphiQL page bundled with Spring for GraphQL loads JavaScript libraries from a public CDN, without Subresource Integrity checks. An attacked can inject malicious code in those scripts and execute aribtrary code on the browser loading the GraphiQL page.
More precisely, an application is vulnerable when all the following are true:
When all the conditions above are met, an attacker can serve malicious JavaScript in place of the expected CDN assets.
The attacker can then have access to non-HttpOnly cookies and is able to issue authenticated same-origin requests, including GraphQL operations.
Exploiting this issue requires an attacker to first compromise a third party outside the application (the CDN itself or the network path to it).
Spring for GraphQL:
| Fix version | Availability |
|---|---|
| 2.0.5 | OSS |
| 2.0.4.1 | Enterprise Support Only |
| 1.4.7 | Enterprise Support Only |
| 1.3.10 | Enterprise Support Only |
| 1.0.8 | Enterprise Support Only |
As a workaround, users who cannot upgrade can disable the bundled GraphiQL endpoint (spring.graphql.graphiql.enabled=false) and,
if an interactive GraphQL explorer is still needed, serve a self-hosted or vendored copy of GraphiQL.
To report a security vulnerability for a project within the Spring portfolio, see the Security Policy