All apollo-server-core versions

apollo-server-core @3.11.1

rejected
This version was rejected. It did not pass GreenFlagged's security review and is not served by the registry. The findings and risk dispositions below explain why.
100
Risk Score
MIT
License
No
Install Scripts
23
Dependencies
0
Dev Dependencies
204.0 KB
Package Size
Published

Core engine for Apollo GraphQL server

Maintainers

apollo-bot

Keywords

GraphQLApolloServerJavascript

Dependencies (23)

PackageConstraintRegistry Status
uuid ^9.0.0 auto_approved
sha.js ^2.4.11 auto_approved
loglevel ^1.6.8 auto_approved
lru-cache ^6.0.0 auto_approved
async-retry ^1.2.1 auto_approved
graphql-tag ^2.11.0 auto_approved
whatwg-mimetype ^3.0.0 No greenflagged match
apollo-datasource ^3.3.2 auto_approved
apollo-server-env ^4.2.1 auto_approved
@graphql-tools/mock ^8.1.2 auto_approved
@josephg/resolvable ^1.0.0 auto_approved
apollo-server-types ^3.7.1 auto_approved
@apollo/utils.logger ^1.0.0 auto_approved
apollo-server-errors ^3.3.1 auto_approved
@graphql-tools/schema ^8.0.0 auto_approved
node-abort-controller ^3.0.1 No greenflagged match
apollo-reporting-protobuf ^3.3.3 auto_approved
apollo-server-plugin-base ^3.7.1 auto_approved
fast-json-stable-stringify ^2.1.0 auto_approved
@apollo/utils.keyvaluecache ^1.0.1 auto_approved
@apollographql/apollo-tools ^0.5.3 auto_approved
@apollo/utils.usagereporting ^1.0.0 auto_approved
@apollographql/graphql-playground-html 1.6.29 auto_approved

Transitive Dependency Tree

78 transitive deps max depth 7
  ├─ @apollo/utils.keyvaluecache ^1.0.1 → 1.0.2
  ├─ @apollo/utils.logger ^1.0.0 → 1.0.1
  ├─ @apollo/utils.usagereporting ^1.0.0 → 1.0.1
  ├─ @apollographql/apollo-tools ^0.5.3 → 0.5.4
  ├─ @apollographql/graphql-playground-html 1.6.29 → 1.6.29
  ├─ @graphql-tools/mock ^8.1.2 → 8.7.20
  ├─ @graphql-tools/schema ^8.0.0 → 8.5.1
  ├─ @josephg/resolvable ^1.0.0 → 1.0.1
  ├─ apollo-datasource ^3.3.2 → 3.3.2
  ├─ apollo-reporting-protobuf ^3.3.3 → 3.4.0
  ├─ apollo-server-env ^4.2.1 → 4.2.1
  ├─ apollo-server-errors ^3.3.1 → 3.3.1
  ├─ apollo-server-plugin-base ^3.7.1 → 3.7.2
  ├─ apollo-server-types ^3.7.1 → 3.8.0
  ├─ async-retry ^1.2.1 → 1.3.3
  ├─ fast-json-stable-stringify ^2.1.0 → 2.1.0
  ├─ graphql-tag ^2.11.0 → 2.12.6
  ├─ loglevel ^1.6.8 → 1.9.2
  ├─ lru-cache ^6.0.0 → 6.0.0
  ├─ node-abort-controller ^3.0.1
  ├─ sha.js ^2.4.11 → 2.4.12
  ├─ uuid ^9.0.0 → 9.0.1
├─ whatwg-mimetype ^3.0.0
  ├─ @apollo/protobufjs 1.2.6
  ├─ @apollo/usage-reporting-protobuf ^4.0.0 → 4.1.2
  ├─ @apollo/utils.dropunuseddefinitions ^1.1.0 → 1.1.0
  ├─ @apollo/utils.keyvaluecache ^1.0.1 → 1.0.2
  ├─ @apollo/utils.logger ^1.0.0 → 1.0.1
  ├─ @apollo/utils.printwithreducedwhitespace ^1.1.0 → 1.1.0
  ├─ @apollo/utils.removealiases 1.0.0 → 1.0.0
  ├─ @apollo/utils.sortast ^1.1.0 → 1.1.0
  ├─ @apollo/utils.stripsensitiveliterals ^1.2.0 → 1.2.0
  ├─ @graphql-tools/merge 8.3.1 → 8.3.1
  ├─ @graphql-tools/schema ^9.0.18 → 9.0.19
  ├─ @graphql-tools/utils 8.9.0 → 8.9.0
  ├─ @graphql-tools/utils ^9.2.1 → 9.2.1
  ├─ apollo-reporting-protobuf ^3.4.0
  ├─ apollo-server-env ^4.2.1 → 4.2.1
  ├─ apollo-server-types ^3.8.0 → 3.8.0
  ├─ fast-json-stable-stringify ^2.1.0 → 2.1.0
  ├─ inherits ^2.0.4 → 2.0.4
  ├─ lru-cache 7.10.1 - 7.13.1 → 7.13.1
  ├─ node-fetch ^2.6.7 → 2.6.13
  ├─ retry 0.13.1 → 0.13.1
  ├─ safe-buffer ^5.2.1 → 5.2.1
  ├─ to-buffer ^1.2.0 → 1.2.2
  ├─ tslib ^2.1.0 → 2.8.1
  ├─ tslib ^2.4.0 → 2.8.1
  ├─ value-or-promise 1.0.11 → 1.0.11
  ├─ xss ^1.0.8 → 1.0.15
├─ yallist ^4.0.0 → 4.0.0
  ├─ @apollo/protobufjs 1.2.8 → 1.2.8
  ├─ @apollo/utils.keyvaluecache ^1.0.1 → 1.0.2
  ├─ @apollo/utils.logger ^1.0.0 → 1.0.1
  ├─ @graphql-tools/merge ^8.4.1 → 8.4.2
  ├─ @graphql-tools/utils ^9.2.1 → 9.2.1
  ├─ @graphql-tools/utils 8.9.0 → 8.9.0
  ├─ @graphql-typed-document-node/core ^3.1.1 → 3.2.0
  ├─ apollo-reporting-protobuf ^3.4.0
  ├─ apollo-server-env ^4.2.1 → 4.2.1
  ├─ commander ^2.20.3 → 2.20.3
  ├─ cssfilter 0.0.10 → 0.0.10
  ├─ isarray ^2.0.5 → 2.0.5
  ├─ lodash.sortby ^4.7.0 → 4.7.0
  ├─ lru-cache 7.10.1 - 7.13.1 → 7.13.1
  ├─ node-fetch ^2.6.7 → 2.6.13
  ├─ safe-buffer ^5.2.1 → 5.2.1
  ├─ tslib ^2.4.0 → 2.8.1
  ├─ typed-array-buffer ^1.0.3 → 1.0.3
  ├─ value-or-promise ^1.0.12 → 1.0.12
├─ whatwg-url ^5.0.0 → 5.0.0
  ├─ @apollo/utils.logger ^1.0.0 → 1.0.1
  ├─ @graphql-tools/utils ^9.2.1 → 9.2.1
  ├─ @graphql-typed-document-node/core ^3.1.1 → 3.2.0
  ├─ @protobufjs/aspromise ^1.1.2 → 1.1.2
  ├─ @protobufjs/base64 ^1.1.2 → 1.1.2
  ├─ @protobufjs/codegen ^2.0.4 → 2.0.5
  ├─ @protobufjs/eventemitter ^1.1.0 → 1.1.1
  ├─ @protobufjs/fetch ^1.1.0 → 1.1.1
  ├─ @protobufjs/float ^1.0.2 → 1.0.2
  ├─ @protobufjs/inquire ^1.1.0 → 1.1.2
  ├─ @protobufjs/path ^1.1.2 → 1.1.2
  ├─ @protobufjs/pool ^1.1.0 → 1.1.0
  ├─ @protobufjs/utf8 ^1.1.0 → 1.1.1
  ├─ @types/long ^4.0.0 → 4.0.2
  ├─ call-bound ^1.0.3 → 1.0.4
  ├─ es-errors ^1.3.0 → 1.3.0
  ├─ is-typed-array ^1.1.14
  ├─ long ^4.0.0 → 4.0.0
  ├─ lru-cache 7.10.1 - 7.13.1 → 7.13.1
  ├─ node-fetch ^2.6.7 → 2.6.13
  ├─ tr46 ~0.0.3 → 0.0.3
  ├─ tslib ^2.4.0 → 2.8.1
  ├─ webidl-conversions ^3.0.0 → 3.0.1
├─ whatwg-url ^5.0.0 → 5.0.0
  ├─ @graphql-typed-document-node/core ^3.1.1 → 3.2.0
  ├─ @protobufjs/aspromise ^1.1.1 → 1.1.2
  ├─ call-bind-apply-helpers ^1.0.2 → 1.0.2
  ├─ get-intrinsic ^1.3.0 → 1.3.1
  ├─ tr46 ~0.0.3 → 0.0.3
  ├─ tslib ^2.4.0 → 2.8.1
  ├─ webidl-conversions ^3.0.0 → 3.0.1
├─ whatwg-url ^5.0.0 → 5.0.0
  ├─ async-function ^1.0.0
  ├─ async-generator-function ^1.0.0 → 1.0.0
  ├─ call-bind-apply-helpers ^1.0.2 → 1.0.2
  ├─ es-define-property ^1.0.1 → 1.0.1
  ├─ es-errors ^1.3.0 → 1.3.0
  ├─ es-object-atoms ^1.1.1 → 1.1.2
  ├─ function-bind ^1.1.2 → 1.1.2
  ├─ generator-function ^2.0.0 → 2.0.1
  ├─ get-proto ^1.0.1
  ├─ gopd ^1.2.0 → 1.2.0
  ├─ has-symbols ^1.1.0 → 1.1.0
  ├─ hasown ^2.0.2 → 2.0.4
  ├─ math-intrinsics ^1.1.0 → 1.1.0
  ├─ tr46 ~0.0.3 → 0.0.3
├─ webidl-conversions ^3.0.0 → 3.0.1
  ├─ es-errors ^1.3.0 → 1.3.0
  ├─ function-bind ^1.1.2 → 1.1.2

Changes from v1.4.0

Dependency Changes

ChangePackageVersion
added uuid ^9.0.0
added sha.js ^2.4.11
added loglevel ^1.6.8
added lru-cache ^6.0.0
added async-retry ^1.2.1
added graphql-tag ^2.11.0
added whatwg-mimetype ^3.0.0
added apollo-datasource ^3.3.2
added apollo-server-env ^4.2.1
added @graphql-tools/mock ^8.1.2
added @josephg/resolvable ^1.0.0
added apollo-server-types ^3.7.1
added @apollo/utils.logger ^1.0.0
added apollo-server-errors ^3.3.1
added @graphql-tools/schema ^8.0.0
added node-abort-controller ^3.0.1
added apollo-reporting-protobuf ^3.3.3
added apollo-server-plugin-base ^3.7.1
added fast-json-stable-stringify ^2.1.0
added @apollo/utils.keyvaluecache ^1.0.1
added @apollographql/apollo-tools ^0.5.3
added @apollo/utils.usagereporting ^1.0.0
added @apollographql/graphql-playground-html 1.6.29
removed apollo-tracing ^0.1.0
removed graphql-extensions ^0.0.x
removed apollo-cache-control ^0.1.0

Script Changes

- watch- compile- prepublish

File Changes

175 added 19 removed 29 modified size delta: +838.3 KB

Risk Dispositions (2 applicable to this version, 1 other)

Accepted rules are downgraded to INFO on future analyses; rejected rules escalate to CRITICAL.

Rule Source Disposition Author Reason
osv:GHSA-j5g3-5c8r-7qfx osv reject AI AI (osv): Affected range includes < 2.26.1; all v2 versions below 2.26.1 are vulnerable. Fix exists in 2.26.1+.
osv:GHSA-9q82-xgwf-vj6h osv reject AI AI (osv): Affected range includes <= 3.13.0; entire v2 line is vulnerable. Fix exists in 5.5.0+.
Show 1 disposition(s) that do not match any finding on this version
Rule Source Disposition Author Reason
osv:GHSA-w42g-7vfc-xf37 osv reject AI AI (osv): Affected range is < 2.14.2; this package's entire v2 line below 2.14.2 is vulnerable. Fix exists in 2.14.2+.

SAST Findings (3)

CRITICAL GHSA-9q82-xgwf-vj6h: Apollo Server: Browser bug allows for bypass of XS-Search (read-only Cross-Site Request Forgery) prevention osv

[Always reject] # 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

CRITICAL GHSA-j5g3-5c8r-7qfx: Prevent logging invalid header values osv

[Always reject] ## Impact ### What kind of vulnerability is it? Apollo Server can log sensitive information (Studio API keys) if they are passed incorrectly (with leading/trailing whitespace) or if they have any characters that are invalid as part of a header value. ### Who is impacted? Users who (all of the below): * use either the schema reporting or usage reporting feature * use an Apollo Studio API key which has invalid header values * use the default fetcher (`node-fetch`) or configured their own `node-fetch` fetcher The following node snippet can test whether your API key has invalid header values. This code is taken directly from `node-fetch@2`'s header value validation code. ```js const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/; if (invalidHeaderCharRegex.test('<YOUR_API_KEY>')) { console.log('potentially affected'); } console.log('unaffected'); ``` If the provided API key is not a valid header value, whenever Apollo Server uses that API key in a request (to Studio, for example), `node-fetch` will throw an error _which contains the header value_. This error is logged in various ways depending on the user's configuration, but most likely the console or some configured logging service. ### Patches This problem is patched in the latest version of Apollo Server as soon as this advisory is published. ### Workarounds * Try retrieving a new API key from Studio. Note: this may not work if the invalid character is not part of the secret (it may be derived from identifiers like graph name, user name). * Override the `fetcher` * Disable schema reporting and/or usage reporting ### Solution * Apollo Server will now call `.trim()` on incoming API keys in order to eliminate leading/trailing whitespace and log a warning when it does so. * Apollo Server will now perform the same validation of API keys as `node-fetch@2` performs on header values on startup. Apollo Server will throw an error on startup (i.e., fail to start completely) and notify the user their API key is invalid along with the offending characters.

LOW No provenance attestation provenance

Package was published without Sigstore provenance. Consider requesting the maintainer enable provenance via CI/CD.

Review Summary

Risk score: 100 (capped from 123). Findings: 2 critical (+80), 4 medium (+40), 1 low (+3).

Commit: 6247d96ba90d Browse source

Published to npm: