Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS0yZnZ2LXF4cnEtN2pxNs4AAuFi

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

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:

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

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.

Permalink: https://github.com/advisories/GHSA-2fvv-qxrq-7jq6
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS0yZnZ2LXF4cnEtN2pxNs4AAuFi
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 1 year ago
Updated: over 1 year ago


Identifiers: GHSA-2fvv-qxrq-7jq6
References: Repository: https://github.com/apollographql/apollo-server
Blast Radius: 0.0

Affected Packages

npm:apollo-server-core
Dependent packages: 531
Dependent repositories: 76,434
Downloads: 4,880,913 last month
Affected Version Ranges: >= 3.0.0, < 3.10.1
Fixed in: 3.10.1
All affected versions: 3.0.0, 3.0.1, 3.0.2, 3.1.0, 3.1.1, 3.1.2, 3.2.0, 3.3.0, 3.4.0, 3.4.1, 3.5.0, 3.6.0, 3.6.1, 3.6.2, 3.6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