CVE-2025-27097

7.5 HIGH

📋 TL;DR

GraphQL Mesh has a variable caching vulnerability where initial GraphQL query variables persist across subsequent requests with different variables until cache eviction. This allows token reuse across different user sessions, potentially causing authentication bypass. Affects GraphQL Mesh deployments using root-level or single-source transforms.

💻 Affected Systems

Products:
  • GraphQL Mesh
Versions: All versions before 0.99.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects deployments using root-level or single-source transforms. Standard GraphQL Mesh configurations without transforms are not vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Authentication tokens from one user session could be reused for another user's requests, leading to unauthorized data access or privilege escalation.

🟠

Likely Case

Intermittent authentication issues where users might access data belonging to other users during the cache retention period.

🟢

If Mitigated

Limited impact with proper authentication validation and short cache durations, though some session mixing may still occur.

🌐 Internet-Facing: HIGH - Internet-facing GraphQL Mesh instances could allow attackers to exploit token reuse across different user sessions.
🏢 Internal Only: MEDIUM - Internal deployments still risk cross-user data access but with reduced external attack surface.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Requires understanding of GraphQL Mesh transforms and ability to send multiple queries with different variables. Exploitation depends on specific application authentication implementation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 0.99.0 and later

Vendor Advisory: https://github.com/ardatan/graphql-mesh/security/advisories/GHSA-rr4x-crhf-8886

Restart Required: No

Instructions:

1. Update GraphQL Mesh to version 0.99.0 or later using npm/yarn/pnpm. 2. Run 'npm update @graphql-mesh/runtime' or equivalent for your package manager. 3. No service restart required as this is a library update.

🔧 Temporary Workarounds

Disable root-level transforms

all

Temporarily disable root-level or single-source transforms if not essential for functionality

Modify GraphQL Mesh configuration to remove or comment out transform sections

Reduce cache size

all

Configure smaller LRU cache size to accelerate DocumentNode eviction

Set 'lruCacheMax' to lower value in GraphQL Mesh configuration

🧯 If You Can't Patch

  • Implement additional authentication validation at application layer to verify tokens per request
  • Monitor for unusual authentication patterns and implement rate limiting on GraphQL endpoints

🔍 How to Verify

Check if Vulnerable:

Check GraphQL Mesh version and verify if root-level transforms are configured. Vulnerable if version <0.99.0 AND using transforms.

Check Version:

npm list @graphql-mesh/runtime or check package.json version

Verify Fix Applied:

Verify GraphQL Mesh version is 0.99.0 or later. Test with multiple queries containing different variables to ensure proper variable handling.

📡 Detection & Monitoring

Log Indicators:

  • Multiple GraphQL requests with different variables returning same authentication results
  • Unexpected user context switches in application logs

Network Indicators:

  • Repeated GraphQL queries with varying variable payloads
  • Unusual authentication token reuse patterns

SIEM Query:

graphql.request AND (variable.token != null) | stats count by user, session_id | where count > threshold

🔗 References

📤 Share & Export