# CVE-2025-27097: Cache variables with the operations when transforms exist on the root level even if variables change in the further requests with the same operation


- **Severity:** Medium 5.1 (`CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:N/VI:L/VA:L/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Fix available:** Yes
- **Published:** 20 Feb 2025
- **Updated:** 20 Feb 2025
- **Also known as:** GHSA-rr4x-crhf-8886

## What is CVE-2025-27097?

CVE-2025-27097 is a medium-severity vulnerability in ardatan graphql-mesh, published on 20 Feb 2025. 

### Official description

GraphQL Mesh is a GraphQL Federation framework and gateway for both GraphQL Federation and non-GraphQL Federation subgraphs, non-GraphQL services, such as REST and gRPC, and also databases such as MongoDB, MySQL, and PostgreSQL. When a user transforms on the root level or single source with transforms, and the client sends the same query with different variables, the initial variables are used in all following requests until the cache evicts DocumentNode. If a token is sent via variables, the following requests will act like the same token is sent even if the following requests have different tokens. This can cause a short memory leak but it won't grow per each request but per different operation until the cache evicts DocumentNode by LRU mechanism.

Weakness: CWE-401 (Missing Release of Memory after Effective Lifetime), CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2025-27097?

2 open source packages ship an affected version, including @graphql-mesh/runtime. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `@graphql-mesh/runtime` | npm | From 0.96.5 | 0.96.9 |
| `@graphql-mesh/runtime` | npm | From 0.96.5 | 0.96.9 |

Products: The-Guild Graphql Mesh.

## How do I fix CVE-2025-27097?

Upgrade @graphql-mesh/runtime to 0.96.9 or later.

## Is CVE-2025-27097 being exploited?

There is no known exploitation of CVE-2025-27097 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-27097 and fix it if it is affected.

What it is: CVE-2025-27097 is a medium-severity vulnerability in ardatan graphql-mesh, published on 20 Feb 2025. 
Exploitation: There is no known exploitation of CVE-2025-27097 in the wild and no public exploit code.

Affected packages and fixed versions:
- @graphql-mesh/runtime (npm): affected from 0.96.5; fixed in 0.96.9
- @graphql-mesh/runtime (npm): affected from 0.96.5; fixed in 0.96.9

Task:
1. 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.
2. 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.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-27097/ (Markdown: https://insights.sbomify.com/CVE-2025-27097/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-27097
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-27097
- OSV: https://osv.dev/vulnerability/CVE-2025-27097

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-27097/
Summaries are generated and may contain mistakes; the official description above is the record.
