apollo-server-integrations / apollo-server-integration-cloudflare-workers

An integration to use Cloudflare Workers as a hosting service with Apollo Server
https://github.com/kimyvgy/worker-apollo-server-template
MIT License
13 stars 0 forks source link

chore(deps): update dependency @apollo/server to v4.9.3 [security] #60

Closed renovate[bot] closed 10 months ago

renovate[bot] commented 10 months ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@apollo/server 4.9.2 -> 4.9.3 age adoption passing confidence

GitHub Vulnerability Alerts

GHSA-j5g3-5c8r-7qfx

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):

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.

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

Solution


Release Notes

apollographql/apollo-server (@​apollo/server) ### [`v4.9.3`](https://togithub.com/apollographql/apollo-server/blob/HEAD/packages/server/CHANGELOG.md#493) [Compare Source](https://togithub.com/apollographql/apollo-server/compare/@apollo/server@4.9.2...@apollo/server@4.9.3) ##### Patch Changes - [`a1c725eaf`](https://togithub.com/apollographql/apollo-server/commit/a1c725eaf53c901e32a15057211bcb3eb6a6109b) Thanks [@​trevor-scheer](https://togithub.com/trevor-scheer)! - Ensure API keys are valid header values on startup Apollo Server previously performed no sanitization or validation of API keys on startup. In the case that an API key was provided which contained characters that are invalid as header values, Apollo Server could inadvertently log the API key in cleartext. This only affected users who: - Provide an API key with characters that are invalid as header values - Use either schema or usage reporting - Use the default fetcher provided by Apollo Server or configure their own `node-fetch` fetcher Apollo Server now trims whitespace from API keys and validates that they are valid header values. If an invalid API key is provided, Apollo Server will throw an error on startup. For more details, see the security advisory: https://github.com/apollographql/apollo-server/security/advisories/GHSA-j5g3-5c8r-7qfx

Configuration

📅 Schedule: Branch creation - "" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.