{"answers":{"affected":"2 open source packages ship an affected version, including apollo-router.","exploited":"There is no known exploitation of CVE-2024-32971 in the wild and no public exploit code.","fix":"Upgrade apollo-router to 1.45.1 or later.","what":"CVE-2024-32971 is a critical vulnerability in apollographql router, published on 2 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-32971 and fix it if it is affected.\n\nWhat it is: CVE-2024-32971 is a critical vulnerability in apollographql router, published on 2 May 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-32971 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- apollo-router (crates.io): affected from 1.44.0; fixed in 1.45.1\n- apollo-router (crates.io): affected from 1.44.0; fixed in 1.45.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-32971/ (Markdown: https://insights.sbomify.com/CVE-2024-32971/index.md)","id":"CVE-2024-32971","markdown":"https://insights.sbomify.com/CVE-2024-32971/index.md","name":"CVE-2024-32971","record":{"aliases":["GHSA-q9p4-hw9m-fj2v"],"analysis":{"component_type":"server_software","fix_type":"upgrade","impacts":["data_read","data_modify"],"network_reachable":"yes","non_default_config":true,"product_category":"Apollo Router","requires_auth":"none","summary":"Apollo Router may execute incorrect GraphQL operations due to a cache defect, leading to unintended data access or modifications when distributed caching is enabled.","user_interaction":"not_required","vuln_class":"business_logic"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":9.1,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-670","name":"Always-Incorrect Control Flow Implementation"},{"id":"CWE-440","name":"Expected Behavior Violation"}],"description":"Apollo Router is a configurable, graph router written in Rust to run a federated supergraph that uses Apollo Federation 2. The affected versions of Apollo Router contain a bug that in limited circumstances, could lead to unexpected operations being executed which can result in unintended data or effects. This only affects Router instances configured to use distributed query plan caching. The root cause of this defect is a bug in Apollo Router’s cache retrieval logic: When this defect is present and distributed query planning caching is enabled, asking the Router to execute an operation (whether it is a query, a mutation, or a subscription) may result in an unexpected variation of that operation being executed or the generation of unexpected errors. The issue stems from inadvertently executing a modified version of a previously executed operation, whose query plan is stored in the underlying cache (specifically, Redis). Depending on the type of the operation, the result may vary. For a query, results may be fetched that don’t match what was requested (e.g., rather than running `fetchUsers(type: ENTERPRISE)` the Router may run `fetchUsers(type: TRIAL)`. For a mutation, this may result in incorrect mutations being sent to underlying subgraph servers (e.g., rather than sending `deleteUser(id: 10)` to a subgraph, the Router may run `deleteUser(id: 12)`. Users who are using distributed query plan caching, are advised to either upgrade to version 1.45.1 or above or downgrade to version 1.43.2 of the Apollo Router. Apollo Router versions 1.44.0 or 1.45.0 are not recommended for use and have been withdrawn. Users unable to upgrade can disable distributed query plan caching to mitigate this issue.","ecosystems":["crates.io"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Defect in query plan cache may cause incorrect operations to be executed in Apollo Router","id":"CVE-2024-32971","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"crates.io","product":null,"products":[],"type":"business_logic","year":"2024"},"n_packages":2,"n_references":4,"next":{"headline":"go-ethereum denial of service via malicious p2p message","id":"CVE-2024-32972"},"packages":[{"ecosystem":"crates.io","fixed":["1.45.1"],"introduced":["1.44.0"],"last_affected":[],"package":"apollo-router","purl":null,"source":"GHSA-q9p4-hw9m-fj2v"},{"ecosystem":"crates.io","fixed":["1.45.1"],"introduced":["1.44.0"],"last_affected":[],"package":"apollo-router","purl":"pkg:cargo/apollo-router","source":"GHSA-q9p4-hw9m-fj2v"}],"prev":{"headline":"Cross-site Scripting (XSS) possible with maliciously formed HTML attribute names and values in Phlex","id":"CVE-2024-32970"},"products":["router"],"published":"2024-05-02","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["apollographql"]},"summary":"Apollo Router may execute incorrect GraphQL operations due to a cache defect, leading to unintended data access or modifications when distributed caching is enabled.","url":"https://insights.sbomify.com/CVE-2024-32971/"}