CVE-2025-27098 Unwanted access to the entire file system vulnerability due to a missing check in `staticFiles` HTTP handler

Medium 5.8 Published Updated

Attackers can read arbitrary files from the server filesystem if the staticFiles option is enabled in GraphQL Mesh configuration.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2025-27098?

CVE-2025-27098 is a medium-severity path traversal vulnerability in ardatan graphql-mesh, published on 20 Feb 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

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. Missing check vulnerability in the static file handler allows any client to access the files in the server's file system. When `staticFiles` is set in the `serve` settings in the configuration file, the following handler doesn't check if `absolutePath` is still under the directory provided as `staticFiles`. Users have two options to fix vulnerability; 1. Update `@graphql-mesh/cli` to a version higher than `0.82.21`, and if you use `@graphql-mesh/http`, update it to a version higher than `0.3.18` 2. Remove `staticFiles` option from the configuration, and use other solutions to serve static files.

Weakness: CWE-22

Which versions are affected by CVE-2025-27098?

4 open source packages ship an affected version, including @graphql-mesh/cli and @graphql-mesh/http. It affects 2 products.

PackageAffectedFixed in
@graphql-mesh/cli npmFrom 0.78.00.82.22
@graphql-mesh/cli npmFrom 0.78.00.82.22
@graphql-mesh/http npmAll versions0.3.19
@graphql-mesh/http npmAll versions0.3.19

Products include The-Guild Graphql Mesh Cli, The-Guild Graphql Mesh Http.

How do I fix CVE-2025-27098?

Upgrade @graphql-mesh/cli to 0.82.22 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2025-27098 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-27098 exists.

Sources

Also known as GHSA-j2wh-wrv3-4x4g.

Is CVE-2025-27098 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free