CVE-2023-41317: Apollo router Apollo Router Unnamed "Subscription" Operation Vulnerability
MODERATECVE-2023-41317 is a MODERATE (CVSS 5.9) apollo router unnamed "subscription" operation vulnerability (CWE-755: Improper Handling of Exceptional Conditions) affecting Apollo router libraries in the crates.io ecosystem. The issue involves apollo router unnamed "subscription" operation results in denial-of-service. Remediation is available by upgrading affected packages to version 1.29.1.
CVE-2023-41317 at a Glance
Security Impact
CVSS: 5.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2023-41317
To remediate this vulnerability, upgrade all affected Apollo router dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade apollo-router to 1.29.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for apollo-router
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-41317, inspect your project dependencies for Apollo router:
inspect dependencies for apollo-router
Analyze the terminal output to locate any version of Apollo router in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.29.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-755: Improper Handling of Exceptional Conditions, where the product does not handle or incorrectly handles an exceptional condition. In Apollo router, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-41317 Affected Apollo router Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
apollo-router
|
crates.io |
≥ 1.28.0
< 1.29.1
|
1.29.1
|
References
Frequently Asked Questions
What is CVE-2023-41317?
Which Apollo router versions are affected?
What version fixes CVE-2023-41317?
Is apollo-router affected?
What is the CVSS score of CVE-2023-41317?
What CWE is associated with CVE-2023-41317?
How can I check crates.io dependencies for CVE-2023-41317?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w8vq-3hf9-xppx",
"modified" : "2023-09-08T21:04:38Z",
"published" : "2023-09-07T12:58:29Z",
"aliases" : [ "CVE-2023-41317" ],
"summary" : "Apollo Router Unnamed \"Subscription\" operation results in Denial-of-Service",
"details" : "### Impact\n\nThis 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**:\n\n1. Running Apollo Router v1.28.0, v1.28.1 or v1.29.0 (\"impacted versions\"); **and**\n2. 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**\n3. 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](https://www.apollographql.com/docs/router/executing-operations/subscription-support/#router-setup)); **and**\n4. An [anonymous](https://spec.graphql.org/draft/#sec-Anonymous-Operation-Definitions) (i.e., un-named) `subscription` operation (e.g., `subscription { ... }`) is received by the Router\n\nIf **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.\n\nDepending 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.)\n\n### Discovery\n\nThis 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.\n\nOur 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.\n\n### Patches\n\nThis is fixed in [Apollo Router v1.29.1](https://github.com/apollographql/router/releases/tag/v1.29.1), which is available on:\n\n- [GitHub Releases](https://github.com/apollographql/router/releases) as `v1.29.1`\n- [GitHub Packages Container Registry](https://github.com/apollographql/router/pkgs/container/router) as `v1.29.1`\n- [Helm Chart Repository](https://github.com/apollographql/router/pkgs/container/helm-charts%2Frouter) as `1.29.1` (without the `v`)\n\nWe 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. \n\n### Workarounds\n\nUpdating 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.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n\n* Open an issue in [the `router` repository](https://github.com/apollographql/router)\n* Email us at `security` `[at]` `apollographql` `[dot]` `com`",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "apollo-router"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.28.0"
}, {
"fixed" : "1.29.1"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.29.0"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/apollographql/router/security/advisories/GHSA-w8vq-3hf9-xppx"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-41317"
}, {
"type" : "WEB",
"url" : "https://github.com/apollographql/router/commit/b295c103dd86c57c848397d32e8094edfa8502aa"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apollographql/router"
}, {
"type" : "WEB",
"url" : "https://github.com/apollographql/router/releases/tag/v1.29.1"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-755" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-09-07T12:58:29Z",
"nvd_published_at" : "2023-09-05T19:15:48Z"
}
}