Skip to content

Apollo Router Unnamed "Subscription" operation results in Denial-of-Service

Moderate severity GitHub Reviewed Published Sep 5, 2023 in apollographql/router • Updated Nov 7, 2023

Package

cargo apollo-router (Rust)

Affected versions

>= 1.28.0, <= 1.29.0

Patched versions

1.29.1

Description

Impact

This is a Denial-of-Service (DoS) type vulnerability which causes the Router to panic and terminate when GraphQL Subscriptions are enabled. It can be triggered when all of the following conditions are met:

  1. Running Apollo Router v1.28.0, v1.28.1 or v1.29.0 ("impacted versions"); and
  2. The Supergraph schema provided to the Router (either via Apollo Uplink or explicitly via other configuration) has a subscription type with root-fields defined; and
  3. The YAML configuration provided to the Router has subscriptions enabled (they are disabled by default), either by setting enabled: true or by setting a valid mode within the subscriptions object (as seen in subscriptions' documentation); and
  4. An anonymous (i.e., un-named) subscription operation (e.g., subscription { ... }) is received by the Router

If all four of these criteria are met, the impacted versions will panic and terminate. There is no data-privacy risk or sensitive-information exposure aspect to this vulnerability.

Depending on the environment in which impacted versions are running and the high-availability characteristics of that environment, a single Router's termination may result in limited or reduced availability or other knock-on effects which are deployment-specific (e.g., depending on if there are multiple instances, auto-restart policies, etc.)

Discovery

This vulnerability was discovered by an internal Apollo team. We have no reports or evidence to support that that has been exploited outside of our own testing, research and follow-up.

Our public security policy can be reviewed at https://github.com/apollographql/router/security/policy and we consider the security of our projects a top priority. Please review the linked policy for more details.

Patches

This is fixed in Apollo Router v1.29.1, which is available on:

We recommend all users running the impacted configuration above to update to a patched version of the Router immediately. Router v1.29.1 should be a very simple upgrade from any impacted version.

Workarounds

Updating to v1.29.1 should be a clear and simple upgrade path for those running impacted versions. However, if Subscriptions are not necessary for your Graph – but are enabled via configuration — then disabling subscriptions is another option to mitigate the risk.

For more information

If you have any questions or comments about this advisory:

References

@peakematt peakematt published to apollographql/router Sep 5, 2023
Published by the National Vulnerability Database Sep 5, 2023
Published to the GitHub Advisory Database Sep 7, 2023
Reviewed Sep 7, 2023
Last updated Nov 7, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H

EPSS score

0.096%
(42nd percentile)

Weaknesses

CVE ID

CVE-2023-41317

GHSA ID

GHSA-w8vq-3hf9-xppx

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.