CVE-2026-77604
Received Received - Intake

Path Traversal in Code Graph RAG

Vulnerability report for CVE-2026-77604, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-11-05

Last updated on: 2026-11-05

Assigner: GitHub, Inc.

Description

Code Graph RAG is an AI-powered knowledge graph and retrieval system for querying, understanding, and editing multi-language codebases. Prior to 0.0.345, the MCPToolsRegistry.read_file implementation in codebase_rag/mcp/tools.py joins attacker-controlled file_path input to project_root without resolving and verifying containment when offset or limit selects the paginated branch. An absolute path causes pathlib to discard the configured root, while relative traversal can also resolve outside it. The protected non-paginated branch uses validate_project_path, but the paginated branch bypasses that validation before opening the path. An unauthenticated caller of a network-exposed HTTP MCP server can therefore read arbitrary UTF-8-readable files available to the server process, including credentials, environment data, private keys, source, and configuration; local callers through the stdio transport can reach the same vulnerable code path. This issue is fixed in version 0.0.345.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-11-05
Last Modified
2026-11-05
Generated
2026-11-08
AI Q&A
2026-11-06
EPSS Evaluated
2026-11-06
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
vitali87 code-graph-rag < 0.0.345

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This is a path traversal vulnerability in Code Graph RAG's MCPToolsRegistry.read_file function. It allows attackers to read arbitrary files on the server by exploiting how Python's pathlib handles absolute paths. The issue occurs in the paginated branch of the read_file function, which does not validate file paths against the project root before accessing files.

Detection Guidance

Check if your code-graph-rag instance is running version 0.0.343 or earlier. Inspect network-exposed MCP servers for unauthenticated HTTP endpoints bound to 0.0.0.0:8080. Test for path traversal by attempting to read arbitrary files using crafted offset or limit parameters in read_file requests.

Impact Analysis

An attacker can read sensitive files on the server, including credentials, environment data, private keys, source code, and configuration files. This is possible both remotely via the HTTP MCP server and locally through the stdio transport. The default HTTP server binds to 0.0.0.0:8080 with no authentication required.

Compliance Impact

This vulnerability could lead to unauthorized access to sensitive data, violating GDPR's data protection principles and HIPAA's security requirements for protected health information. Unauthorized file access may result in data breaches, non-compliance penalties, and loss of trust.

Mitigation Strategies

Upgrade to version 0.0.345 or later immediately. If upgrading is not possible, restrict network access to the MCP server or disable the HTTP transport. Ensure all file paths are validated before access and block absolute paths or relative traversals in user input.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-77604. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...