{"id":"GHSA-2fvv-qxrq-7jq6","aliases":[],"url":"https://o3.security/vulnerability/GHSA-2fvv-qxrq-7jq6","summary":"apollo-server-core vulnerable to URL-based XSS attack affecting IE11 on default landing page","details":"### Impact\n\nThe 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.\n\nThis only affects Apollo Server with the [default landing page](https://www.apollographql.com/docs/apollo-server/api/plugin/landing-pages/) enabled. Old browsers visiting your server may be affected if ANY of these apply:\n- You do not pass any landing page plugin to the `plugins` option of `new ApolloServer`.\n- You pass `ApolloServerPluginLandingPageLocalDefault()` or `ApolloServerPluginLandingPageProductionDefault()` to the `plugins` option of `new ApolloServer`.\n\nBrowsers visiting your server are NOT affected if ANY of these apply:\n- You pass `ApolloServerPluginLandingPageDisabled()` to the `plugins` option of `new ApolloServer`.\n- You pass `ApolloServerPluginLandingPageGraphQLPlayground()` to the `plugins` option of `new ApolloServer`.\n- You pass a custom plugin implementing the `renderLandingPage` hook to the `plugins` option of `new ApolloServer`.\n\nThis issue was introduced in v3.0.0 when the landing page feature was added.\n\n### Patches\nTo avoid this, the sample `curl` command has been removed in release 3.10.1.\n\n### Workarounds\n\nDisabling the landing page removes the possibility of exploit:\n\n```ts\nimport { ApolloServerPluginLandingPageDisabled } from 'apollo-server-core';\n\nnew ApolloServer({\n  plugins: [ApolloServerPluginLandingPageDisabled()],\n  // ...\n});\n```\n\n### See also\nA similar issue exists in the landing page of Apollo Router. See the corresponding [Apollo Router security advisory](https://github.com/apollographql/router/security/advisories/GHSA-p5q6-hhww-f999).\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [the Apollo Server repository](https://github.com/apollographql/apollo-server/)\n* Email us at [security@apollographql.com](mailto:security@apollographql.com)\n\n### Credits\n\nThis issue was discovered by Adrian Denkiewicz of [Doyensec](https://doyensec.com/research.html).","published":"2022-08-18T18:55:01Z","modified":"2022-08-18T18:55:01Z","cvss":null,"epss":null,"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"npm","name":"apollo-server-core","fixedVersion":"3.10.1"}],"fix":{"url":"https://github.com/apollographql/apollo-server/commit/68a439b6e3af9edc8a2480092f2d49f058be1e64","label":"apollographql/apollo-server@68a439b"},"references":[{"type":"WEB","url":"https://github.com/apollographql/apollo-server/security/advisories/GHSA-2fvv-qxrq-7jq6"},{"type":"WEB","url":"https://github.com/apollographql/apollo-server/commit/68a439b6e3af9edc8a2480092f2d49f058be1e64"},{"type":"PACKAGE","url":"https://github.com/apollographql/apollo-server"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2022-08-18T18:55:01Z"}}