CVE-2025-27098

CVE-2025-27098 is a medium-severity path traversal vulnerability in @graphql-mesh/cli (npm), affecting versions >= 0.78.0, < 0.82.22. It is fixed in 0.82.22, 0.3.19.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Unwanted access to the entire file system vulnerability due to a missing check in staticFiles HTTP handler

Missing check vulnerability in the static file handler allows any client to access the files in the server's file system

Details

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;

  if (staticFiles) {
    router.get('/:relativePath+', async request => {
      let { relativePath } = request.params;
      if (!relativePath) {
        relativePath = 'index.html';
      }
      const absolutePath = path.join(baseDir, staticFiles, relativePath);
      if (absolutePath.includes(staticFiles) && (await pathExists(absolutePath))) {
        const readStream = fs.createReadStream(absolutePath);
        return new Response(readStream as any, {
          status: 200,
        });
      }
      return undefined;
    });

Example scenario

To reproduce it, set staticFiles to the relative path of a directory in .meshrc.yml;

serve:
   staticFiles: ./public

Then start the server with mesh dev, and browse to /..%2fpackage.json then you will see the content of package.json. You can even go deeper to see sensitive data; /..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc/passwd

Impact and solution

If staticFiles is set under serve in the configuration file. you have two options to fix vulnerability;

  • 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
  • Remove staticFiles option from the configuration, and use other solutions to serve static files.

Credits

Thanks [email protected] for reporting this vulnerability with details

Impact

Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files. Typical impact: unauthorized file read or write outside the intended directory.

CVE-2025-27098 has a CVSS score of 5.8 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.82.22, 0.3.19); upgrading removes the vulnerable code path.

Affected versions

@graphql-mesh/cli (>= 0.78.0, < 0.82.22) @graphql-mesh/http (< 0.3.19)

Security releases

@graphql-mesh/cli → 0.82.22 (npm) @graphql-mesh/http → 0.3.19 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

@graphql-mesh/cli to 0.82.22 or later; @graphql-mesh/http to 0.3.19 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-27098? CVE-2025-27098 is a medium-severity path traversal vulnerability in @graphql-mesh/cli (npm), affecting versions >= 0.78.0, < 0.82.22. It is fixed in 0.82.22, 0.3.19. Input manipulates file paths to reach files outside the intended directory, such as configuration or credential files.
  2. How severe is CVE-2025-27098? CVE-2025-27098 has a CVSS score of 5.8 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2025-27098?
    • @graphql-mesh/cli (npm) (versions >= 0.78.0, < 0.82.22)
    • @graphql-mesh/http (npm) (versions < 0.3.19)
  4. Is there a fix for CVE-2025-27098? Yes. CVE-2025-27098 is fixed in 0.82.22, 0.3.19. Upgrade to this version or later.
  5. Is CVE-2025-27098 exploitable, and should I be worried? Whether CVE-2025-27098 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-27098 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-27098?
    • Upgrade @graphql-mesh/cli to 0.82.22 or later
    • Upgrade @graphql-mesh/http to 0.3.19 or later

Stop the waste.
Protect your environment with Kodem.