Summary
Introspection in schema validation in Apollo Server
We encourage all users of Apollo Server to read this advisory in its entirety to understand the impact. The Resolution section contains details on patched versions.
Affected packages
The bug existed in apollo-server-core versions prior to version 2.14.2, however, this means all integration packages (e.g., apollo-server-express, etc.) prior to version 2.14.2 which depend on apollo-server-core for their subscriptions support are affected. This includes the apollo-server package that automatically provides an Express server.
Therefore, for officially published Apollo Server packages, the full list of affected packages includes: apollo-server, apollo-server-azure-functions, apollo-server-cache-memcached, apollo-server-core, apollo-server-cloud-functions, apollo-server-cloudflare, apollo-server-express, apollo-server-fastify, apollo-server-hapi, apollo-server-koa, apollo-server-lambda, and apollo-server-micro.
Note: The full list included here doesn't fit into the box provided by the GitHub Security Advisories form.
Resolution
The problem is resolved in Apollo Server versions 2.14.2 or higher. If upgrading is not an option, see Workarounds below. When upgrading, ensure that the affected integration package (e.g., apollo-server-express) and the apollo-server-core package are both updated to the patched versions. (The version numbers should both be 2.14.2.)
Workarounds
Upgrading to a patched version is the recommended solution. If upgrading is not an option, subscriptions can be disabled with subscriptions: false to resolve the impact. Disabling subscriptions in this way will disable all subscriptions support and the WebSocket transport:
const server = new ApolloServer({
subscriptions: false,
/* Other options, such as typeDefs, resolvers, schema, etc. */
});
For more information
If you have any questions or comments about this advisory, please open an issue and the maintainers will try to assist.
Credit and appreciation
Apollo fully believes in ethical disclosure of vulnerabilities by security researchers who notify us with details and provide us time to address and fix the issues before publicly disclosing.
Credit for this discovery goes to the team at Bitwala, who reported the concern to us responsibly after discovering it during their own auditing.
Impact
If subscriptions: false is passed to the ApolloServer constructor options, there is no impact. If implementors were not expecting validation rules to be enforced on the WebSocket subscriptions transport and are unconcerned about introspection being enabled on the WebSocket subscriptions transport (or were not expecting that), then this advisory is not applicable. If introspection: true is passed to the ApolloServer constructor options, the impact is limited to user-provided validation rules (i.e., using validationRules) since there would be no expectation that introspection was disabled.
The enforcement of user-provided validation rules on the HTTP transport is working as intended and is unaffected by this advisory. Similarly, disabling introspection on the HTTP transport is working as intended and is unaffected by this advisory.
Note: Unless subscriptions: false is explicitly passed to the constructor parameters of new ApolloServer({ ... }), subscriptions are enabled by default, whether or not there is a Subscription type present in the schema. As an alternative to upgrading to a patched version, see the Workarounds section below to disable subscriptions if it is not necessary.
In cases where subscriptions: false is not explicitly set, the subscription server is impacted since validation rules which are enforced on the main request pipeline within Apollo Server were not being passed to the SubscriptionServer.create invocation (seen here, prior to the patch).
The omitted validation rules for the subscription server include any validationRules passed by implementors to the ApolloServer constructor which were expected to be enforced on the subscriptions WebSocket endpoint. Additionally, because an internal NoIntrospection validation rule is used to disable introspection, it would have been possible to introspect a server on the WebSocket endpoint that the SubscriptionServer creates even though it was not possible on other transports (e.g. HTTP).
The severity of risk depends on whether sensitive information is being stored in the schema itself. The contents of schema descriptions, or secrets which might be revealed by the names of types or field names within those types, will determine the risk to individual implementors.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
apollo-server to 2.14.2 or later; apollo-server-azure-functions to 2.14.2 or later; apollo-server-cache-memcached to 2.14.2 or later; apollo-server-core to 2.14.2 or later; apollo-server-cloud-functions to 2.14.2 or later; apollo-server-cloudflare to 2.14.2 or later; apollo-server-express to 2.14.2 or later; apollo-server-fastify to 2.14.2 or later; apollo-server-hapi to 2.14.2 or later; apollo-server-koa to 2.14.2 or later; apollo-server-lambda to 2.14.2 or later; apollo-server-micro to 2.14.2 or later
Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.
Frequently Asked Questions
- What is GHSA-W42G-7VFC-XF37? GHSA-W42G-7VFC-XF37 is a medium-severity security vulnerability in apollo-server (npm), affecting versions < 2.14.2. It is fixed in 2.14.2.
- Which packages are affected by GHSA-W42G-7VFC-XF37?
apollo-server(npm) (versions < 2.14.2)apollo-server-azure-functions(npm) (versions < 2.14.2)apollo-server-cache-memcached(npm) (versions < 2.14.2)apollo-server-core(npm) (versions < 2.14.2)apollo-server-cloud-functions(npm) (versions < 2.14.2)apollo-server-cloudflare(npm) (versions < 2.14.2)apollo-server-express(npm) (versions < 2.14.2)apollo-server-fastify(npm) (versions < 2.14.2)apollo-server-hapi(npm) (versions < 2.14.2)apollo-server-koa(npm) (versions < 2.14.2)apollo-server-lambda(npm) (versions < 2.14.2)apollo-server-micro(npm) (versions < 2.14.2)
- Is there a fix for GHSA-W42G-7VFC-XF37? Yes. GHSA-W42G-7VFC-XF37 is fixed in 2.14.2. Upgrade to this version or later.
- Is GHSA-W42G-7VFC-XF37 exploitable, and should I be worried? Whether GHSA-W42G-7VFC-XF37 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-W42G-7VFC-XF37 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-W42G-7VFC-XF37?
- Upgrade
apollo-serverto 2.14.2 or later - Upgrade
apollo-server-azure-functionsto 2.14.2 or later - Upgrade
apollo-server-cache-memcachedto 2.14.2 or later - Upgrade
apollo-server-coreto 2.14.2 or later - Upgrade
apollo-server-cloud-functionsto 2.14.2 or later - Upgrade
apollo-server-cloudflareto 2.14.2 or later - Upgrade
apollo-server-expressto 2.14.2 or later - Upgrade
apollo-server-fastifyto 2.14.2 or later - Upgrade
apollo-server-hapito 2.14.2 or later - Upgrade
apollo-server-koato 2.14.2 or later - Upgrade
apollo-server-lambdato 2.14.2 or later - Upgrade
apollo-server-microto 2.14.2 or later
- Upgrade