{"answers":{"affected":"2 open source packages ship an affected version, including @apollo/server.","exploited":"There is no known exploitation of GHSA-68jh-rf6x-836f in the wild and no public exploit code.","fix":"Upgrade @apollo/server to 4.7.4 or later.","what":"GHSA-68jh-rf6x-836f is a vulnerability in @apollo/server, published on 16 Jun 2023. 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-68jh-rf6x-836f and fix it if it is affected.\n\nWhat it is: GHSA-68jh-rf6x-836f is a vulnerability in @apollo/server, published on 16 Jun 2023. 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-68jh-rf6x-836f in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @apollo/server (npm): affected from 4.7.1; fixed in 4.7.4\n- @apollo/server (npm): affected from 4.7.1; fixed in 4.7.4\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-68jh-rf6x-836f/ (Markdown: https://insights.sbomify.com/GHSA-68jh-rf6x-836f/index.md)","id":"GHSA-68jh-rf6x-836f","markdown":"https://insights.sbomify.com/GHSA-68jh-rf6x-836f/index.md","name":"GHSA-68jh-rf6x-836f","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"GraphQL server library","requires_auth":"none","summary":"Apollo Server's landing pages reused CSP nonces, failing to prevent XSS if other vectors exist, requiring an upgrade to fix.","user_interaction":"required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Context\nContent Security Policies (CSP) are a defense-in-depth strategy against XSS attacks. Improper application of CSP isn't itself a vulnerability, but it does fail to prevent XSS in the event that there is a viable attack vector for an XSS attack.\n\n### Impact\nThere aren't any XSS attack vectors via the Apollo Server landing pages _known to Apollo_, so to our knowledge there is no impact. However, if there are existing XSS vectors that haven't been reported and patched, then all users of Apollo Server's landing pages have a vulnerability which won't be prevented by the current CSP implemented by the landing pages.\n\nPrior to version 4.7.1, there was no CSP implemented at all. However, the initial CSP implementation (4.7.1+) reused nonces. While this sufficiently resolved the issue w.r.t. scripts not running in Safari, it did not implement CSP in a safe or conventional way.\n\n### Patches\nThe issue is patched in the latest version of Apollo Server, v4.7.4. The changes can be reviewed in [the merge commit](https://github.com/apollographql/apollo-server/commit/0adaf80d1ee51d8c7e5fd863c04478536d15eb8c).\n\n### Workarounds\nThe landing page can be disabled completely until the patch can be upgraded to.\nhttps://www.apollographql.com/docs/apollo-server/api/plugin/landing-pages/#disabling-the-landing-page\n\n### References\nhttps://content-security-policy.com/nonce/","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 vulnerable to unsafe application of Content Security Policy via reused nonces","id":"GHSA-68jh-rf6x-836f","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"security_feature_bypass","year":"2023"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["4.7.4"],"introduced":["4.7.1"],"last_affected":[],"package":"@apollo/server","purl":null,"source":"GHSA-68jh-rf6x-836f"},{"ecosystem":"npm","fixed":["4.7.4"],"introduced":["4.7.1"],"last_affected":[],"package":"@apollo/server","purl":"pkg:npm/%40apollo/server","source":"GHSA-68jh-rf6x-836f"}],"products":null,"published":"2023-06-16","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":"Apollo Server's landing pages reused CSP nonces, failing to prevent XSS if other vectors exist, requiring an upgrade to fix.","url":"https://insights.sbomify.com/GHSA-68jh-rf6x-836f/"}