Vulnerabilities in pkg:npm/@apollo/server

PACKAGE
Advisory Summary

GHSA-9q82-xgwf-vj6h is a MODERATE browser bug allows for bypass vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Apollo Server libraries in the npm ecosystem. The issue involves browser bug allows for bypass of xs-search (read-only cross-site request forgery) prevention. Remediation is available by upgrading affected packages to version 5.5.0.

5 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@apollo/server

5 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@apollo/server. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-9q82-xgwf-vj6h - MODERATE Apollo Server: Browser bug allows for bypass of XS-Search (read-only Cross-Site Request Forgery) prevention
GHSA-mp6q-xf9x-fwf7 CVE-2026-23897 HIGH Apollo Serve vulnerable to Denial of Service with `startStandaloneServer`
GHSA-j5g3-5c8r-7qfx - LOW Prevent logging invalid header values
GHSA-68jh-rf6x-836f - LOW @apollo/server vulnerable to unsafe application of Content Security Policy via reused nonces
GHSA-8r69-3cvp-wxc3 - MODERATE Batched HTTP requests may set incorrect `cache-control` response header

GHSA-9q82-xgwf-vj6h at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-9q82-xgwf-vj6h
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Apollo Server
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-9q82-xgwf-vj6h

To remediate this vulnerability, upgrade all affected Apollo Server dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@apollo/server fixed: 5.5.0
npm install @apollo/server@5.5.0
apollo-server-core fixed: Latest secure release
npm install apollo-server-core@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @apollo/server

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-9q82-xgwf-vj6h, inspect your project dependencies using npm:

npm ls @apollo/server

Analyze the terminal output to locate any version of Apollo Server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.5.0), your application is affected.

Note: The npm ls @apollo/server command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Apollo Server, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# Impact In a Cross-Site Request Forgery attack, untrusted web content causes browsers to send authenticated requests to web servers which use cookies for authentication. While the web content is prevented from reading the request's response due to the Cross-Origin Request Sharing (CORS) protocol, an attacker may be able to cause side effects in the server ("CSRF" attack), or learn something about the response via timing analysis ("XS-Search" attack). Apollo Server has a built-in feature which prevents CSRF and XS-Search attacks: it refuses to process GraphQL requests that could possibly have been sent by a spec-compliant web browser without a protective "preflight" step. See [Apollo Server's docs](https://www.apollographql.com/docs/apollo-server/security/cors) for more details on CORS, CSRF attacks, and Apollo Server's CSRF prevention feature. This feature is fully effective against attacks carried out against users of spec-compliant browsers. Unfortunately, a major browser introduced a bug in 2025 which meant in certain cases, it failed to follow the CORS spec. The browser's maintainers have already committed to fixing the bug and making the browser spec-compliant again. Even with this bug, Apollo Server's CSRF prevention feature **blocks** "side effect" CSRF attacks: Apollo Server will still correctly refuse to execute _mutations_ in requests that were not preflighted. However, some specially crafted authenticated GraphQL _queries_ can be issued across origins *without preflight* in buggy versions of this browser, allowing for XS-Search attacks: an attacker can analyze response times to learn facts about the responses to requests such as whether fields return null or approximately how many list entries are returned from fields. GraphQL servers are only vulnerable if they rely on cookies (or HTTP Basic Auth) for authentication. ## Patches The vulnerability is patched in `@apollo/server` v5.5.0. This release contains a single change: GraphQL requests sent in HTTP `GET` requests which contain a `Content-Type` header naming a type other than `application/json` are rejected. (`GET` requests with no `Content-Type` are allowed.) This change prevents XS-Search attacks even in browsers which are non-compliant in ways similar to this browser. There are no known cases where GraphQL apps depend on the ability of clients to send non-empty `Content-Type` headers with GET requests other than `application/json`, so this change has not been made configurable; if this change breaks a use case, [file an issue](https://github.com/apollographql/apollo-server/issues) and more configurability can be added. Apollo is not currently providing a patch for previous major versions of Apollo Server, which are all [end-of-life](https://www.apollographql.com/docs/apollo-server/previous-versions). ### Workarounds If upgrading is not possible, this particular browser's bug can be mitigated by preventing any HTTP request with a `Content-Type` header containing `message/` from reaching Apollo Server (e.g. in a proxy or middleware). For example, when using Apollo Server's Express integration, something like this can be placed *before* attaching `expressMiddleware` to the `app`: ```js app.use((req, res, next) => { for (let i = 0; i < req.rawHeaders.length - 1; i += 2) { if ( req.rawHeaders[i].toLowerCase() === 'content-type' && req.rawHeaders[i + 1].includes('message/') ) { return res.status(415).json({ error: 'Content-Type not allowed' }); } } next(); }); ``` While the patch prevents a broader class of similar issues, the only known way to exploit this vulnerability is against a particular browser which currently plans to ship a fix in May 2026. If it is already past June 2026 and this vulnerability has not been addressed yet, it is likely that the system is not currently vulnerable. Upgrading to the latest version of Apollo Server is still recommended for the broader protection. ## Resources The browser bug causes a similar vulnerability in Apollo Router; see https://github.com/apollographql/router/security/advisories/GHSA-hff2-gcpx-8f4p

GHSA-9q82-xgwf-vj6h Affected Apollo Server Versions

2 component(s)
Fixed Versions:
5.5.0
Product / Package Ecosystem Affected Versions Fixed Version
@apollo/server
npm
< 5.5.0
5.5.0
apollo-server-core
npm
≤ 3.13.0

References

Frequently Asked Questions

What is GHSA-9q82-xgwf-vj6h?
GHSA-9q82-xgwf-vj6h is a security vulnerability in Apollo Server involving Browser bug allows for bypass of XS-Search (read-only Cross-Site Request Forgery) prevention under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Apollo Server versions are affected?
Affected versions include releases prior to 5.5.0 across affected packages: @apollo/server, apollo-server-core.
What version fixes GHSA-9q82-xgwf-vj6h?
Upgrading to 5.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @apollo/server affected?
Yes, @apollo/server is affected in releases prior to 5.5.0. Upgrade your dependency to 5.5.0 or later.
Is apollo-server-core affected?
Yes, apollo-server-core is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-9q82-xgwf-vj6h?
GHSA-9q82-xgwf-vj6h is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check npm dependencies for GHSA-9q82-xgwf-vj6h?
Run the dependency tree command: 'npm ls @apollo/server'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9q82-xgwf-vj6h",
  "modified" : "2026-03-26T21:53:10Z",
  "published" : "2026-03-26T21:53:10Z",
  "aliases" : [ ],
  "summary" : "Apollo Server: Browser bug allows for bypass of XS-Search (read-only Cross-Site Request Forgery) prevention",
  "details" : "# Impact\n\nIn a Cross-Site Request Forgery attack, untrusted web content causes browsers to send authenticated requests to web servers which use cookies for authentication. While the web content is prevented from reading the request's response due to the Cross-Origin Request Sharing (CORS) protocol, an attacker may be able to cause side effects in the server (\"CSRF\" attack), or learn something about the response via timing analysis (\"XS-Search\" attack).\n\nApollo Server has a built-in feature which prevents CSRF and XS-Search attacks: it refuses to process GraphQL requests that could possibly have been sent by a spec-compliant web browser without a protective \"preflight\" step. See [Apollo Server's docs](https://www.apollographql.com/docs/apollo-server/security/cors) for more details on CORS, CSRF attacks, and Apollo Server's CSRF prevention feature.\n\nThis feature is fully effective against attacks carried out against users of spec-compliant browsers. Unfortunately, a major browser introduced a bug in 2025 which meant in certain cases, it failed to follow the CORS spec. The browser's maintainers have already committed to fixing the bug and making the browser spec-compliant again.\n\nEven with this bug, Apollo Server's CSRF prevention feature **blocks** \"side effect\" CSRF attacks: Apollo Server will still correctly refuse to execute _mutations_ in requests that were not preflighted. However, some specially crafted authenticated GraphQL _queries_ can be issued across origins *without preflight* in buggy versions of this browser, allowing for XS-Search attacks: an attacker can analyze response times to learn facts about the responses to requests such as whether fields return null or approximately how many list entries are returned from fields.\n\nGraphQL servers are only vulnerable if they rely on cookies (or HTTP Basic Auth) for authentication.\n\n## Patches\n\nThe vulnerability is patched in `@apollo/server` v5.5.0. This release contains a single change: GraphQL requests sent in HTTP `GET` requests which contain a `Content-Type` header naming a type other than `application/json` are rejected. (`GET` requests with no `Content-Type` are allowed.) This change prevents XS-Search attacks even in browsers which are non-compliant in ways similar to this browser.\n\nThere are no known cases where GraphQL apps depend on the ability of clients to send non-empty `Content-Type` headers with GET requests other than `application/json`, so this change has not been made configurable; if this change breaks a use case, [file an issue](https://github.com/apollographql/apollo-server/issues) and more configurability can be added.\n\nApollo is not currently providing a patch for previous major versions of Apollo Server, which are all [end-of-life](https://www.apollographql.com/docs/apollo-server/previous-versions).\n\n### Workarounds\n\nIf upgrading is not possible, this particular browser's bug can be mitigated by preventing any HTTP request with a `Content-Type` header containing `message/` from reaching Apollo Server (e.g. in a proxy or middleware).\n\nFor example, when using Apollo Server's Express integration, something like this can be placed *before* attaching `expressMiddleware` to the `app`:\n\n```js\napp.use((req, res, next) => {\n  for (let i = 0; i < req.rawHeaders.length - 1; i += 2) {\n    if (\n      req.rawHeaders[i].toLowerCase() === 'content-type' &&\n      req.rawHeaders[i + 1].includes('message/')\n    ) {\n      return res.status(415).json({ error: 'Content-Type not allowed' });\n    }\n  }\n  next();\n});\n```\n\nWhile the patch prevents a broader class of similar issues, the only known way to exploit this vulnerability is against a particular browser which currently plans to ship a fix in May 2026. If it is already past June 2026 and this vulnerability has not been addressed yet, it is likely that the system is not currently vulnerable. Upgrading to the latest version of Apollo Server is still recommended for the broader protection.\n\n## Resources\n\nThe browser bug causes a similar vulnerability in Apollo Router; see https://github.com/apollographql/router/security/advisories/GHSA-hff2-gcpx-8f4p",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:L/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@apollo/server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.5.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "apollo-server-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "3.13.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/apollographql/apollo-server/security/advisories/GHSA-9q82-xgwf-vj6h"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apollographql/router/security/advisories/GHSA-hff2-gcpx-8f4p"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apollographql/apollo-server/commit/ada12001c4e95b5c779d80314a5a32e33087b5cf"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apollographql/apollo-server"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apollographql/apollo-server/releases/tag/@apollo/server@5.5.0"
  }, {
    "type" : "WEB",
    "url" : "https://www.apollographql.com/docs/apollo-server/previous-versions"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-26T21:53:10Z",
    "nvd_published_at" : null
  }
}