Quick answers
- Is This vulnerability exploited in the wild?
- No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
- How severe is This vulnerability?
- Informational severity, published 30 August 2023.
- Which products and versions are affected?
- apollo-server (npm) SEMVER:introduced=0,fixed=4.9.3; apollo-server-core (npm) SEMVER:introduced=3.0.0,fixed=3.12.1.
- Is there a fix for This vulnerability?
- Yes. apollo-server (npm): upgrade to 4.9.3 or later; apollo-server-core (npm): upgrade to 3.12.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is This vulnerability attacked?
- It is attacked over the network, in a software library.
- Am I affected?
- Check whether you run apollo-server (npm) or apollo-server-core (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- apollo-server (npm): upgrade to 4.9.3 or later
npm install apollo-server@4.9.3 - apollo-server-core (npm): upgrade to 3.12.1 or later
npm install apollo-server-core@3.12.1
Technical details
The vulnerability is a sensitive information disclosure (CWE-532) in Apollo Server's API key handling. When an Apollo Studio API key contains invalid header characters (per HTTP/header specifications) or leading/trailing whitespace, the node-fetch HTTP client throws an error containing the raw API key value. This error is then logged to the console or configured logging services, exposing the credential. The issue affects users who enable schema reporting or usage reporting features, use the default node-fetch fetcher, and possess an API key with invalid characters. Apollo Server 4.9.3, apollo-server-core 3.12.1, and apollo-server-core 2.26.1 patch the issue by trimming whitespace, validating API keys on startup, and throwing a clear error message if the key is invalid.
Affected products
- Apollo Server before 4.9.3
- Apollo apollo-server-core before 2.26.1 or before 3.12.1
Timeline
- 2023-08-30: disclosed: GHSA-j5g3-5c8r-7qfx published
- 2023-08-30: patched: Apollo Server 4.9.3, apollo-server-core 2.26.1 and 3.12.1 released