Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

GHSA-2fvv-qxrq-7jq6 apollo-server-core

Fix: apollographql/apollo-server@68a439b

GHSA-2fvv-qxrq-7jq6 is a security vulnerability in apollo-server-core. A fix is available for apollo-server-core — see the affected versions and patch details below.

apollo-server-core vulnerable to URL-based XSS attack affecting IE11 on default landing page

Published
Aug 18, 2022
Updated
Aug 18, 2022
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Aug 18, 2022 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, a proxy for how much of the ecosystem is exposed.

apollo-server-corenpm
594Kdownloads / week

Description

Impact

The default landing page contained HTML to display a sample curl command which is made visible if the full landing page bundle could not be fetched from Apollo's CDN. The server's URL is directly interpolated into this command inside the browser from window.location.href. On some older browsers such as IE11, this value is not URI-encoded. On such browsers, opening a malicious URL pointing at an Apollo Router could cause execution of attacker-controlled JavaScript.

This only affects Apollo Server with the default landing page enabled. Old browsers visiting your server may be affected if ANY of these apply:

  • You do not pass any landing page plugin to the plugins option of new ApolloServer.
  • You pass ApolloServerPluginLandingPageLocalDefault() or ApolloServerPluginLandingPageProductionDefault() to the plugins option of new ApolloServer.

Browsers visiting your server are NOT affected if ANY of these apply:

  • You pass ApolloServerPluginLandingPageDisabled() to the plugins option of new ApolloServer.
  • You pass ApolloServerPluginLandingPageGraphQLPlayground() to the plugins option of new ApolloServer.
  • You pass a custom plugin implementing the renderLandingPage hook to the plugins option of new ApolloServer.

This issue was introduced in v3.0.0 when the landing page feature was added.

Patches

To avoid this, the sample curl command has been removed in release 3.10.1.

Workarounds

Disabling the landing page removes the possibility of exploit:

import { ApolloServerPluginLandingPageDisabled } from 'apollo-server-core';

new ApolloServer({
  plugins: [ApolloServerPluginLandingPageDisabled()],
  // ...
});

See also

A similar issue exists in the landing page of Apollo Router. See the corresponding Apollo Router security advisory.

For more information

If you have any questions or comments about this advisory:

Credits

This issue was discovered by Adrian Denkiewicz of Doyensec.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmapollo-server-core3.0.0&&< 3.10.13.10.1npm install apollo-server-core@3.10.1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for apollo-server-core, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update apollo-server-core to 3.10.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-2fvv-qxrq-7jq6 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like GHSA-2fvv-qxrq-7jq6 can be triaged on real exposure rather than presence alone.

Tailored to GHSA-2fvv-qxrq-7jq6. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

### Impact The default landing page contained HTML to display a sample `curl` command which is made visible if the full landing page bundle could not be fetched from Apollo's CDN. The server's URL is directly interpolated into this command inside the browser from `window.location.href`. On some older browsers such as IE11, this value is not URI-encoded. On such browsers, opening a malicious URL pointing at an Apollo Router could cause execution of attacker-controlled JavaScript. This only affects Apollo Server with the [default landing page](https://www.apollographql.com/docs/apollo-server/a
O3 Security · Impact-Aware SCA

Is GHSA-2fvv-qxrq-7jq6 in your dependencies?

O3 Security finds GHSA-2fvv-qxrq-7jq6 across npm dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.

GHSA-2fvv-qxrq-7jq6: apollo-server-core | O3 Security