Search for packages
| purl | pkg:npm/apollo-server-core@2.0.4 |
| Vulnerability | Summary | Fixed by |
|---|---|---|
|
VCID-fdyu-hkcu-7bhy
Aliases: GHSA-j5g3-5c8r-7qfx GMS-2023-2117 GMS-2023-2129 |
Prevent logging invalid header values ## 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. |
Affected by 0 other vulnerabilities. Affected by 0 other vulnerabilities. |
|
VCID-u2b9-99j7-rkbk
Aliases: GHSA-w42g-7vfc-xf37 GMS-2020-59 GMS-2020-60 GMS-2020-61 GMS-2020-62 GMS-2020-63 GMS-2020-64 GMS-2020-65 GMS-2020-66 GMS-2020-67 GMS-2020-68 GMS-2020-69 GMS-2020-70 |
Introspection in schema validation in Apollo Server If `subscriptions: false` is passed to the `ApolloServer` constructor options, there is no impact. If implementors were not expecting validation rules to be enforced on the WebSocket subscriptions transport **and** are unconcerned about introspection being enabled on the WebSocket subscriptions transport (or were not expecting that), then this advisory is not applicable. If `introspection: true` is passed to the `ApolloServer` constructor options, the impact is limited to user-provided validation rules (i.e., using `validationRules`) since there would be no expectation that introspection was disabled. |
Affected by 1 other vulnerability. |
| Vulnerability | Summary | Aliases |
|---|---|---|
| This package is not known to fix vulnerabilities. | ||
| Date | Actor | Action | Vulnerability | Source | VulnerableCode Version |
|---|---|---|---|---|---|
| 2026-06-06T04:04:30.451737+00:00 | GitLab Importer | Affected by | VCID-fdyu-hkcu-7bhy | https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/apollo-server-core/GMS-2023-2129.yml | 38.6.0 |
| 2026-06-04T20:31:14.943514+00:00 | GitLab Importer | Affected by | VCID-u2b9-99j7-rkbk | https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/apollo-server-core/GMS-2020-64.yml | 38.6.0 |