{"answers":{"affected":"2 open source packages ship an affected version, including apollo-server-core.","exploited":"There is no known exploitation of GHSA-2fvv-qxrq-7jq6 in the wild and no public exploit code.","fix":"Upgrade apollo-server-core to 3.10.1 or later.","what":"GHSA-2fvv-qxrq-7jq6 is a cross-site scripting vulnerability in apollo-server-core, published on 18 Aug 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-2fvv-qxrq-7jq6 and fix it if it is affected.\n\nWhat it is: GHSA-2fvv-qxrq-7jq6 is a cross-site scripting vulnerability in apollo-server-core, published on 18 Aug 2022. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-2fvv-qxrq-7jq6 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- apollo-server-core (npm): affected from 3.0.0; fixed in 3.10.1\n- apollo-server-core (npm): affected from 3.0.0; fixed in 3.10.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-2fvv-qxrq-7jq6/ (Markdown: https://insights.sbomify.com/GHSA-2fvv-qxrq-7jq6/index.md)","id":"GHSA-2fvv-qxrq-7jq6","markdown":"https://insights.sbomify.com/GHSA-2fvv-qxrq-7jq6/index.md","name":"GHSA-2fvv-qxrq-7jq6","record":{"aliases":[],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Apollo Server","requires_auth":"none","summary":"Attacker can execute JavaScript in IE11 via malicious URL on default landing page; upgrade Apollo Server or disable landing page.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### 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).","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"apollo-server-core vulnerable to URL-based XSS attack affecting IE11 on default landing page","id":"GHSA-2fvv-qxrq-7jq6","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"xss","year":"2022"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["3.10.1"],"introduced":["3.0.0"],"last_affected":[],"package":"apollo-server-core","purl":null,"source":"GHSA-2fvv-qxrq-7jq6"},{"ecosystem":"npm","fixed":["3.10.1"],"introduced":["3.0.0"],"last_affected":[],"package":"apollo-server-core","purl":"pkg:npm/apollo-server-core","source":"GHSA-2fvv-qxrq-7jq6"}],"products":null,"published":"2022-08-18","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attacker can execute JavaScript in IE11 via malicious URL on default landing page; upgrade Apollo Server or disable landing page.","url":"https://insights.sbomify.com/GHSA-2fvv-qxrq-7jq6/"}